loadlangs

This commit is contained in:
Frédéric FRANCE 2018-05-26 15:41:32 +02:00
parent 894f16c5ee
commit cbed5c8349
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
7 changed files with 11 additions and 35 deletions

View File

@ -45,8 +45,7 @@ if (! empty($conf->tax->enabled))
//if (!$user->rights->compta->general->lire) //if (!$user->rights->compta->general->lire)
// accessforbidden(); // accessforbidden();
$langs->load("compta"); $langs->loadLangs(array('compta', 'bills'));
$langs->load("bills");
if (! empty($conf->commande->enabled)) if (! empty($conf->commande->enabled))
$langs->load("orders"); $langs->load("orders");

View File

@ -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.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$langs->load('companies'); $langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency'));
$langs->load('bills');
$langs->load('banks');
$langs->load('multicurrency');
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$confirm = GETPOST('confirm'); $confirm = GETPOST('confirm');

View File

@ -30,9 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php';
// Load traductions files // Load traductions files
$langs->load("ecm"); $langs->loadLangs(array('ecm', 'companies', 'other'));
$langs->load("companies");
$langs->load("other");
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$cancel = GETPOST('cancel', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09');

View File

@ -29,15 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php';
// Load traductions files // Load traductions files
$langs->load("ecm"); $langs->loadLangs(array('ecm', 'companies', 'other', 'users', 'orders', 'propal', 'bills', 'contracts', 'categories'));
$langs->load("companies");
$langs->load("other");
$langs->load("users");
$langs->load("orders");
$langs->load("propal");
$langs->load("bills");
$langs->load("contracts");
$langs->load("categories");
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha'); $cancel = GETPOST('cancel', 'alpha');

View File

@ -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/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/import.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/import.lib.php';
$langs->load("exports"); $langs->loadLangs(array('exports', 'compta', 'errors'));
$langs->load("compta");
$langs->load("errors");
// Security check // Security check
$result=restrictedArea($user, 'import'); $result=restrictedArea($user, 'import');

View File

@ -110,10 +110,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
*/ */
$boxstat=''; $boxstat='';
$langs->load("commercial"); $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts'));
$langs->load("bills");
$langs->load("orders");
$langs->load("contracts");
if (empty($user->societe_id)) if (empty($user->societe_id))
{ {

View File

@ -474,8 +474,7 @@ if (! defined('NOLOGIN'))
if (! $ok) if (! $ok)
{ {
dol_syslog('Bad value for code, connexion refused'); dol_syslog('Bad value for code, connexion refused');
$langs->load('main'); $langs->loadLangs(array('main', 'errors'));
$langs->load('errors');
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode"); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode");
$test=false; $test=false;
@ -552,8 +551,7 @@ if (! defined('NOLOGIN'))
if (! $login) if (! $login)
{ {
dol_syslog('Bad password, connexion refused',LOG_DEBUG); dol_syslog('Bad password, connexion refused',LOG_DEBUG);
$langs->load('main'); $langs->loadLangs(array('main', 'errors'));
$langs->load('errors');
// Bad password. No authmode has found a good password. // Bad password. No authmode has found a good password.
// We set a generic message if not defined inside function checkLoginPassEntity or subfunctions // We set a generic message if not defined inside function checkLoginPassEntity or subfunctions
@ -602,8 +600,7 @@ if (! defined('NOLOGIN'))
if ($resultFetchUser == 0) if ($resultFetchUser == 0)
{ {
$langs->load('main'); $langs->loadLangs(array('main', 'errors'));
$langs->load('errors');
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login); $_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login);
@ -661,8 +658,7 @@ if (! defined('NOLOGIN'))
if ($resultFetchUser == 0) if ($resultFetchUser == 0)
{ {
$langs->load('main'); $langs->loadLangs(array('main', 'errors'));
$langs->load('errors');
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login); $_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 // Load main languages files
if (! defined('NOREQUIRETRAN')) if (! defined('NOREQUIRETRAN'))
{ {
$langs->load("main"); $langs->loadLangs(array('main', 'dict'));
$langs->load("dict");
} }
// Define some constants used for style of arrays // Define some constants used for style of arrays