Fix bug on nav item for the page "feed-items"
This commit is contained in:
parent
dafa3c9a4c
commit
ea1c5fdfbf
@ -105,7 +105,7 @@ Router\get_action('show', function() {
|
||||
$nav = Model\get_nav_item($item, array('read'));
|
||||
break;
|
||||
case 'feed-items':
|
||||
$nav = Model\get_nav_item($item, array('unread', 'read'));
|
||||
$nav = Model\get_nav_item($item, array('unread', 'read'), array(1, 0), $item['feed_id']);
|
||||
break;
|
||||
case 'bookmarks':
|
||||
$nav = Model\get_nav_item($item, array('unread', 'read'), array(1));
|
||||
|
11
model.php
11
model.php
@ -482,14 +482,17 @@ function get_item($id)
|
||||
}
|
||||
|
||||
|
||||
function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0))
|
||||
function get_nav_item($item, $status = array('unread'), $bookmark = array(1, 0), $feed_id = null)
|
||||
{
|
||||
$items = \PicoTools\singleton('db')
|
||||
$query = \PicoTools\singleton('db')
|
||||
->table('items')
|
||||
->columns('id', 'status', 'title', 'bookmark')
|
||||
->neq('status', 'removed')
|
||||
->desc('updated')
|
||||
->findAll();
|
||||
->desc('updated');
|
||||
|
||||
if ($feed_id) $query->eq('feed_id', $feed_id);
|
||||
|
||||
$items = $query->findAll();
|
||||
|
||||
$next_item = null;
|
||||
$previous_item = null;
|
||||
|
Loading…
Reference in New Issue
Block a user