From f857c1eeff56bf67db8967e7bd71982bd9e4017d Mon Sep 17 00:00:00 2001 From: bettina Date: Thu, 3 Jan 2002 03:42:13 +0000 Subject: [PATCH] fixed wrong select of the global cats --- phpgwapi/inc/class.categories.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 44ec41bf80..f3246404f0 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -93,7 +93,7 @@ { if ($public) { - $public_cats = " OR cat_appname='phpgw' "; + $public_cats = " OR cat_appname='phpgw'"; } $filter = $this->filter($type); @@ -112,6 +112,7 @@ $ordermethod = ' ORDER BY cat_main, cat_level, cat_name ASC'; } + if (is_array($this->grants)) { $grants = $this->grants; @@ -137,8 +138,8 @@ $querymethod = " AND (cat_name LIKE '%$query%' OR cat_description LIKE '%$query%') "; } - $sql = "SELECT * from phpgw_categories WHERE (cat_appname='" . $this->app_name . "'" . $public_cats . ")" . $parent_filter . " AND" - . $grant_cats . $querymethod . $filter; + $sql = "SELECT * from phpgw_categories WHERE (cat_appname='" . $this->app_name . "' AND" . $grant_cats . $public_cats . ")" + . $parent_filter . $querymethod . $filter; $this->db2->query($sql,__LINE__,__FILE__);