summaryrefslogtreecommitdiff
path: root/plugins/libkolab/lib/kolab_storage_config.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-26 10:03:11 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-26 10:03:11 (GMT)
commit54b6eb66decf1828c8217db6e2b90bcf16c49eb9 (patch)
tree6db29e61636826a01ec5ec737a8c122b5429cf20 /plugins/libkolab/lib/kolab_storage_config.php
parent43d3f854482b257fdbf364e59dacdc4609b92557 (diff)
downloadroundcubemail-plugins-kolab-54b6eb66decf1828c8217db6e2b90bcf16c49eb9.tar.gz
Post-filter all tag objects (in case caching is disabled); improve kolab_storage_cache for the case caching is off
Diffstat (limited to 'plugins/libkolab/lib/kolab_storage_config.php')
-rw-r--r--plugins/libkolab/lib/kolab_storage_config.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_config.php b/plugins/libkolab/lib/kolab_storage_config.php
index 9bc5d50..8a0fab5 100644
--- a/plugins/libkolab/lib/kolab_storage_config.php
+++ b/plugins/libkolab/lib/kolab_storage_config.php
@@ -125,6 +125,7 @@ class kolab_storage_config
}
foreach ($folder->select($filter) as $object) {
+ unset($object['_formatobj']);
$list[] = $object;
}
}
@@ -626,20 +627,24 @@ class kolab_storage_config
// use faster method
if ($uid && $uid != '*') {
$filter[] = array('member', '=', $uid);
- return $this->get_objects($filter, $default);
+ $tags = $this->get_objects($filter, $default);
}
-
- $this->tags = $this->get_objects($filter, $default);
+ else {
+ $this->tags = $tags = $this->get_objects($filter, $default);
+ }
+ }
+ else {
+ $tags = $this->tags;
}
if ($uid === '*') {
- return $this->tags;
+ return $tags;
}
$result = array();
$search = self::build_member_url($uid);
- foreach ($this->tags as $tag) {
+ foreach ($tags as $tag) {
if (in_array($search, (array) $tag['members'])) {
$result[] = $tag;
}