From 67646d352ac0fbfb57fe3ee87e691cc4fb027f2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 May 2007 20:07:18 +0000 Subject: [PATCH] Fonction affichage tuning compatible PHP4 --- htdocs/main.inc.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 11d32203e04..7fc82deedfa 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -30,10 +30,6 @@ \version $Revision$ */ -// Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING -// est positionne A appeler avant tout. -if (isset($_SERVER['DOL_TUNING'])) $micro_start_time=microtime(true); - // Forcage du parametrage PHP magic_quotes_gpc et nettoyage des parametres // (Sinon il faudrait a chaque POST, conditionner // la lecture de variable par stripslashes selon etat de get_magic_quotes). @@ -345,10 +341,8 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) $result=$user->fetch($login); if ($result <= 0) { - //$langs->load('main'); - //dolibarr_print_error($db,$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login)); - dolibarr_syslog('User not found, connexion refused'); session_destroy(); + dolibarr_syslog('User not found, connexion refused'); // On repart sur page accueil session_name($sessionname); @@ -520,14 +514,18 @@ else /** - * \brief Affiche en-tete html + * \brief Affiche en-tete HTML * \param head lignes d'en-tete head * \param title titre page web * \param target target du menu Accueil */ function top_htmlhead($head, $title="", $target="") { - global $user, $conf, $langs, $db; + global $user, $conf, $langs, $db, $micro_start_time; + + // Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING + // est positionne A appeler avant tout. + if (isset($_SERVER['DOL_TUNING'])) $micro_start_time=dol_microtime_float(true); if (! $conf->css) $conf->css ='/theme/eldy/eldy.css.php'; @@ -595,7 +593,7 @@ function top_htmlhead($head, $title="", $target="") } /** - * \brief Affiche en-tete html + la barre de menu superieure + * \brief Affiche en-tete HTML + BODY + Barre de menu superieure * \param head lignes d'en-tete head * \param title titre page web * \param target target du menu Accueil @@ -803,7 +801,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$ /** - * \brief Impression du pied de page + * \brief Impression du pied de page DIV + BODY + HTML * \remarks Ferme 2 div * \param foot Non utilise */ @@ -817,7 +815,8 @@ function llxFooter($foot='',$limitIEbug=1) if (isset($_SERVER['DOL_TUNING'])) { - print ''; + $micro_end_time=dol_microtime_float(true); + print ''; print "\n"; }