From 24226d69f906f0064909c820f8c66e2242206b8e Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 11 Jun 2013 00:22:35 +0200 Subject: parse url and body parameters correctly for getAll items in the api --- external/itemapi.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'external') diff --git a/external/itemapi.php b/external/itemapi.php index 6b4aeb80c..adca0a3d8 100644 --- a/external/itemapi.php +++ b/external/itemapi.php @@ -55,7 +55,13 @@ class ItemAPI extends Controller { $offset = (int) $this->params('offset', 0); $type = (int) $this->params('type'); $id = (int) $this->params('id'); - $showAll = $this->params('getRead') === 'true'; + $showAll = $this->params('getRead'); + + if($showAll === 'true' || $showAll === true) { + $showAll = true; + } else { + $showAll = false; + } $items = $this->itemBusinessLayer->findAll( $id, -- cgit v1.2.3