From b780a2329b5f4b37ad7fb0453544a410d0f48416 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 25 Aug 2013 13:25:27 +0200 Subject: New option onread_jump_next Added a new option to automatically jump to the next sibling (category or feed) when hitting the button "mark as read". --- app/controllers/entryController.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app/controllers/entryController.php') diff --git a/app/controllers/entryController.php b/app/controllers/entryController.php index c7e13f471..cb9e24757 100755 --- a/app/controllers/entryController.php +++ b/app/controllers/entryController.php @@ -35,13 +35,10 @@ class entryController extends ActionController { $id = Request::param ('id'); $is_read = Request::param ('is_read'); $get = Request::param ('get'); + $nextGet = Request::param ('nextGet', $get); $dateMax = Request::param ('dateMax', time ()); - if ($is_read) { - $is_read = true; - } else { - $is_read = false; - } + $is_read = !!$is_read; $entryDAO = new EntryDAO (); if ($id == false) { @@ -53,10 +50,10 @@ class entryController extends ActionController { if ($typeGet == 'c') { $entryDAO->markReadCat ($get, $is_read, $dateMax); - $this->params = array ('get' => 'c_' . $get); + $this->params = array ('get' => $nextGet); } elseif ($typeGet == 'f') { $entryDAO->markReadFeed ($get, $is_read, $dateMax); - $this->params = array ('get' => 'f_' . $get); + $this->params = array ('get' => $nextGet); } } -- cgit v1.2.3