fixed wrong select of the global cats

This commit is contained in:
bettina 2002-01-03 03:42:13 +00:00
parent e1d78758d8
commit f857c1eeff

View File

@ -93,7 +93,7 @@
{ {
if ($public) if ($public)
{ {
$public_cats = " OR cat_appname='phpgw' "; $public_cats = " OR cat_appname='phpgw'";
} }
$filter = $this->filter($type); $filter = $this->filter($type);
@ -112,6 +112,7 @@
$ordermethod = ' ORDER BY cat_main, cat_level, cat_name ASC'; $ordermethod = ' ORDER BY cat_main, cat_level, cat_name ASC';
} }
if (is_array($this->grants)) if (is_array($this->grants))
{ {
$grants = $this->grants; $grants = $this->grants;
@ -137,8 +138,8 @@
$querymethod = " AND (cat_name LIKE '%$query%' OR cat_description LIKE '%$query%') "; $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" $sql = "SELECT * from phpgw_categories WHERE (cat_appname='" . $this->app_name . "' AND" . $grant_cats . $public_cats . ")"
. $grant_cats . $querymethod . $filter; . $parent_filter . $querymethod . $filter;
$this->db2->query($sql,__LINE__,__FILE__); $this->db2->query($sql,__LINE__,__FILE__);