mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fixes #4459 $HEADER and $FOOTER within a class/method when old themes in use. Disable BS5 in admin area
This commit is contained in:
@@ -27,11 +27,11 @@ define('e_CAPTCHA_FONTCOLOR','#F9A533');
|
|||||||
// Required for a clean v1.x -> v2 upgrade.
|
// Required for a clean v1.x -> v2 upgrade.
|
||||||
$core = e107::getConfig();
|
$core = e107::getConfig();
|
||||||
$adminTheme = $core->get('admintheme');
|
$adminTheme = $core->get('admintheme');
|
||||||
if($adminTheme !== 'bootstrap3' && $adminTheme !== 'bootstrap5')
|
if($adminTheme !== 'bootstrap3'/* && $adminTheme !== 'bootstrap5'*/)
|
||||||
{
|
{
|
||||||
$core->update('admintheme','bootstrap3');
|
$core->update('admintheme','bootstrap3');
|
||||||
$core->update('adminstyle','infopanel');
|
$core->update('adminstyle','infopanel');
|
||||||
$core->update('admincss','css/bootstrap-dark.min.css');
|
$core->update('admincss','css/modern-light.css');
|
||||||
$core->set('e_jslib_core',array('prototype' => 'none', 'jquery'=> 'auto'));
|
$core->set('e_jslib_core',array('prototype' => 'none', 'jquery'=> 'auto'));
|
||||||
$core->save();
|
$core->save();
|
||||||
e107::getRedirect()->redirect(e_SELF);
|
e107::getRedirect()->redirect(e_SELF);
|
||||||
|
@@ -592,6 +592,18 @@ echo "</head>\n";
|
|||||||
echo "<div class='alert alert-danger'>Required class <b>theme</b> is missing. See <b>".e_THEME."bootstrap3/theme.php</b> for an example.</div>";
|
echo "<div class='alert alert-danger'>Required class <b>theme</b> is missing. See <b>".e_THEME."bootstrap3/theme.php</b> for an example.</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else // Legacy Theme.
|
||||||
|
{
|
||||||
|
$legacyGlobals = ['HEADER','FOOTER', 'LAYOUT', 'CUSTOMHEADER', 'CUSTOMFOOTER'];
|
||||||
|
foreach($legacyGlobals as $lg)
|
||||||
|
{
|
||||||
|
if(isset($GLOBALS[$lg]))
|
||||||
|
{
|
||||||
|
$$lg = $GLOBALS[$lg];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
|
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
|
||||||
|
Reference in New Issue
Block a user