mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
reverted Lars commit 24954, as it requires php5 and 1.4 is suposed to work with php4.3+
This commit is contained in:
parent
cf5515c1ef
commit
d27055b2fd
@ -51,9 +51,7 @@ class uiaccountsel extends accounts
|
||||
*/
|
||||
function uiaccountsel()
|
||||
{
|
||||
#$this->accounts(); // call constructor of extended class
|
||||
|
||||
$this->accountsClass = accounts::getInstance();
|
||||
$this->accounts(); // call constructor of extended class
|
||||
|
||||
$this->account_selection = $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'];
|
||||
// admin group should NOT get limited by none or groupmembers, we use primary_group instead
|
||||
@ -164,12 +162,12 @@ class uiaccountsel extends accounts
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberships = $this->accountsClass->memberships($GLOBALS['egw_info']['user']['account_id'],true);
|
||||
$memberships = $this->memberships($GLOBALS['egw_info']['user']['account_id'],true);
|
||||
}
|
||||
$select = count($selected) && !isset($selected[0]) ? array_keys($selected) : $selected;
|
||||
foreach($memberships as $gid)
|
||||
{
|
||||
foreach($this->accountsClass->members($gid,true) as $member)
|
||||
foreach($this->members($gid,true) as $member)
|
||||
{
|
||||
if (!in_array($member,$select)) $select[] = $member;
|
||||
}
|
||||
@ -178,7 +176,7 @@ class uiaccountsel extends accounts
|
||||
{
|
||||
if ($account_sel == 'primary_group')
|
||||
{
|
||||
$memberships = $this->accountsClass->memberships($GLOBALS['egw_info']['user']['account_id'],true);
|
||||
$memberships = $this->memberships($GLOBALS['egw_info']['user']['account_id'],true);
|
||||
}
|
||||
$select = array_merge($select,$memberships);
|
||||
}
|
||||
@ -209,7 +207,7 @@ class uiaccountsel extends accounts
|
||||
{
|
||||
$already_selected[$id] = $GLOBALS['egw']->common->grab_owner_name($id);
|
||||
}
|
||||
elseif ($this->accountsClass->get_type($id) == 'u')
|
||||
elseif ($this->get_type($id) == 'u')
|
||||
{
|
||||
$users[$id] = !is_array($val) ? $GLOBALS['egw']->common->grab_owner_name($id) :
|
||||
$GLOBALS['egw']->common->display_fullname(
|
||||
@ -439,9 +437,9 @@ function addOption(id,label,value,do_onchange)
|
||||
|
||||
if ($app)
|
||||
{
|
||||
$app_groups = $this->accountsClass->split_accounts($app,'groups');
|
||||
$app_groups = $this->split_accounts($app,'groups');
|
||||
}
|
||||
$all_groups = $this->accountsClass->search(array(
|
||||
$all_groups = $this->search(array(
|
||||
'type' => 'groups',
|
||||
));
|
||||
foreach($all_groups as $group)
|
||||
@ -478,7 +476,7 @@ function addOption(id,label,value,do_onchange)
|
||||
$link_data['group_id'] = $group_id; // reset it
|
||||
|
||||
// --------------------------------- nextmatch ---------------------------
|
||||
$users = $this->accountsClass->search(array(
|
||||
$users = $this->search(array(
|
||||
'type' => $group_id ? $group_id : $use,
|
||||
'app' => $app,
|
||||
'start' => $start,
|
||||
@ -489,11 +487,11 @@ function addOption(id,label,value,do_onchange)
|
||||
));
|
||||
|
||||
$GLOBALS['egw']->template->set_var(array(
|
||||
'left' => $this->nextmatchs->left('/index.php',$start,$this->accountsClass->total,$link_data+array('query'=>$query)),
|
||||
'right' => $this->nextmatchs->right('/index.php',$start,$this->accountsClass->total,$link_data+array('query'=>$query)),
|
||||
'left' => $this->nextmatchs->left('/index.php',$start,$this->total,$link_data+array('query'=>$query)),
|
||||
'right' => $this->nextmatchs->right('/index.php',$start,$this->total,$link_data+array('query'=>$query)),
|
||||
'lang_showing' => ($group_id ? $GLOBALS['egw']->common->grab_owner_name($group_id).': ' : '').
|
||||
($query ? lang("Search %1 '%2'",lang($this->accountsClass->query_types[$query_type]),$query).': ' : '')
|
||||
.$this->nextmatchs->show_hits($this->accountsClass->total,$start),
|
||||
($query ? lang("Search %1 '%2'",lang($this->query_types[$query_type]),$query).': ' : '')
|
||||
.$this->nextmatchs->show_hits($this->total,$start),
|
||||
));
|
||||
|
||||
// -------------------------- end nextmatch ------------------------------------
|
||||
@ -522,7 +520,7 @@ function addOption(id,label,value,do_onchange)
|
||||
}
|
||||
|
||||
$GLOBALS['egw']->template->set_var('accountsel_icon',$this->html->image('phpgwapi','users-big'));
|
||||
$GLOBALS['egw']->template->set_var('query_type',is_array($this->accountsClass->query_types) ? $this->html->select('query_type',$query_type,$this->accountsClass->query_types) : '');
|
||||
$GLOBALS['egw']->template->set_var('query_type',is_array($this->query_types) ? $this->html->select('query_type',$query_type,$this->query_types) : '');
|
||||
|
||||
$link_data['query_type'] = 'start';
|
||||
$letters = lang('alphabet');
|
||||
|
Loading…
Reference in New Issue
Block a user