Standardize and update code

This commit is contained in:
Philippe GRAND 2018-09-14 10:20:21 +02:00
parent 961505d510
commit 18f4755a90
4 changed files with 9 additions and 9 deletions

View File

@ -727,8 +727,8 @@ class FormTicket
{
global $conf, $langs, $user, $mysoc;
$langs->load("other");
$langs->load("mails");
// Load translation files required by the page
$langs->loadLangs(array('other', 'mails'));
$addfileaction = 'addfile';

View File

@ -1141,8 +1141,8 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
global $db, $conf, $user, $langs;
global $hookmanager;
$langs->load("other");
$langs->load("errors");
// Load translation files required by the page
$langs->loadLangs(array('other', 'errors'));
dol_syslog("dol_delete_file file=".$file." disableglob=".$disableglob." nophperrors=".$nophperrors." nohook=".$nohook);

View File

@ -3865,8 +3865,8 @@ function dol_print_error($db='',$error='',$errors=null)
$langs = new Translate('', $conf);
$langs->load("main");
}
$langs->load("main");
$langs->load("errors");
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
if ($_SERVER['DOCUMENT_ROOT']) // Mode web
{

View File

@ -105,9 +105,9 @@ function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmod
{
dol_syslog("Authentification ko - failed to load file '".$authfile."'", LOG_ERR);
sleep(1);
$langs->load('main');
$langs->load('other');
$langs->load('errors');
// Load translation files required by the page
$langs->loadLangs(array('other', 'main', 'errors'));
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorFailedToLoadLoginFileForMode", $mode);
}
}