mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-01 08:41:32 +01:00
fix not opened tree with new tree-code, if you have only one account and fix state-handling to also store ActiveProfileID pref for a single account
This commit is contained in:
parent
0354cfdf59
commit
9046881177
@ -282,10 +282,6 @@ class emailadmin_imapbase
|
|||||||
{
|
{
|
||||||
$oldProfileID = (int)$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
$oldProfileID = (int)$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$oldProfileID = emailadmin_account::get_default_acc_id();
|
|
||||||
}
|
|
||||||
if ($_testConnection)
|
if ($_testConnection)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -490,7 +490,7 @@ class mail_tree
|
|||||||
* fill the active accounts with its children.
|
* fill the active accounts with its children.
|
||||||
*
|
*
|
||||||
* @param string $_parent = null no parent node means root with the first level of folders
|
* @param string $_parent = null no parent node means root with the first level of folders
|
||||||
* @param string $_profileID = '' icServer id
|
* @param string $_profileID = '' active profile / acc_id
|
||||||
* @param int|boolean $_openTopLevel = 1 Open top level folders on load if it's set to 1|true,
|
* @param int|boolean $_openTopLevel = 1 Open top level folders on load if it's set to 1|true,
|
||||||
* false|0 leaves them in closed state
|
* false|0 leaves them in closed state
|
||||||
* @param boolean $_subscribedOnly = false get only subscribed folders
|
* @param boolean $_subscribedOnly = false get only subscribed folders
|
||||||
@ -499,12 +499,11 @@ class mail_tree
|
|||||||
*/
|
*/
|
||||||
function getInitialIndexTree ($_parent = null, $_profileID = '', $_openTopLevel = 1, $_subscribedOnly= false, $_allInOneGo = false)
|
function getInitialIndexTree ($_parent = null, $_profileID = '', $_openTopLevel = 1, $_subscribedOnly= false, $_allInOneGo = false)
|
||||||
{
|
{
|
||||||
$tree = $this->getTree($_parent, $_profileID, $_openTopLevel, false, $_subscribedOnly, $_allInOneGo);
|
$tree = $this->getTree($_parent, '', $_openTopLevel, false, $_subscribedOnly, $_allInOneGo);
|
||||||
$activeAccount = $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
$branches = $this->getTree($_profileID, $_profileID,1,false,$_subscribedOnly,$_allInOneGo);
|
||||||
$branches = $this->getTree($activeAccount, $activeAccount,1,false,$_subscribedOnly,$_allInOneGo);
|
|
||||||
foreach ($tree[tree::CHILDREN] as &$account)
|
foreach ($tree[tree::CHILDREN] as &$account)
|
||||||
{
|
{
|
||||||
if ($account[tree::ID] == $activeAccount)
|
if ($account[tree::ID] == $_profileID)
|
||||||
{
|
{
|
||||||
$account = $branches;
|
$account = $branches;
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ class mail_ui
|
|||||||
$content[self::$nm_index]['vacationrange'] = $sel_options[self::$nm_index]['vacationrange'] = '';
|
$content[self::$nm_index]['vacationrange'] = $sel_options[self::$nm_index]['vacationrange'] = '';
|
||||||
}
|
}
|
||||||
//$zstarttime = microtime (true);
|
//$zstarttime = microtime (true);
|
||||||
$sel_options[self::$nm_index]['foldertree'] = $this->mail_tree->getInitialIndexTree(null, null, null, true,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']);
|
$sel_options[self::$nm_index]['foldertree'] = $this->mail_tree->getInitialIndexTree(null, $this->mail_bo->profileID, null, true,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']);
|
||||||
//$zendtime = microtime(true) - $zstarttime;
|
//$zendtime = microtime(true) - $zstarttime;
|
||||||
//error_log(__METHOD__.__LINE__. " time used: ".$zendtime);
|
//error_log(__METHOD__.__LINE__. " time used: ".$zendtime);
|
||||||
$content[self::$nm_index]['selectedFolder'] = $this->mail_bo->profileID.self::$delimiter.(!empty($this->mail_bo->sessionData['mailbox'])?$this->mail_bo->sessionData['mailbox']:'INBOX');
|
$content[self::$nm_index]['selectedFolder'] = $this->mail_bo->profileID.self::$delimiter.(!empty($this->mail_bo->sessionData['mailbox'])?$this->mail_bo->sessionData['mailbox']:'INBOX');
|
||||||
|
Loading…
Reference in New Issue
Block a user