mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
sql_search works again
This commit is contained in:
parent
65f1101563
commit
ae028712f2
@ -62,16 +62,16 @@
|
|||||||
// This is used for searching the access fields
|
// This is used for searching the access fields
|
||||||
function sql_search($table,$owner=0)
|
function sql_search($table,$owner=0)
|
||||||
{
|
{
|
||||||
global $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
|
|
||||||
$s = "";
|
$s = "";
|
||||||
if (!$owner) {
|
if (!$owner) {
|
||||||
$owner = $phpgw_info["user"]["account_id"];
|
$owner = $phpgw_info["user"]["account_id"];
|
||||||
}
|
}
|
||||||
$groups = $this->read_groups(intval($owner));
|
$groups = $phpgw->accounts->memberships(intval($owner));
|
||||||
if (gettype($groups) == "array") {
|
if (gettype($groups) == "array") {
|
||||||
while ($group = each($groups)) {
|
while ($group = each($groups)) {
|
||||||
$s .= " or $table like '%," . $group[0] . ",%'";
|
$s .= " or $table like '%," . $group[2] . ",%'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $s;
|
return $s;
|
||||||
|
Loading…
Reference in New Issue
Block a user