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')
|
$items = \PicoTools\singleton('db')
|
||||||
->table('items')
|
->table('items')
|
||||||
->columns('id', 'status', 'title')
|
->columns('id', 'status', 'title', 'bookmark')
|
||||||
->in('bookmark', $bookmark)
|
|
||||||
->neq('status', 'removed')
|
->neq('status', 'removed')
|
||||||
->desc('updated')
|
->desc('updated')
|
||||||
->findAll();
|
->findAll();
|
||||||
@ -505,7 +504,7 @@ function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0))
|
|||||||
|
|
||||||
while ($j >= 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];
|
$previous_item = $items[$j];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -520,7 +519,7 @@ function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0))
|
|||||||
|
|
||||||
while ($j < $ilen) {
|
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];
|
$next_item = $items[$j];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<?php elseif (! $item_nav['previous'] && $item_nav['next']): ?>
|
<?php elseif (! $item_nav['previous'] && $item_nav['next']): ?>
|
||||||
<a href="?action=<?= $menu ?>&feed_id=<?= $feed['id'] ?>#item-<?= $item_nav['next']['id'] ?>"><?= t('Listing') ?></a>
|
<a href="?action=<?= $menu ?>&feed_id=<?= $feed['id'] ?>#item-<?= $item_nav['next']['id'] ?>"><?= t('Listing') ?></a>
|
||||||
<?php elseif (! $item_nav['previous'] && ! $item_nav['next']): ?>
|
<?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 ?>
|
<?php endif ?>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user