diff options
Diffstat (limited to 'controller/itemcontroller.php')
-rw-r--r-- | controller/itemcontroller.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index e6358ce0e..ef7276eba 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -49,17 +49,20 @@ class ItemController extends Controller { */ public function items(){ $userId = $this->api->getUserId(); + $showAll = $this->api->getUserValue($userId, 'showAll') === 'true'; + $limit = $this->params('limit'); $type = $this->params('type'); $id = $this->params('id'); - // TODO: pass in showAll value if($limit !== null){ $offset = $this->params('offset', 0); - $items = $this->itemBl->findAll($id, $type, $limit, $offset, $userId); + $items = $this->itemBl->findAll($id, $type, $limit, $offset, + $showAll, $userId); } else { $updatedSince = $this->params('updatedSince'); - $items = $this->itemBl->findAllNew($id, $type, $updatedSince, $userId); + $items = $this->itemBl->findAllNew($id, $type, $updatedSince, + $showAll, $userId); } $params = array( |