2 commits - plugins/kolab_folders

Aleksander Machniak machniak at kolabsys.com
Thu Oct 25 15:21:44 CEST 2012


 plugins/kolab_folders/kolab_folders.php      |   25 +++----------------------
 plugins/kolab_folders/localization/en_US.inc |    2 ++
 plugins/kolab_folders/localization/pl_PL.inc |    2 ++
 plugins/kolab_folders/package.xml            |    4 ++--
 4 files changed, 9 insertions(+), 24 deletions(-)

New commits:
commit 8eda2df71ea22d802d27b766228f8c52fbc50bc4
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Thu Oct 25 15:20:33 2012 +0200

    Simplified default folder selection - now when private/shared annotation
    is properly handled (.default is removed from shared) by kolab_storage functions

diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index 308d6d3..28d78bf 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -369,30 +369,11 @@ class kolab_folders extends rcube_plugin
             return null;
         }
 
-        $type     .= '.default';
-        $namespace = $storage->get_namespace();
-
         // get all folders of specified type
         $folderdata = array_map(array('kolab_storage', 'folder_select_metadata'), $folderdata);
-        $folderdata = array_intersect($folderdata, array($type));
-
-        foreach ($folderdata as $folder => $data) {
-            // check if folder is in personal namespace
-            foreach (array('shared', 'other') as $nskey) {
-                if (!empty($namespace[$nskey])) {
-                    foreach ($namespace[$nskey] as $ns) {
-                        if ($ns[0] && substr($folder, 0, strlen($ns[0])) == $ns[0]) {
-                            continue 3;
-                        }
-                    }
-                }
-            }
-
-            // There can be only one default folder of specified type
-            return $folder;
-        }
+        $folderdata = array_intersect($folderdata, array($type.'.default'));
 
-        return null;
+        return key($folderdata);
     }
 
     /**


commit 264504b9a30bede2f96ebecfef14ea42d906091a
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Thu Oct 25 15:13:59 2012 +0200

    Add localized labels for file and freebusy folder type

diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index ec7b9cd..308d6d3 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -26,7 +26,7 @@ class kolab_folders extends rcube_plugin
 {
     public $task = '?(?!login).*';
 
-    public $types = array('mail', 'event', 'journal', 'task', 'note', 'contact', 'configuration');
+    public $types = array('mail', 'event', 'journal', 'task', 'note', 'contact', 'configuration', 'file', 'freebusy');
     public $mail_types = array('inbox', 'drafts', 'sentitems', 'outbox', 'wastebasket', 'junkemail');
 
     private $rc;
diff --git a/plugins/kolab_folders/localization/en_US.inc b/plugins/kolab_folders/localization/en_US.inc
index 70867bc..856f59d 100644
--- a/plugins/kolab_folders/localization/en_US.inc
+++ b/plugins/kolab_folders/localization/en_US.inc
@@ -10,6 +10,8 @@ $labels['foldertypetask'] = 'Tasks';
 $labels['foldertypenote'] = 'Notes';
 $labels['foldertypecontact'] = 'Contacts';
 $labels['foldertypeconfiguration'] = 'Configuration';
+$labels['foldertypefile'] = 'Files';
+$labels['foldertypefreebusy'] = 'Free-Busy';
 
 $labels['default'] = 'Default';
 $labels['inbox'] = 'Inbox';
diff --git a/plugins/kolab_folders/localization/pl_PL.inc b/plugins/kolab_folders/localization/pl_PL.inc
index 95177cd..4520dac 100644
--- a/plugins/kolab_folders/localization/pl_PL.inc
+++ b/plugins/kolab_folders/localization/pl_PL.inc
@@ -9,6 +9,8 @@ $labels['foldertypetask'] = 'Zadania';
 $labels['foldertypenote'] = 'Notatki';
 $labels['foldertypecontact'] = 'Kontakty';
 $labels['foldertypeconfiguration'] = 'Konfiguracja';
+$labels['foldertypefile'] = 'Pliki';
+$labels['foldertypefreebusy'] = 'Free-Busy';
 $labels['default'] = 'Domyślny';
 $labels['inbox'] = 'Odebrane';
 $labels['drafts'] = 'Szkice';
diff --git a/plugins/kolab_folders/package.xml b/plugins/kolab_folders/package.xml
index 875d614..b40acab 100644
--- a/plugins/kolab_folders/package.xml
+++ b/plugins/kolab_folders/package.xml
@@ -21,9 +21,9 @@
 		<email>machniak at kolabsys.com</email>
 		<active>yes</active>
 	</lead>
-	<date>2012-05-14</date>
+	<date>2012-10.25</date>
 	<version>
-		<release>2.0</release>
+		<release>2.1</release>
 		<api>2.0</api>
 	</version>
 	<stability>





More information about the commits mailing list