Le chargement de dict se fait au meme niveau que main. Les 2 fichiers étant utilisés par la plupart des pages, sont sytematiquement charges.

This commit is contained in:
Laurent Destailleur 2007-09-15 14:35:44 +00:00
parent 0be3911d40
commit 9d2da43dab
6 changed files with 67 additions and 74 deletions

View File

@ -31,7 +31,6 @@
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("main");
$langs->load("other"); $langs->load("other");
$langs->load("admin"); $langs->load("admin");
$langs->load("companies"); $langs->load("companies");

View File

@ -38,7 +38,6 @@ $user->getrights('banque');
if (!$user->rights->facture->lire) if (!$user->rights->facture->lire)
accessforbidden(); accessforbidden();
$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne
$langs->load("bills"); $langs->load("bills");

View File

@ -38,7 +38,6 @@ $user->getrights('banque');
if (!$user->rights->facture->lire) if (!$user->rights->facture->lire)
accessforbidden(); accessforbidden();
$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne
$langs->load("companies"); $langs->load("companies");
$langs->load("bills"); $langs->load("bills");

View File

@ -71,7 +71,6 @@ function xyzToUnixTimestamp($mysqldate){
function displayBox($selectedDate,$month,$year){ function displayBox($selectedDate,$month,$year){
global $dolibarr_main_url_root,$langs,$conf; global $dolibarr_main_url_root,$langs,$conf;
$langs->load("main");
//print "$selectedDate,$month,$year"; //print "$selectedDate,$month,$year";
$thedate=dolibarr_mktime(0,0,0,$month,1,$year); $thedate=dolibarr_mktime(0,0,0,$month,1,$year);

View File

@ -577,8 +577,9 @@ if (! defined('MAIN_INFO_SOCIETE_PAYS'))
define('MAIN_INFO_SOCIETE_PAYS','1'); define('MAIN_INFO_SOCIETE_PAYS','1');
} }
// On charge le fichier lang principal // On charge les fichiers lang principaux
$langs->load("main"); $langs->load("main");
$langs->load("dict");
/* /*
* *
@ -627,8 +628,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
{ {
global $user, $conf, $langs, $db, $micro_start_time; global $user, $conf, $langs, $db, $micro_start_time;
$langs->load("dict");
// Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING // Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING
// est positionne A appeler avant tout. // est positionne A appeler avant tout.
if (isset($_SERVER['DOL_TUNING'])) $micro_start_time=dol_microtime_float(true); if (isset($_SERVER['DOL_TUNING'])) $micro_start_time=dol_microtime_float(true);

View File

@ -313,8 +313,6 @@ class Product
function update($id, $user) function update($id, $user)
{ {
global $langs, $conf; global $langs, $conf;
$langs->load("main");
$langs->load("products");
// Verification parametres // Verification parametres
if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT'; if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';