diff options
| author | 2012-11-05 21:40:58 +0100 | |
|---|---|---|
| committer | 2012-11-05 21:40:58 +0100 | |
| commit | 209fb252dcce8b69d05f796a914beb0e0bb7f9eb (patch) | |
| tree | 90b5e72a280f5bae15e4d7895f4f6fc9adb34fce /app/controllers/feedController.php | |
| parent | 33e47c5ac4cb622b51b0b23c7cad03d91ca1e26c (diff) | |
Fix issue #4 : ajout des retours utilisateur
Diffstat (limited to 'app/controllers/feedController.php')
| -rwxr-xr-x | app/controllers/feedController.php | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index eed8ccafa..d459ba0cb 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -43,8 +43,20 @@ class feedController extends ActionController { ); $entryDAO->addEntry ($values); } + + // notif + $notif = array ( + 'type' => 'good', + 'content' => 'Le flux <em>' . $feed->url () . '</em> a bien été ajouté' + ); + Session::_param ('notification', $notif); } catch (Exception $e) { - // TODO ajouter une erreur : url non valide + // notif + $notif = array ( + 'type' => 'bad', + 'content' => 'L\'url <em>' . $url . '</em> est invalide' + ); + Session::_param ('notification', $notif); } Request::forward (array (), true); @@ -81,6 +93,13 @@ class feedController extends ActionController { $entryDAO->cleanOldEntries ($this->view->conf->oldEntries ()); + // notif + $notif = array ( + 'type' => 'good', + 'content' => 'Les flux ont été mis à jour' + ); + Session::_param ('notification', $notif); + Request::forward (array (), true); } @@ -139,6 +158,13 @@ class feedController extends ActionController { ); $feedDAO->addFeed ($values); } + + // notif + $notif = array ( + 'type' => 'good', + 'content' => 'Les flux ont été importés' + ); + Session::_param ('notification', $notif); Request::forward (array ('c' => 'configure', 'a' => 'importExport')); } @@ -155,6 +181,13 @@ class feedController extends ActionController { $feedDAO = new FeedDAO (); $feedDAO->deleteFeed ($id); + + // notif + $notif = array ( + 'type' => 'good', + 'content' => 'Le flux a été supprimé' + ); + Session::_param ('notification', $notif); Request::forward (array ('c' => 'configure', 'a' => 'feed'), true); } |
