1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 21:32:09 +02:00

Additional checks for constants. Disable addon lookup cache in debug mode.

This commit is contained in:
Cameron
2021-01-05 10:04:26 -08:00
parent 7dec5cf40e
commit 741d91a76b
5 changed files with 13 additions and 7 deletions

View File

@@ -258,7 +258,7 @@ class admin_start
require(e_ADMIN."ver.php");
if(!empty($e107info['e107_version']) && (e_VERSION !== $e107info['e107_version']))
if(!empty($e107info['e107_version']) && defined('e_VERSION') && (e_VERSION !== $e107info['e107_version']))
{
e107::getConfig()->set('version', $e107info['e107_version'])->save(false,true,false);

View File

@@ -52,7 +52,10 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'core' && ($_GET
if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_GET['type'] == 'update'))
{
e107::getSession()->set('addons-update-checked',true);
if(!E107_DEBUG_LEVEL)
{
e107::getSession()->set('addons-update-checked',true);
}
/** @var admin_shortcodes $sc */
$sc = e107::getScBatch('admin');
@@ -63,7 +66,6 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_G
$text = $sc->renderAddonUpdate($plugins);
$text .= $sc->renderAddonUpdate($themes);
if(empty($text))
{
exit;
@@ -78,7 +80,10 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_G
echo $ret;
e107::getSession()->set('addons-update-status',$ret);
if(!E107_DEBUG_LEVEL)
{
e107::getSession()->set('addons-update-status',$ret);
}
exit;

View File

@@ -61,6 +61,7 @@ if (isset($_POST['trigger_empty_cache']))
case 'empty_syscache':
e107::getCache()->clearAll('system');
e107::getLog()->flushMessages(CACLAN_16);
e107::getSession()->clear('addons-update-status');
break;
case 'empty_dbcache':