mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-17 03:19:23 +01:00
Fix ordering of none auto folders in mail tree
This commit is contained in:
parent
1a4705ca5c
commit
83d34d2a2f
@ -2722,6 +2722,10 @@ class emailadmin_imapbase
|
|||||||
}
|
}
|
||||||
if (is_array($aFolders)) uasort ($aFolders, array($this,'sortByAutofolder'));
|
if (is_array($aFolders)) uasort ($aFolders, array($this,'sortByAutofolder'));
|
||||||
ksort($aFolders);
|
ksort($aFolders);
|
||||||
|
|
||||||
|
// Sort none auto folders base on mailbox name
|
||||||
|
uasort($nFolders,array($this,'sortByMailbox'));
|
||||||
|
|
||||||
$subFolders = array_merge($aFolders,$nFolders);
|
$subFolders = array_merge($aFolders,$nFolders);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2822,23 +2826,20 @@ class emailadmin_imapbase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sortByName
|
* sortByMailbox
|
||||||
*
|
*
|
||||||
* Helper function to sort folders array by name
|
* Helper function to sort folders array by mailbox
|
||||||
* @param array $a
|
* @param array $a
|
||||||
* @param array $b array of folders
|
* @param array $b array of folders
|
||||||
* @return int expect values (0, 1 or -1)
|
* @return int expect values (0, 1 or -1)
|
||||||
*/
|
*/
|
||||||
function sortByName($a,$b)
|
function sortByMailbox($a,$b)
|
||||||
{
|
{
|
||||||
$a = mail_tree::pathToFolderData($a['MAILBOX'], $a['delimiter']);
|
return strcasecmp($a['MAILBOX'],$b['MAILBOX']);
|
||||||
$b = mail_tree::pathToFolderData($b['MAILBOX'], $b['delimiter']);
|
|
||||||
// 0, 1 und -1
|
|
||||||
return strcasecmp($a['name'],$b['name']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sortByAutoFolderPos
|
* sortByAutoFolder
|
||||||
*
|
*
|
||||||
* Helper function to sort folder-objects by auto Folder Position
|
* Helper function to sort folder-objects by auto Folder Position
|
||||||
* @param array $a
|
* @param array $a
|
||||||
|
Loading…
Reference in New Issue
Block a user