diff --git a/model.php b/model.php index b979a1f..458ef85 100644 --- a/model.php +++ b/model.php @@ -486,8 +486,7 @@ function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0)) { $items = \PicoTools\singleton('db') ->table('items') - ->columns('id', 'status', 'title') - ->in('bookmark', $bookmark) + ->columns('id', 'status', 'title', 'bookmark') ->neq('status', 'removed') ->desc('updated') ->findAll(); @@ -505,7 +504,7 @@ function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0)) while ($j >= 0) { - if (in_array($items[$j]['status'], $status)) { + if (in_array($items[$j]['status'], $status) && in_array($items[$j]['bookmark'], $bookmark)) { $previous_item = $items[$j]; break; } @@ -520,7 +519,7 @@ function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0)) while ($j < $ilen) { - if (in_array($items[$j]['status'], $status)) { + if (in_array($items[$j]['status'], $status) && in_array($items[$j]['bookmark'], $bookmark)) { $next_item = $items[$j]; break; } diff --git a/templates/show_item.php b/templates/show_item.php index 916ef17..ab0ef77 100644 --- a/templates/show_item.php +++ b/templates/show_item.php @@ -53,7 +53,7 @@ - +