From 9d2da43dab8c452cc3c71a367df4c8f275af1cc7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Sep 2007 14:35:44 +0000 Subject: [PATCH] =?UTF-8?q?Le=20chargement=20de=20dict=20se=20fait=20au=20?= =?UTF-8?q?meme=20niveau=20que=20main.=20Les=202=20fichiers=20=E9tant=20ut?= =?UTF-8?q?ilis=E9s=20par=20la=20plupart=20des=20pages,=20sont=20sytematiq?= =?UTF-8?q?uement=20charges.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/dict.php | 1 - htdocs/compta/facture/impayees.php | 1 - htdocs/fourn/facture/impayees.php | 1 - htdocs/lib/datepicker.php | 1 - htdocs/main.inc.php | 135 ++++++++++++++--------------- htdocs/product.class.php | 2 - 6 files changed, 67 insertions(+), 74 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 73d1c9be4a8..d076e35f987 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -31,7 +31,6 @@ require("./pre.inc.php"); -$langs->load("main"); $langs->load("other"); $langs->load("admin"); $langs->load("companies"); diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 0b1c46eff97..e9694f720b9 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -38,7 +38,6 @@ $user->getrights('banque'); if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne $langs->load("bills"); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 9cdb3ed50e2..118905daa04 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -38,7 +38,6 @@ $user->getrights('banque'); if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne $langs->load("companies"); $langs->load("bills"); diff --git a/htdocs/lib/datepicker.php b/htdocs/lib/datepicker.php index fbc79b65e4d..691410996a9 100644 --- a/htdocs/lib/datepicker.php +++ b/htdocs/lib/datepicker.php @@ -71,7 +71,6 @@ function xyzToUnixTimestamp($mysqldate){ function displayBox($selectedDate,$month,$year){ global $dolibarr_main_url_root,$langs,$conf; - $langs->load("main"); //print "$selectedDate,$month,$year"; $thedate=dolibarr_mktime(0,0,0,$month,1,$year); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bb4cecb1168..d7a3abc2c13 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -577,8 +577,9 @@ if (! defined('MAIN_INFO_SOCIETE_PAYS')) define('MAIN_INFO_SOCIETE_PAYS','1'); } -// On charge le fichier lang principal +// On charge les fichiers lang principaux $langs->load("main"); +$langs->load("dict"); /* * @@ -625,90 +626,88 @@ else */ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0) { - global $user, $conf, $langs, $db, $micro_start_time; - - $langs->load("dict"); - + 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'; - //header("Content-type: text/html; charset=UTF-8"); - header("Content-type: text/html; charset=".$conf->character_set_client); + //header("Content-type: text/html; charset=UTF-8"); + header("Content-type: text/html; charset=".$conf->character_set_client); - print ''; + print ''; //print ''; - print "\n"; + print "\n"; print "\n"; if ($disablehead == 0) { print "\n"; - - print $langs->lang_header(); - print $head; + + print $langs->lang_header(); + print $head; - // Affiche meta - print ''."\n"; // Evite indexation par robots - print ''."\n"; + // Affiche meta + print ''."\n"; // Evite indexation par robots + print ''."\n"; - // Affiche title - if ($title) - { - print 'Dolibarr - '.$title.''; - } - else - { - if (defined("MAIN_TITLE")) - { - print "".MAIN_TITLE.""; - } - else - { - print 'Dolibarr'; - } - } - print "\n"; + // Affiche title + if ($title) + { + print 'Dolibarr - '.$title.''; + } + else + { + if (defined("MAIN_TITLE")) + { + print "".MAIN_TITLE.""; + } + else + { + print 'Dolibarr'; + } + } + print "\n"; - // Affiche style sheets et link - print ''."\n"; - print ''."\n"; - - // Style sheets pour la class Window - print ''."\n"; - print ''."\n"; - print ''."\n"; + // Affiche style sheets et link + print ''."\n"; + print ''."\n"; + + // Style sheets pour la class Window + print ''."\n"; + print ''."\n"; + print ''."\n"; - // Definition en alternate style sheet des feuilles de styles les plus maintenues - // Les navigateurs qui supportent sont rares. Plus aucun connu. - /* - print ''."\n"; - print ''."\n"; - print ''."\n"; - */ - - print ''."\n"; - print ''."\n"; - print ''."\n"; + // Definition en alternate style sheet des feuilles de styles les plus maintenues + // Les navigateurs qui supportent sont rares. Plus aucun connu. + /* + print ''."\n"; + print ''."\n"; + print ''."\n"; + */ + + print ''."\n"; + print ''."\n"; + print ''."\n"; - if (! $disablejs && ($conf->use_javascript || $conf->use_ajax)) - { - print ''."\n"; - } - if (! $disablejs && $conf->use_ajax) - { - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - - } - - print "\n"; - } + if (! $disablejs && ($conf->use_javascript || $conf->use_ajax)) + { + print ''."\n"; + } + if (! $disablejs && $conf->use_ajax) + { + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + + } + + print "\n"; + } } /** diff --git a/htdocs/product.class.php b/htdocs/product.class.php index fb8968903f9..c038a4c5531 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -313,8 +313,6 @@ class Product function update($id, $user) { global $langs, $conf; - $langs->load("main"); - $langs->load("products"); // Verification parametres if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';