Fix some incorrect responses for account list:

- owngroups included members
- groupmembers was empty
This commit is contained in:
Nathan Gray 2015-12-09 18:55:57 +00:00
parent 0e834e372c
commit d9b43423a7
3 changed files with 7 additions and 5 deletions

View File

@ -390,11 +390,13 @@ class accounts
$type = $only_own ? 'groupmembers' : 'accounts';
break;
case 'groups':
$type = $only_own ? 'memberships' : 'groups';
$type = $only_own ? 'owngroups' : 'groups';
break;
case 'memberships':
$type = 'owngroups';
break;
case 'owngroups':
case 'groupmembers':
case 'memberships':
$type = $options['account_type'];
break;
case 'both':

View File

@ -447,9 +447,9 @@ class accounts_sql
case 'groupmembers':
case 'groupmembers+memberships':
$members = array();
foreach((array)$this->memberships($GLOBALS['egw_info']['user']['account_id'], true) as $grp)
foreach((array)$this->memberships($GLOBALS['egw_info']['user']['account_id'], true) as $grp => $name)
{
$members = array_unique(array_merge($members, (array)$this->members($grp,true)));
$members = array_unique(array_merge($members, array_keys((array)$this->members($grp))));
if ($param['type'] == 'groupmembers+memberships') $members[] = abs($grp);
}
$filter['account_id'] = $members;

View File

@ -1097,7 +1097,7 @@ class egw_session
*/
public static function link($url, $extravars = '')
{
//echo '<p>'.__METHOD__."(url='$url',extravars='".array2string($extravars)."')";
//error_log(_METHOD__."(url='$url',extravars='".array2string($extravars)."')");
if ($url[0] != '/')
{