diff options
| author | 2013-04-13 14:26:13 +0200 | |
|---|---|---|
| committer | 2013-04-13 14:26:13 +0200 | |
| commit | a4beb7b772fdc3c8c894b93611bfb030c9456f07 (patch) | |
| tree | e598b46b5ac44d4f11ee533012705fdaa23b3106 /app/controllers/feedController.php | |
| parent | 627700648ba3f144afa9294afe1f9c51b0018ad7 (diff) | |
Correction faute dans about + ajout options mise à jour et marquer comme lu pour un flux spécifiée
Diffstat (limited to 'app/controllers/feedController.php')
| -rwxr-xr-x | app/controllers/feedController.php | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index 3e6ae4800..d2a2184eb 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -97,7 +97,16 @@ class feedController extends ActionController { $feedDAO = new FeedDAO (); $entryDAO = new EntryDAO (); - $feeds = $feedDAO->listFeedsOrderUpdate (); + $id = Request::param ('id'); + $feeds = array (); + if ($id) { + $feed = $feedDAO->searchById ($id); + if ($feed) { + $feeds = array ($feed); + } + } else { + $feeds = $feedDAO->listFeedsOrderUpdate (); + } // pour ne pas ajouter des entrées trop anciennes $nb_month_old = $this->view->conf->oldEntries (); @@ -130,10 +139,23 @@ class feedController extends ActionController { $entryDAO->cleanOldEntries ($nb_month_old); // notif - $notif = array ( - 'type' => 'good', - 'content' => $i . ' flux ont été mis à jour' - ); + if ($i == 1) { + $feed = reset ($feeds); + $notif = array ( + 'type' => 'good', + 'content' => '<em>' . $feed->name () . '</em> a été mis à jour' + ); + } elseif ($i > 0) { + $notif = array ( + 'type' => 'good', + 'content' => $i . ' flux ont été mis à jour' + ); + } else { + $notif = array ( + 'type' => 'bad', + 'content' => 'Aucun flux n\'a pu être mis à jour' + ); + } Session::_param ('notification', $notif); Request::forward (array (), true); |
