mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Make sure all selected accounts are there, even if preference would normally not include them
This commit is contained in:
parent
86e72a105e
commit
180453a303
@ -332,10 +332,10 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
$select_pref = $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'];
|
||||
|
||||
// in case of readonly, we read/create only the needed entries, as reading accounts is expensive
|
||||
if (!is_array($value) && strpos($value,',') !== false) $value = explode(',',$value);
|
||||
if ($readonly || $select_pref == 'popup')
|
||||
{
|
||||
$no_lang = True;
|
||||
if (!is_array($value) && strpos($value,',') !== false) $value = explode(',',$value);
|
||||
foreach(is_array($value) ? $value : array($value) as $id)
|
||||
{
|
||||
$options[$id] = !$id && !is_numeric($rows) ? lang($rows) :
|
||||
@ -374,6 +374,13 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
$options[$acc['account_id']] = self::accountInfo($acc['account_id'],$acc,$type2,$type=='both');
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure all values are present, even if not normally sent (according to preferences)
|
||||
$remaining = array_diff_key($value, $options);
|
||||
foreach($remaining as $id)
|
||||
{
|
||||
$options[$id] = !$id && !is_numeric($rows) ? lang($rows) : self::accountInfo($id,null,$type2,$type=='both');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'select-year': // options: #rows,#before(default=3),#after(default=2)
|
||||
|
Loading…
Reference in New Issue
Block a user