From 8de6c7691a0395539cdad2fa4045f4c5cc4b590b Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 8 Jul 2010 15:04:01 +0000 Subject: [PATCH] check the cat filter. If you have no read rights for any cats (and with that resources) set the cat-filter to null. As cat_id is enforced for resources by UI, you should not ret any results, which is expected if you have no read rights. --- resources/inc/class.bo_resources.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index a78174dac3..1ccd055dba 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -90,6 +90,9 @@ class bo_resources { $filter['cat_id'] = array_keys($readcats); } + // if there is no catfilter -> this means you have no rights, so set the cat filter to null + if (!isset($filter['cat_id']) || empty($filter['cat_id'])) $filter['cat_id'] = NUll; + if ($query['show_bookable']) { $filter['bookable'] = true;