diff options
| author | 2013-11-09 23:16:13 +0100 | |
|---|---|---|
| committer | 2013-11-09 23:16:13 +0100 | |
| commit | 5fc72aa7feb3212ad9b9c1c71cd2a647dabc6ab6 (patch) | |
| tree | 1b2a9e40ed660bbce2d05679c7ee9f7b2ca7ac93 | |
| parent | b5ba06dcf1d1e63bef3a237ce8c1a6db7332a9e4 (diff) | |
Lance une actualisation des flux après import OPML
Le script d'actualisation est lancé après avoir importé les flux
automatiquement
Voir issue #196
| -rwxr-xr-x | app/controllers/feedController.php | 1 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 7 | ||||
| -rw-r--r-- | public/scripts/main.js | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index 31bade9f5..76fca8828 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -297,6 +297,7 @@ class feedController extends ActionController { 'content' => $res ); Session::_param ('notification', $notif); + Session::_param ('actualize_feeds', true); // et on redirige vers la page import/export Request::forward (array ( diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 101c2e001..58cb3c5ac 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -31,4 +31,9 @@ echo 'load_shortcuts=', Request::controllerName () === 'index' && Request::actionName () === 'index' ? 'true' : 'false', ",\n"; - echo 'str_confirmation="', Translate::t('confirm_action'), '"', ";\n"; + echo 'str_confirmation="', Translate::t('confirm_action'), '"', ",\n"; + + echo 'auto_actualize_feeds=', Session::param('actualize_feeds', false) ? 'true' : 'false', ";\n"; + if (Session::param('actualize_feeds', false)) { + Session::_param('actualize_feeds'); + } diff --git a/public/scripts/main.js b/public/scripts/main.js index 9c7021ba6..2f3ed38f1 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -448,6 +448,12 @@ function init_actualize() { }); return false; }); + + if(auto_actualize_feeds) { + $.getScript('./?c=javascript&a=actualize').done(function () { + updateFeeds(); + }); + } } function closeNotification() { |
