diff --git a/e107_admin/admin.php b/e107_admin/admin.php index c7e447362..188ae3661 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -206,7 +206,7 @@ class admin_start } - function checkPaths() + private function checkPaths() { $create_dir = array(e_MEDIA,e_SYSTEM,e_CACHE,e_CACHE_CONTENT,e_CACHE_IMAGE, e_CACHE_DB, e_LOG, e_BACKUP, e_CACHE_URL, e_TEMP, e_IMPORT); @@ -231,7 +231,7 @@ class admin_start - function checkTimezone() + private function checkTimezone() { $mes = e107::getMessage(); $timezone = e107::pref('core','timezone'); @@ -415,7 +415,7 @@ class admin_start - function checkWritable() + private function checkWritable() { $mes = e107::getMessage(); @@ -442,7 +442,7 @@ class admin_start - function checkHtmlarea() + private function checkHtmlarea() { $mes = e107::getMessage(); if (is_dir(e_ADMIN.'htmlarea') || is_dir(e_HANDLER.'htmlarea')) @@ -453,7 +453,7 @@ class admin_start - function checkIncompatiblePlugins() + private function checkIncompatiblePlugins() { $mes = e107::getMessage(); @@ -479,7 +479,7 @@ class admin_start } - function checkPasswordEncryption() + private function checkPasswordEncryption() { $us = e107::getUserSession(); $mes = e107::getMessage(); @@ -561,7 +561,7 @@ class admin_start } - function checkHtaccess() // upgrade scenario + private function checkHtaccess() // upgrade scenario { if(!file_exists(e_BASE.".htaccess") && file_exists(e_BASE."e107.htaccess")) { @@ -575,7 +575,7 @@ class admin_start - function checkFileTypes() + private function checkFileTypes() { $mes = e107::getMessage(); @@ -590,7 +590,7 @@ class admin_start - function checkSuspiciousFiles() + private function checkSuspiciousFiles() { $mes = e107::getMessage(); $public = array(e_UPLOAD, e_AVATAR_UPLOAD); diff --git a/e107_admin/theme.php b/e107_admin/theme.php index ab238b1c4..627824e9d 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -182,7 +182,8 @@ if($mode == 'download' && !empty($_GET['src'])) // Auto install? // $text = e107::getPlugin()->install($data['plugin_folder']); // $mes->addInfo($text); - echo $mes->render('default', 'success'); + echo $mes->render('default', 'success'); + e107::getTheme()->clearCache(); } else { diff --git a/e107_handlers/db_verify_class.php b/e107_handlers/db_verify_class.php index 3d96af966..6430b66bc 100644 --- a/e107_handlers/db_verify_class.php +++ b/e107_handlers/db_verify_class.php @@ -542,7 +542,7 @@ class db_verify function renderTableName($tabs) { - if(substr($tabs,0,4)=="lan_") + if(strpos($tabs,"lan_") === 0) { list($tmp,$lang,$table) = explode("_",$tabs,3); return $table. " (".ucfirst($lang).")"; @@ -776,7 +776,7 @@ class db_verify foreach($match[1] as $c=>$k) { - if(strpos($k,'e107_' === 0)) // remove prefix if found in sql dump. + if(strpos($k,'e107_') === 0) // remove prefix if found in sql dump. { $k = substr($k, 5); } diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index b251fd9c2..65a162eea 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -41,7 +41,8 @@ class e_theme ); - private static $cacheTime = 120; // 2 hours + const CACHETIME = 120; // 2 hours + const CACHETAG = "Meta_theme"; function __construct() @@ -50,6 +51,14 @@ class e_theme + } + + + public function clearCache() + { + + e107::getCache()->clear(self::CACHETAG, true); + } @@ -67,9 +76,8 @@ class e_theme $array = scandir(e_THEME); - $cacheTag = "Theme_meta"; - if($force === false && $tmp = e107::getCache()->retrieve($cacheTag, self::$cacheTime, true, true)) + if($force === false && $tmp = e107::getCache()->retrieve(self::CACHETAG, self::CACHETIME, true, true)) { return e107::unserialize($tmp); } @@ -100,7 +108,7 @@ class e_theme $cacheSet = e107::serialize($themeArray,'json'); - e107::getCache()->set($cacheTag,$cacheSet,true,true,true); + e107::getCache()->set(self::CACHETAG,$cacheSet,true,true,true); return $themeArray; }