Mail tree phase2 W.I.P.:

-Fix displaying wrong icon for user defined folders
-Fix sorting autofolders
This commit is contained in:
Hadi Nategh 2015-08-04 15:50:28 +00:00
parent aac0a279fb
commit 6e440bd0ba

View File

@ -388,14 +388,14 @@ class mail_tree
} }
// User defined folders may get different icons // User defined folders may get different icons
// plus they need to be translated too // plus they need to be translated too
elseif (array_search($data['folderarray']['MAILBOX'], $definedFolders, true) !== false) elseif (($key = array_search($data['folderarray']['MAILBOX'], $definedFolders, true)) !== false)
{ {
$data[tree::LABEL] = lang($folderName); $data[tree::LABEL] = lang($key);
$data[tree::TOOLTIP] = lang($folderName); $data[tree::TOOLTIP] = lang($key);
//User defined folders icons //User defined folders icons
$data[tree::IMAGE_LEAF] = $data[tree::IMAGE_LEAF] =
$data[tree::IMAGE_FOLDER_OPEN] = $data[tree::IMAGE_FOLDER_OPEN] =
$data [tree::IMAGE_FOLDER_CLOSED] = "MailFolder".$folderName.".png"; $data [tree::IMAGE_FOLDER_CLOSED] = "MailFolder".$key.".png";
} }
elseif(stripos(array2string($data['folderarray']['attributes']),'\noselect')!== false) elseif(stripos(array2string($data['folderarray']['attributes']),'\noselect')!== false)
{ {