plugins/libkolab

Aleksander Machniak machniak at kolabsys.com
Wed Jul 30 16:53:53 CEST 2014


 plugins/libkolab/lib/kolab_storage_cache.php |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit a9f8715248d3ec68850de6ccd686ad7e80a981b3
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Wed Jul 30 10:53:30 2014 -0400

    Fix caching configuration objects

diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index 53b9354..75728d1 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -761,12 +761,15 @@ class kolab_storage_cache
             }
         }
 
+        $object_type = $sql_arr['type'] ?: $this->folder->type;
+        $format_type = $this->folder->type == 'configuration' ? 'configuration' : $object_type;
+
         // add meta data
-        $object['_type']      = $sql_arr['type'] ?: $this->folder->type;
+        $object['_type']      = $object_type;
         $object['_msguid']    = $sql_arr['msguid'];
         $object['_mailbox']   = $this->folder->name;
         $object['_size']      = strlen($sql_arr['xml']);
-        $object['_formatobj'] = kolab_format::factory($object['_type'], 3.0, $sql_arr['xml']);
+        $object['_formatobj'] = kolab_format::factory($format_type, 3.0, $sql_arr['xml']);
 
         return $object;
     }




More information about the commits mailing list