1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-13 11:06:20 +02:00

Use e107::getFolder() for $ADMIN_DIRECTORY.

This commit is contained in:
Cameron
2021-01-16 16:13:48 -08:00
parent b927997759
commit 4c32e60bad
3 changed files with 11 additions and 12 deletions

View File

@ -17,7 +17,9 @@ if (!defined('e107_INIT'))
{ {
exit; exit;
} }
$In_e107_Footer = TRUE; // For registered shutdown function
$GLOBALS['E107_IN_FOOTER'] = true; // For registered shutdown function
global $error_handler,$db_time,$ADMIN_FOOTER; global $error_handler,$db_time,$ADMIN_FOOTER;
@ -414,7 +416,7 @@ $page = $ehd->getOutput();
// real output // real output
echo $page; echo $page;
unset($In_e107_Footer); $GLOBALS['E107_IN_FOOTER'] = false;
// Clean session shutdown // Clean session shutdown

View File

@ -16,7 +16,7 @@ if (!defined('e107_INIT'))
{ {
exit; exit;
} }
$In_e107_Footer = TRUE; // For registered shutdown function $GLOBALS['E107_IN_FOOTER'] = true; // For registered shutdown function
$magicSC = e107::getRender()->getMagicShortcodes(); // support for {---TITLE---} etc. $magicSC = e107::getRender()->getMagicShortcodes(); // support for {---TITLE---} etc.
@ -437,7 +437,7 @@ echo $page;
unset($In_e107_Footer); $GLOBALS['E107_IN_FOOTER'] = false;
// Clean session shutdown // Clean session shutdown

View File

@ -1145,19 +1145,18 @@
} }
global $error_handler, $In_e107_Footer, $ADMIN_DIRECTORY; global $error_handler;
// $ADMIN_DIRECTORY = e107::getFolder('admin');
if(!empty($GLOBALS['E107_CLEAN_EXIT'])) if(!empty($GLOBALS['E107_CLEAN_EXIT']))
{ {
return; return;
} }
if(!isset($In_e107_Footer)) if(empty($GLOBALS['E107_IN_FOOTER']))
{ {
$ADMIN_DIRECTORY = e107::getFolder('admin');
if(deftrue('ADMIN_AREA')) if(deftrue('ADMIN_AREA'))
{ {
$filewanted = realpath(__DIR__) . '/../' . $ADMIN_DIRECTORY . 'footer.php'; $filewanted = realpath(__DIR__) . '/../' . $ADMIN_DIRECTORY . 'footer.php';
@ -1177,8 +1176,6 @@
return; return;
} }
// echo isset($In_e107_Footer) ? "In footer" : "In startup".'<br />';
while(ob_get_level() > 0) while(ob_get_level() > 0)
{ {
ob_end_flush(); ob_end_flush();