mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Additional checks for constants. Disable addon lookup cache in debug mode.
This commit is contained in:
@@ -258,7 +258,7 @@ class admin_start
|
|||||||
|
|
||||||
require(e_ADMIN."ver.php");
|
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);
|
e107::getConfig()->set('version', $e107info['e107_version'])->save(false,true,false);
|
||||||
|
|
||||||
|
@@ -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'))
|
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 */
|
/** @var admin_shortcodes $sc */
|
||||||
$sc = e107::getScBatch('admin');
|
$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($plugins);
|
||||||
$text .= $sc->renderAddonUpdate($themes);
|
$text .= $sc->renderAddonUpdate($themes);
|
||||||
|
|
||||||
|
|
||||||
if(empty($text))
|
if(empty($text))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
@@ -78,7 +80,10 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_G
|
|||||||
|
|
||||||
echo $ret;
|
echo $ret;
|
||||||
|
|
||||||
e107::getSession()->set('addons-update-status',$ret);
|
if(!E107_DEBUG_LEVEL)
|
||||||
|
{
|
||||||
|
e107::getSession()->set('addons-update-status',$ret);
|
||||||
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
@@ -61,6 +61,7 @@ if (isset($_POST['trigger_empty_cache']))
|
|||||||
case 'empty_syscache':
|
case 'empty_syscache':
|
||||||
e107::getCache()->clearAll('system');
|
e107::getCache()->clearAll('system');
|
||||||
e107::getLog()->flushMessages(CACLAN_16);
|
e107::getLog()->flushMessages(CACLAN_16);
|
||||||
|
e107::getSession()->clear('addons-update-status');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'empty_dbcache':
|
case 'empty_dbcache':
|
||||||
|
@@ -453,7 +453,7 @@ define("E_32_TRUE", "<i class='S32 e-true-32'></i>");
|
|||||||
define("ADMIN_GRID_ICON", "<i class='fa fa-th'></i>");
|
define("ADMIN_GRID_ICON", "<i class='fa fa-th'></i>");
|
||||||
define("ADMIN_LIST_ICON", "<i class='fa fa-th-list'></i>");
|
define("ADMIN_LIST_ICON", "<i class='fa fa-th-list'></i>");
|
||||||
|
|
||||||
if(THEME_STYLE === 'css/kadmin.css')
|
if(defset('THEME_STYLE') === 'css/kadmin.css')
|
||||||
{
|
{
|
||||||
|
|
||||||
define("ADMIN_EDIT_ICON", "<i class='fa fa-edit fa-2x fa-fw'></i>");
|
define("ADMIN_EDIT_ICON", "<i class='fa fa-edit fa-2x fa-fw'></i>");
|
||||||
|
@@ -2967,7 +2967,7 @@ class e107
|
|||||||
{
|
{
|
||||||
$ret = $legacy_override_path;
|
$ret = $legacy_override_path;
|
||||||
}
|
}
|
||||||
elseif(THEME_LEGACY === true && is_readable($core_path_legacy)) //v1 core template.
|
elseif(deftrue('THEME_LEGACY') && is_readable($core_path_legacy)) //v1 core template.
|
||||||
{
|
{
|
||||||
$ret = $core_path_legacy;
|
$ret = $core_path_legacy;
|
||||||
}
|
}
|
||||||
@@ -4199,7 +4199,7 @@ class e107
|
|||||||
//$GLOBALS['_E107'] - minimal mode - here because of the e_AJAX_REQUEST
|
//$GLOBALS['_E107'] - minimal mode - here because of the e_AJAX_REQUEST
|
||||||
if(isset($GLOBALS['_E107']['minimal']) || e_AJAX_REQUEST || deftrue('e_MINIMAL'))
|
if(isset($GLOBALS['_E107']['minimal']) || e_AJAX_REQUEST || deftrue('e_MINIMAL'))
|
||||||
{
|
{
|
||||||
$_e107vars = array('forceuserupdate', 'online', 'theme', 'menus', 'prunetmp');
|
$_e107vars = array('forceuserupdate', 'online', 'menus', 'prunetmp');
|
||||||
$GLOBALS['_E107']['minimal'] = true;
|
$GLOBALS['_E107']['minimal'] = true;
|
||||||
// lame but quick - allow online when ajax request only, additonal checks are made in e_online class
|
// lame but quick - allow online when ajax request only, additonal checks are made in e_online class
|
||||||
if(e_AJAX_REQUEST && !isset($GLOBALS['_E107']['online']) && !isset($GLOBALS['_E107']['minimal']))
|
if(e_AJAX_REQUEST && !isset($GLOBALS['_E107']['online']) && !isset($GLOBALS['_E107']['minimal']))
|
||||||
|
Reference in New Issue
Block a user