mirror of
https://github.com/e107inc/e107.git
synced 2025-08-22 06:03:27 +02:00
header/footer code cleanup
This commit is contained in:
@@ -20,13 +20,10 @@ $In_e107_Footer = TRUE; // For registered shutdown function
|
||||
|
||||
$magicSC = e107::getRender()->getMagicShortcodes(); // support for {---TITLE---} etc.
|
||||
|
||||
|
||||
global $error_handler,$db_time,$FOOTER;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// System browser CACHE control - defaults to no cache; override in e107_config or on the fly
|
||||
// This is temporary solution, we'll implement more flexible way for cache control override
|
||||
// per page, more investigation needed about cache related headers, browser quirks etc
|
||||
@@ -71,7 +68,7 @@ if (varset($e107_popup) != 1)
|
||||
//
|
||||
if(!deftrue('e_IFRAME'))
|
||||
{
|
||||
parseheader((varset($ph) ? $cust_footer : $FOOTER));
|
||||
parseheader($FOOTER);
|
||||
}
|
||||
|
||||
$eTimingStop = microtime();
|
||||
@@ -91,7 +88,7 @@ if (varset($e107_popup) != 1)
|
||||
$logLine .= "'".($now = time())."','".gmstrftime('%y-%m-%d %H:%M:%S', $now)."','".e107::getIPHandler()->getIP(FALSE)."','".e_PAGE.'?'.e_QUERY."','".$rendertime."','".$db_time."','".$queryCount."','".$memuse."','".$_SERVER['HTTP_USER_AGENT']."','{$_SERVER["REQUEST_METHOD"]}'";
|
||||
}
|
||||
|
||||
if (function_exists('getrusage'))
|
||||
if (function_exists('getrusage') && !empty($eTimingStartCPU))
|
||||
{
|
||||
$ru = getrusage();
|
||||
$cpuUTime = $ru['ru_utime.tv_sec'] + ($ru['ru_utime.tv_usec'] * 1e-6);
|
||||
@@ -135,11 +132,11 @@ if (varset($e107_popup) != 1)
|
||||
{
|
||||
$rinfo .= CORE_LAN16.$memuse;
|
||||
}
|
||||
if (isset($pref['displaycacheinfo']) && $pref['displaycacheinfo'])
|
||||
/* if (isset($pref['displaycacheinfo']) && $pref['displaycacheinfo'])
|
||||
{
|
||||
// $rinfo .= $cachestring.".";
|
||||
$rinfo .= $cachestring.".";
|
||||
}
|
||||
|
||||
*/
|
||||
if ($pref['log_page_accesses'])
|
||||
{
|
||||
// Need to log the page info to a text file as CSV data
|
||||
@@ -314,7 +311,7 @@ if(deftrue('e_DEVELOPER'))
|
||||
{
|
||||
echo "\n\n<!-- ======= [JSManager] FOOTER: Remaining CSS ======= -->";
|
||||
}
|
||||
$CSSORDER = deftrue('CSSORDER') ? explode(",",CSSORDER) : array('library','other','core','plugin','theme'); // INLINE CSS in Body not supported by HTML5. .
|
||||
$CSSORDER = defined('CSSORDER') && deftrue('CSSORDER') ? explode(",",CSSORDER) : array('library','other','core','plugin','theme'); // INLINE CSS in Body not supported by HTML5. .
|
||||
|
||||
foreach($CSSORDER as $val)
|
||||
{
|
||||
@@ -394,7 +391,7 @@ if (!empty($pref['e_output_list']) && is_array($pref['e_output_list']))
|
||||
if(is_readable($fname))
|
||||
{
|
||||
|
||||
$ret = ($e107_debug || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname);
|
||||
$ret = (!empty($e107_debug) || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname);
|
||||
}
|
||||
}
|
||||
unset($ret);
|
||||
@@ -409,9 +406,6 @@ if (!empty($pref['e_output_list']) && is_array($pref['e_output_list']))
|
||||
|
||||
$search = array_keys($magicSC);
|
||||
$replace = array_values($magicSC);
|
||||
$bread = e107::breadcrumb();
|
||||
$search[] = '{---BREADCRUMB---}';
|
||||
$replace[] = e107::getForm()->breadcrumb($bread);
|
||||
|
||||
// New - see class2.php
|
||||
$ehd = new e_http_header;
|
||||
@@ -435,4 +429,5 @@ e107::getSession()->shutdown(); // moved from the top of footer_default.php to f
|
||||
// Shutdown
|
||||
$e107->destruct();
|
||||
$e107_Clean_Exit=true; // For registered shutdown function -- let it know all is well!
|
||||
?>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user