Commit 6364659e authored by Jonny Bradley's avatar Jonny Bradley

[FIX] mobile: Modules and icons need caching separately for mobile

parent 1d57d954
......@@ -761,6 +761,9 @@ class ModLib extends TikiLib
$cachelib = TikiLib::lib('cache');
$cacheKey = 'module.' . $moduleName . $prefs['language'];
if ($prefs['mobile_feature'] === 'y') {
$cacheKey .= $prefs['mobile_mode'];
}
$info = $cachelib->getSerialized($cacheKey, 'module');
if ($info) {
......
......@@ -50,6 +50,9 @@ function smarty_function_icon($params, $smarty)
}
$serialized_params = serialize(array_merge($params, array($current_style, $current_style_option, isset($_SERVER['HTTPS']))));
if ($prefs['mobile_feature'] === 'y') {
$serialized_params .= $prefs['mobile_mode'];
}
$language = isset($prefs['language']) ? $prefs['language'] : 'en';
$cache_key = 'icons_' . $language . '_' . md5($serialized_params);
if ( $cached = $cachelib->getCached($cache_key) ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment