From a9f8715248d3ec68850de6ccd686ad7e80a981b3 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 30 Jul 2014 10:53:30 -0400 Subject: [PATCH] Fix caching configuration objects --- plugins/libkolab/lib/kolab_storage_cache.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php index 53b93545..75728d1b 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; }