aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/entryController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-08-25 13:25:27 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-08-25 13:25:27 +0200
commitb780a2329b5f4b37ad7fb0453544a410d0f48416 (patch)
tree318fad9b73ec698b0f8b5c89dc8ec465cdad438f /app/controllers/entryController.php
parent31a6a13268023a2db5eba2445ee6c7db4a6d9623 (diff)
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".
Diffstat (limited to 'app/controllers/entryController.php')
-rwxr-xr-xapp/controllers/entryController.php11
1 files changed, 4 insertions, 7 deletions
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);
}
}