From 44b6f5ff78eec38516d82d3f68abfd5b582fb373 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 26 Feb 2015 15:47:40 +0000 Subject: [PATCH] Fix for custom icons going missing by only caching for the session if no access to VFS --- phpgwapi/inc/class.common.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index b69e6a81bd..6e8232f5ad 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -925,8 +925,14 @@ class common } } } + else if ($dir) + { + // No access to the VFS, don't cache for everyone or custom icons + // will be missing. Just cache for current session. + $cache_level = egw_cache::SESSION; + } //error_log(__METHOD__."('$template_set') took ".(microtime(true)-$starttime).' secs'); - egw_cache::setInstance(__CLASS__, $cache_name, $map, 86400); // cache for one day + egw_cache::setCache($cache_level,__CLASS__, $cache_name, $map, 86400); // cache for one day //echo "

template_set=".array2string($template_set)."

\n"; _debug_array($map); return $map; }