1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Clear theme meta cache after installation.

This commit is contained in:
Cameron 2017-01-30 07:52:25 -08:00
parent a5087b9bdc
commit 630fd5fb57
4 changed files with 25 additions and 16 deletions

View File

@ -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);

View File

@ -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
{

View File

@ -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);
}

View File

@ -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;
}