From 941f91ab7b1c8faf2bb753be4988c1e6660d3c9e Mon Sep 17 00:00:00 2001 From: bettina Date: Wed, 6 Jun 2001 03:17:45 +0000 Subject: [PATCH] update --- phpgwapi/inc/class.categories.inc.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 23451a24a1..1516f8c217 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -139,17 +139,20 @@ $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 $ordermethod"; - if ($limit) { $limitmethod = " " . $this->db->limit($start); } + $sql = "SELECT * from phpgw_categories WHERE (cat_appname='" . $this->app_name . "' $public_cats $parent_filter) AND " + . " $grant_cats $querymethod $filter"; + $this->db2->query($sql,__LINE__,__FILE__); + $this->total_records = $this->db2->num_rows(); - $this->db->query($sql . $limitmethod,__LINE__,__FILE__); + + $this->db->query($sql . $ordermethod . $limitmethod,__LINE__,__FILE__); + //echo 'TEST:' . $sql; $i = 0; @@ -250,11 +253,11 @@ { global $phpgw; $filter = $this->filter($type); - + if (!is_array($selected)) { $selected = explode(',',$selected); - } + } if ($format == 'select') { @@ -270,7 +273,7 @@ $s .= '>' . $phpgw->strip_html($cats[$i]['name']); if ($cats[$i]['app_name'] == 'phpgw') { - $s .= '<' . lang('Global') . '>'; + $s .= '<' . lang('Global') . '>'; } $s .= '' . "\n"; }