From ad7efe78a995e7de5c13e6138f843b881b23029e Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 27 Jan 2017 13:50:44 -0800 Subject: [PATCH] Correct library cache file name. --- e107_handlers/e107_class.php | 2 +- e107_handlers/e_parse_class.php | 2 +- e107_handlers/library_manager.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 81dbc1c4c..fcd1a084d 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -1824,7 +1824,7 @@ class e107 * * @return e_library_manager */ - private static function getLibrary() + public static function getLibrary() { return self::getSingleton('e_library_manager', true); } diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 090ba4fbe..8e4f56bd5 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4514,7 +4514,7 @@ return; /** * Filters/Validates using the PHP5 filter_var() method. * @param $text - * @param $type string str|int|email|url|w|wds + * @param $type string str|int|email|url|w|wds|file * @return string | boolean | array */ function filter($text, $type='str',$validate=false) diff --git a/e107_handlers/library_manager.php b/e107_handlers/library_manager.php index abc1af423..da5b6caec 100644 --- a/e107_handlers/library_manager.php +++ b/e107_handlers/library_manager.php @@ -832,7 +832,7 @@ class e_library_manager if(!isset($loaded[$name])) { $cache = e107::getCache(); - $cacheID = 'library_manager_' . md5($name); + $cacheID = 'Library_' . e107::getParser()->filter($name,'file'); $cached = $cache->retrieve($cacheID, false, true, true); if($cached) @@ -843,8 +843,8 @@ class e_library_manager if(!varset($library, false)) { $library = $this->detect($name); - $cacheData = serialize($library); - $cache->set($cacheID, $cacheData, true, false, true); + $cacheData = e107::serialize($library,'json'); + $cache->set($cacheID, $cacheData, true, true, true); } // Exit early if the library was not found.