summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-10-16 14:50:17 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-10-16 14:50:17 (GMT)
commit8c9a6f3f55ab4e89ddbc0d61b7cf6d1d2079a3b4 (patch)
tree6d6b7100bf8309d85da599341dcc436131bfc6eb /plugins
parent09a557f97fb3e91a2dcbd7c075862719a724088c (diff)
downloadroundcubemail-plugins-kolab-8c9a6f3f55ab4e89ddbc0d61b7cf6d1d2079a3b4.tar.gz
Pad folder names with spaces to sort parent folders before their childs
Diffstat (limited to 'plugins')
-rw-r--r--plugins/libkolab/lib/kolab_storage.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
index 23d273b..414e5a3 100644
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -677,11 +677,12 @@ class kolab_storage
*/
public static function sort_folders($folders)
{
+ $pad = ' ';
$nsnames = array('personal' => array(), 'shared' => array(), 'other' => array());
foreach ($folders as $folder) {
$folders[$folder->name] = $folder;
$ns = $folder->get_namespace();
- $nsnames[$ns][$folder->name] = strtolower(html_entity_decode(self::object_name($folder->name, $ns), ENT_COMPAT, RCUBE_CHARSET)); // decode &raquo;
+ $nsnames[$ns][$folder->name] = strtolower(html_entity_decode(self::object_name($folder->name, $ns), ENT_COMPAT, RCUBE_CHARSET)) . $pad; // decode &raquo;
}
$names = array();