From d63eddf0c5a563d11c880bb700dafc889ee87a3d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 17 Mar 2013 00:01:40 +0100 Subject: Ajout d'options : possibilité de changer l'ordre des articles + possibilité de marquer comme lu au choix : tous, antérieurs à 1 jour, antérieurs à 1 semaine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/entryController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/controllers/entryController.php') diff --git a/app/controllers/entryController.php b/app/controllers/entryController.php index cb309c567..b772e1703 100755 --- a/app/controllers/entryController.php +++ b/app/controllers/entryController.php @@ -31,6 +31,7 @@ class entryController extends ActionController { $id = Request::param ('id'); $is_read = Request::param ('is_read'); $get = Request::param ('get'); + $dateMax = Request::param ('dateMax', time ()); if ($is_read) { $is_read = true; @@ -41,16 +42,16 @@ class entryController extends ActionController { $entryDAO = new EntryDAO (); if ($id == false) { if (!$get) { - $entryDAO->markReadEntries ($is_read); + $entryDAO->markReadEntries ($is_read, $dateMax); } else { $typeGet = $get[0]; $get = substr ($get, 2); if ($typeGet == 'c') { - $entryDAO->markReadCat ($get, $is_read); + $entryDAO->markReadCat ($get, $is_read, $dateMax); $this->params = array ('get' => 'c_' . $get); } elseif ($typeGet == 'f') { - $entryDAO->markReadFeed ($get, $is_read); + $entryDAO->markReadFeed ($get, $is_read, $dateMax); $this->params = array ('get' => 'f_' . $get); } } @@ -62,7 +63,7 @@ class entryController extends ActionController { ); Session::_param ('notification', $notif); } else { - $entryDAO->updateEntry ($id, $values); + $entryDAO->updateEntry ($id, array ('is_read' => $is_read)); } } -- cgit v1.2.3