forked from extern/egroupware
* Mail/SAML/SSO: show mail accounts requiring the session password as Error, but load the other accounts
This commit is contained in:
parent
c175e530bb
commit
06a7767194
@ -479,8 +479,10 @@ class mail_tree
|
|||||||
{
|
{
|
||||||
$roots = array(Tree::ID => 0, Tree::CHILDREN => array());
|
$roots = array(Tree::ID => 0, Tree::CHILDREN => array());
|
||||||
|
|
||||||
foreach(Mail\Account::search(true, false) as $acc_id => $accObj)
|
foreach(Mail\Account::search(true, 'params') as $acc_id => $params)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
$accObj = new Mail\Account($params);
|
||||||
if (!$accObj->is_imap()|| $_profileID && $acc_id != $_profileID) continue;
|
if (!$accObj->is_imap()|| $_profileID && $acc_id != $_profileID) continue;
|
||||||
$identity = self::getIdentityName(Mail\Account::identity_name($accObj,true, $GLOBALS['egw_info']['user']['account_id'], true));
|
$identity = self::getIdentityName(Mail\Account::identity_name($accObj,true, $GLOBALS['egw_info']['user']['account_id'], true));
|
||||||
// Open top level folders for active account
|
// Open top level folders for active account
|
||||||
@ -497,7 +499,7 @@ class mail_tree
|
|||||||
Tree::CHILDREN => array(), // dynamic loading on unfold
|
Tree::CHILDREN => array(), // dynamic loading on unfold
|
||||||
Tree::AUTOLOAD_CHILDREN => true,
|
Tree::AUTOLOAD_CHILDREN => true,
|
||||||
'parent' => '',
|
'parent' => '',
|
||||||
Tree::OPEN => $_openTopLevel?$_openTopLevel:$openActiveAccount,
|
Tree::OPEN => $_openTopLevel?:$openActiveAccount,
|
||||||
// mark on account if Sieve is enabled
|
// mark on account if Sieve is enabled
|
||||||
'data' => array(
|
'data' => array(
|
||||||
'sieve' => $accObj->imapServer()->acc_sieve_enabled,
|
'sieve' => $accObj->imapServer()->acc_sieve_enabled,
|
||||||
@ -506,6 +508,23 @@ class mail_tree
|
|||||||
),
|
),
|
||||||
Tree::NOCHECKBOX => $_noCheckbox
|
Tree::NOCHECKBOX => $_noCheckbox
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
catch (\Exception $ex) {
|
||||||
|
$baseNode = array(
|
||||||
|
Tree::ID => (string)$acc_id,
|
||||||
|
Tree::LABEL => lang('Error').': '.lang($ex->getMessage()),
|
||||||
|
Tree::TOOLTIP => '('.$acc_id.') '.htmlspecialchars_decode($params['acc_name']),
|
||||||
|
Tree::IMAGE_LEAF => self::$leafImages['folderAccount'],
|
||||||
|
Tree::IMAGE_FOLDER_OPEN => self::$leafImages['folderAccount'],
|
||||||
|
Tree::IMAGE_FOLDER_CLOSED => self::$leafImages['folderAccount'],
|
||||||
|
'path'=> array($acc_id),
|
||||||
|
Tree::CHILDREN => array(), // dynamic loading on unfold
|
||||||
|
Tree::AUTOLOAD_CHILDREN => false,
|
||||||
|
'parent' => '',
|
||||||
|
Tree::OPEN => false,
|
||||||
|
Tree::NOCHECKBOX => true
|
||||||
|
);
|
||||||
|
}
|
||||||
self::setOutStructure($baseNode, $roots,self::DELIMITER);
|
self::setOutStructure($baseNode, $roots,self::DELIMITER);
|
||||||
}
|
}
|
||||||
return $roots;
|
return $roots;
|
||||||
|
Loading…
Reference in New Issue
Block a user