From ae028712f26fd3a3987958ea196dbb5b69d2e515 Mon Sep 17 00:00:00 2001 From: skeeter Date: Wed, 7 Feb 2001 11:52:19 +0000 Subject: [PATCH] sql_search works again --- phpgwapi/inc/class.common.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 14dc99e97a..e2b2b3fd78 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -62,16 +62,16 @@ // This is used for searching the access fields function sql_search($table,$owner=0) { - global $phpgw_info; + global $phpgw, $phpgw_info; $s = ""; if (!$owner) { $owner = $phpgw_info["user"]["account_id"]; } - $groups = $this->read_groups(intval($owner)); + $groups = $phpgw->accounts->memberships(intval($owner)); if (gettype($groups) == "array") { while ($group = each($groups)) { - $s .= " or $table like '%," . $group[0] . ",%'"; + $s .= " or $table like '%," . $group[2] . ",%'"; } } return $s;