Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118045946
D2143.1775595563.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D2143.1775595563.diff
View Options
diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -47,7 +47,6 @@
private static $with_tempsubs = true;
private static $subscriptions;
private static $ldapcache = array();
- private static $typedata = array();
private static $ldap = array();
private static $states;
private static $config;
@@ -869,7 +868,8 @@
return array();
}
- // In some conditions we can skip LIST command (?)
+ // If we only want groupware folders and don't care about the subscription state,
+ // then the metadata will already contain all folder names and we can avoid the LIST below.
if (!$subscribed && $filter != 'mail' && $prefix == '*') {
foreach ($folderdata as $folder => $type) {
if (!preg_match($regexp, $type)) {
@@ -1106,11 +1106,6 @@
return false;
}
- // return cached result
- if (is_array(self::$typedata[$prefix])) {
- return self::$typedata[$prefix];
- }
-
$type_keys = array(self::CTYPE_KEY, self::CTYPE_KEY_PRIVATE);
// fetch metadata from *some* folders only
@@ -1153,10 +1148,7 @@
return false;
}
- // keep list in memory
- self::$typedata[$prefix] = array_map(array('kolab_storage', 'folder_select_metadata'), $folderdata);
-
- return self::$typedata[$prefix];
+ return array_map(array('kolab_storage', 'folder_select_metadata'), $folderdata);
}
/**
@@ -1185,13 +1177,6 @@
{
self::setup();
- // return in-memory cached result
- foreach (self::$typedata as $typedata) {
- if (array_key_exists($folder, $typedata)) {
- return $typedata[$folder];
- }
- }
-
$metadata = self::$imap->get_metadata($folder, array(self::CTYPE_KEY, self::CTYPE_KEY_PRIVATE));
if (!is_array($metadata)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 8:59 PM (9 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18798702
Default Alt Text
D2143.1775595563.diff (2 KB)
Attached To
Mode
D2143: Remove folder typedata in-memory cache
Attached
Detach File
Event Timeline