From 9ed072aad1f30862c2c5061f3d3027140d78834c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Sep 2007 21:04:06 +0000 Subject: [PATCH] =?UTF-8?q?Optimisation=20m=E9moire=20et=20ajout=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 4 ++-- htdocs/commonobject.class.php | 3 +-- htdocs/contact.class.php | 7 ++----- htdocs/index.php | 6 +++++- htdocs/main.inc.php | 7 ++++++- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index c99111c4e72..300f6440d6c 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -31,14 +31,14 @@ require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); -require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); /** \class Commande \brief Classe de gestion de commande */ -class Commande extends CommonObject +//class Commande extends CommonObject +class Commande { var $db ; var $element='commande'; diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index c71e2b7a121..c0691e48b1a 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -26,8 +26,6 @@ \version $Revision$ */ -require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); - /** \class CommonObject @@ -327,6 +325,7 @@ class CommonObject */ function fetch_contact($contactid) { + require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); $contact = new Contact($this->db); $result=$contact->fetch($contactid); $this->contact = $contact; diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index f2429148d20..4b826402121 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -30,9 +30,6 @@ \version $Revision$ */ -require_once (DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); - - /** \class Contact @@ -136,7 +133,7 @@ class Contact } /* - * \brief Mise à jour des infos + * \brief Mise à jour des infos en base * \param id Id du contact à mettre à jour * \param user Objet utilisateur qui effectue la mise à jour * \param notrigger 0=non, 1=oui @@ -536,7 +533,7 @@ class Contact } /* - * \brief Efface le contact de la base et éventuellement de l'annuaire LDAP + * \brief Efface le contact de la base * \param id id du contact a effacer * \return int <0 si ko, >0 si ok */ diff --git a/htdocs/index.php b/htdocs/index.php index fbabc244d0a..3fff3e5a38e 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -196,7 +196,9 @@ if ($user->societe_id == 0) DOL_URL_ROOT.'/compta/facture.php?mainmenu=accountancy', DOL_URL_ROOT.'/telephonie/ligne/index.php'); - // Boucle et affiche chaque ligne du tableau + //print memory_get_usage()."
"; + + // Boucle et affiche chaque ligne du tableau foreach ($keys as $key=>$val) { if ($conditions[$key]) @@ -217,6 +219,8 @@ if ($user->societe_id == 0) print ''.$titres[$key].''; print ''.$board->nb[$val].''; print ''; + + //print $includes[$key].' '.memory_get_usage()."
"; } } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d7a3abc2c13..5cea1c2d9e2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -954,7 +954,12 @@ function llxFooter($foot='',$limitIEbug=1) if (isset($_SERVER['DOL_TUNING'])) { $micro_end_time=dol_microtime_float(true); - print ''; + print ''; print "\n"; }