Fix bug on nav item when bookmarking an item
This commit is contained in:
parent
d12fa5b76b
commit
97b45bebe5
@ -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;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
||||
<?php elseif (! $item_nav['previous'] && $item_nav['next']): ?>
|
||||
<a href="?action=<?= $menu ?>&feed_id=<?= $feed['id'] ?>#item-<?= $item_nav['next']['id'] ?>"><?= t('Listing') ?></a>
|
||||
<?php elseif (! $item_nav['previous'] && ! $item_nav['next']): ?>
|
||||
<a href="?action=<?= $menu ?>&feed_id=<?= $feed['id'] ?>"><?= t('Unread items') ?></a>
|
||||
<a href="?action=<?= $menu ?>&feed_id=<?= $feed['id'] ?>"><?= t('Listing') ?></a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user