Branch 'roundcubemail-plugins-kolab-3.1' - plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Wed Oct 16 16:50:55 CEST 2013


 plugins/libkolab/lib/kolab_storage.php |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8c9a6f3f55ab4e89ddbc0d61b7cf6d1d2079a3b4
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Oct 16 16:50:17 2013 +0200

    Pad folder names with spaces to sort parent folders before their childs

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 »
+            $nsnames[$ns][$folder->name] = strtolower(html_entity_decode(self::object_name($folder->name, $ns), ENT_COMPAT, RCUBE_CHARSET)) . $pad;  // decode »
         }
 
         $names = array();




More information about the commits mailing list