diff --git a/controllers/history.php b/controllers/history.php index 79a250a..3849cb7 100644 --- a/controllers/history.php +++ b/controllers/history.php @@ -2,6 +2,8 @@ // Display history page Router\get_action('history', function () { + $order = Request\param('order', 'updated'); + $direction = Request\param('direction', Model\Config\get('items_sorting_direction')); $offset = Request\int_param('offset', 0); $group_id = Request\int_param('group_id', null); $feed_ids = array(); @@ -15,8 +17,8 @@ Router\get_action('history', function () { $feed_ids, $offset, Model\Config\get('items_per_page'), - 'updated', - Model\Config\get('items_sorting_direction') + $order, + $direction ); $nb_items = Model\Item\count_by_status('read', $feed_ids); @@ -25,8 +27,8 @@ Router\get_action('history', function () { 'favicons' => Model\Favicon\get_item_favicons($items), 'original_marks_read' => Model\Config\get('original_marks_read'), 'items' => $items, - 'order' => '', - 'direction' => '', + 'order' => $order, + 'direction' => $direction, 'display_mode' => Model\Config\get('items_display_mode'), 'item_title_link' => Model\Config\get('item_title_link'), 'group_id' => $group_id, diff --git a/templates/history.php b/templates/history.php index 1e7a1e9..1e509c1 100644 --- a/templates/history.php +++ b/templates/history.php @@ -17,6 +17,9 @@