diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 18:08:52 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 18:08:52 +0200 |
commit | d9acb9ed876d9814e468081d799f06ffd631580f (patch) | |
tree | 887653ca34a9b67adeb60435b3dd37f7329619c3 /controller/itemcontroller.php | |
parent | f52cdaa750f1efa8cb76f6d88c9b1dc291f7b328 (diff) |
add serverside possibility to order by oldest first
Diffstat (limited to 'controller/itemcontroller.php')
-rw-r--r-- | controller/itemcontroller.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index dfc059505..0f590950e 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -57,6 +57,8 @@ class ItemController extends Controller { public function index($type, $id, $limit, $offset=0) { $showAll = $this->settings->getUserValue($this->userId, $this->appName, 'showAll') === '1'; + $oldestFirst = $this->settings->getUserValue($this->userId, $this->appName, + 'oldestFirst') === '1'; $this->settings->setUserValue($this->userId, $this->appName, 'lastViewedFeedId', $id); @@ -77,8 +79,9 @@ class ItemController extends Controller { $params['starred'] = $this->itemBusinessLayer->starredCount($this->userId); } - $params['items'] = $this->itemBusinessLayer->findAll($id, $type, $limit, - $offset, $showAll, $this->userId); + $params['items'] = $this->itemBusinessLayer->findAll( + $id, $type, $limit, $offset, $showAll, $this->userId, $oldestFirst + ); // this gets thrown if there are no items // in that case just return an empty array |