diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 12a4ecee052..88f4272deef 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -45,8 +45,7 @@ if (! empty($conf->tax->enabled)) //if (!$user->rights->compta->general->lire) // accessforbidden(); -$langs->load("compta"); -$langs->load("bills"); +$langs->loadLangs(array('compta', 'bills')); if (! empty($conf->commande->enabled)) $langs->load("orders"); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 8b6956a3942..1e992eab959 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -35,10 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -$langs->load('companies'); -$langs->load('bills'); -$langs->load('banks'); -$langs->load('multicurrency'); +$langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm'); diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index 14f0ee18e8c..f47d21174b1 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -30,9 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; // Load traductions files -$langs->load("ecm"); -$langs->load("companies"); -$langs->load("other"); +$langs->loadLangs(array('ecm', 'companies', 'other')); $action = GETPOST('action','alpha'); $cancel = GETPOST('cancel', 'aZ09'); diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index e0926e0f777..b7b7e800a74 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -29,15 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; // Load traductions files -$langs->load("ecm"); -$langs->load("companies"); -$langs->load("other"); -$langs->load("users"); -$langs->load("orders"); -$langs->load("propal"); -$langs->load("bills"); -$langs->load("contracts"); -$langs->load("categories"); +$langs->loadLangs(array('ecm', 'companies', 'other', 'users', 'orders', 'propal', 'bills', 'contracts', 'categories')); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 08d3495c33c..300c62a71bd 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -32,9 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/import.lib.php'; -$langs->load("exports"); -$langs->load("compta"); -$langs->load("errors"); +$langs->loadLangs(array('exports', 'compta', 'errors')); // Security check $result=restrictedArea($user, 'import'); diff --git a/htdocs/index.php b/htdocs/index.php index 99b5f1ade7d..d9277be12f0 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -110,10 +110,7 @@ print '
'; */ $boxstat=''; -$langs->load("commercial"); -$langs->load("bills"); -$langs->load("orders"); -$langs->load("contracts"); +$langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); if (empty($user->societe_id)) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index eaea0dc420c..6187eefbd8f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -474,8 +474,7 @@ if (! defined('NOLOGIN')) if (! $ok) { dol_syslog('Bad value for code, connexion refused'); - $langs->load('main'); - $langs->load('errors'); + $langs->loadLangs(array('main', 'errors')); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode"); $test=false; @@ -552,8 +551,7 @@ if (! defined('NOLOGIN')) if (! $login) { dol_syslog('Bad password, connexion refused',LOG_DEBUG); - $langs->load('main'); - $langs->load('errors'); + $langs->loadLangs(array('main', 'errors')); // Bad password. No authmode has found a good password. // We set a generic message if not defined inside function checkLoginPassEntity or subfunctions @@ -602,8 +600,7 @@ if (! defined('NOLOGIN')) if ($resultFetchUser == 0) { - $langs->load('main'); - $langs->load('errors'); + $langs->loadLangs(array('main', 'errors')); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login); @@ -661,8 +658,7 @@ if (! defined('NOLOGIN')) if ($resultFetchUser == 0) { - $langs->load('main'); - $langs->load('errors'); + $langs->loadLangs(array('main', 'errors')); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login); @@ -935,8 +931,7 @@ dol_syslog("--- Access to ".$_SERVER["PHP_SELF"].' - action='.GETPOST('action',' // Load main languages files if (! defined('NOREQUIRETRAN')) { - $langs->load("main"); - $langs->load("dict"); + $langs->loadLangs(array('main', 'dict')); } // Define some constants used for style of arrays