From d38f72f50aec3a0a1a7f4eb5076413145d1bfafe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Mar 2010 01:18:25 +0000 Subject: [PATCH] Fix: Fix regression after removing pre.inc.php --- htdocs/main.inc.php | 113 +++++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8b99a498970..082804512df 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -894,7 +894,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } } - + if ($conf->global->MAIN_USE_JQUERY) { print ''."\n"; @@ -902,7 +902,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; } - + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; @@ -942,7 +942,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // PWC js print ''."\n"; } - + if ($conf->global->MAIN_USE_JQUERY) { print ''."\n"; @@ -1227,65 +1227,68 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$ * \remarks Close 2 div * \param foot A text to add in HTML generated page */ -function llxFooter($foot='') +if (! function_exists("llxFooter")) { - global $conf, $dolibarr_auto_user, $micro_start_time; - - print "\n\n".' '."\n"; - - // print "\n".' '."\n"; - print "\n".' '."\n"; - - if (! empty($_SERVER['DOL_TUNING'])) + function llxFooter($foot='') { - $micro_end_time=dol_microtime_float(true); - print "\n".''."\n"; + global $conf, $dolibarr_auto_user, $micro_start_time; - // Add Xdebug coverage of code - if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); } - } + print "\n\n".' '."\n"; - if ($conf->use_javascript_ajax) - { - print ''."\n"; - } + // print "\n".' '."\n"; + print "\n".' '."\n"; + + if (! empty($_SERVER['DOL_TUNING'])) + { + $micro_end_time=dol_microtime_float(true); + print "\n".''."\n"; + + // Add Xdebug coverage of code + if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); } + } + + if ($conf->use_javascript_ajax) + { + print ''."\n"; + } + + // If there is some logs in buffer to show + if (sizeof($conf->logbuffer)) + { + print "\n"; + print "\n"; + } - // If there is some logs in buffer to show - if (sizeof($conf->logbuffer)) - { print "\n"; - print "\n"; + if ($foot) print ''."\n"; + + if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n"; + + print "\n"; + print "\n"; } - - print "\n"; - if ($foot) print ''."\n"; - - if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n"; - - print "\n"; - print "\n"; } ?>