summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-23 12:27:36 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-23 12:27:36 +0100
commitf4f27ab927f16d7ff8900e92ecf7aee75f355f34 (patch)
tree735ec22ea9c28fb65faa9066aa77e0b92f1ca24a /controller
parent262084122f735abc78f7e767870b0e6c10844a7a (diff)
also pass in showall value to items
Diffstat (limited to 'controller')
-rw-r--r--controller/itemcontroller.php9
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(