forked from extern/egroupware
minor fixes for reading group info
This commit is contained in:
parent
33a9bf669f
commit
94b6d81a37
@ -126,15 +126,12 @@
|
||||
|
||||
if (gettype($id) == "string") { $id = $this->name2id($id); }
|
||||
$groups = Array();
|
||||
$group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, "u", intval($id));
|
||||
if ($group_memberships) {
|
||||
for ($idx=0; $idx<count($group_memberships); $idx++){
|
||||
$groups[intval($group_memberships[$idx])] = 1;
|
||||
}
|
||||
return $groups;
|
||||
} else {
|
||||
return False;
|
||||
$group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, intval($id));
|
||||
if (!$group_memberships) { return False; }
|
||||
for ($idx=0; $idx<count($group_memberships); $idx++){
|
||||
$groups[intval($group_memberships[$idx])] = 1;
|
||||
}
|
||||
return $groups;
|
||||
}
|
||||
|
||||
function read_group_names($lid = "")
|
||||
|
@ -67,18 +67,15 @@
|
||||
function sql_search($table,$owner=0)
|
||||
{
|
||||
global $phpgw_info;
|
||||
global $phpgw;
|
||||
|
||||
$s = "";
|
||||
// Changed By: Skeeter 29 Nov 00
|
||||
// This is to allow the user to search for other individuals group info....
|
||||
if(!$owner) {
|
||||
$owner = $phpgw_info["user"]["account_id"];
|
||||
}
|
||||
$groups = $this->read_groups($owner);
|
||||
$groups = $this->read_groups(intval($owner));
|
||||
if (gettype($groups) == "array") {
|
||||
// echo "\n\n\n\n\ntest: " . count($groups) . "\n\n\n\n\n\n";
|
||||
while ($group = each($groups)) {
|
||||
$s .= " or $table like '%," . $group[1] . ",%'";
|
||||
$s .= " or $table like '%," . $group[0] . ",%'";
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
|
@ -98,14 +98,11 @@
|
||||
if (gettype($id) == "string") { $id = $this->name2id($id); }
|
||||
$groups = Array();
|
||||
$group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, intval($id));
|
||||
if ($group_memberships) {
|
||||
for ($idx=0; $idx<count($group_memberships); $idx++){
|
||||
$groups[$group_memberships[$idx]] = 1;
|
||||
}
|
||||
return $groups;
|
||||
} else {
|
||||
return False;
|
||||
if (!$group_memberships) { return False; }
|
||||
for ($idx=0; $idx<count($group_memberships); $idx++){
|
||||
$groups[$group_memberships[$idx]] = 1;
|
||||
}
|
||||
return $groups;
|
||||
}
|
||||
|
||||
function read_group_names($lid = ""){
|
||||
|
Loading…
Reference in New Issue
Block a user