diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index 25e2eb3f903..3ceaaf17d33 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -24,8 +24,8 @@ require '../main.inc.php'; -$langs->load("companies"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("companies","other")); // Security check $socid=0; diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 7459bf82453..b8396ab72bb 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -40,9 +40,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -$langs->load("other"); -$langs->load("donations"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("other","donations","companies")); $id = GETPOST('id','int'); $ref = GETPOST('ref', 'alpha'); diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 1e7d93302d8..3fffe242e20 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -28,8 +28,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->load("companies"); -$langs->load("donations"); +// Load translation files required by the page +$langs->loadLangs(array("donations","companies")); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); diff --git a/htdocs/don/note.php b/htdocs/don/note.php index d78aa2c7ea5..7c3636eef4a 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -35,9 +35,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("bills"); -$langs->load("donations"); +// Load translation files required by the page +$langs->loadLangs(array("bills","donations","companies")); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref=GETPOST('ref','alpha'); diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index e4a7ef5c5d4..dde03cb461d 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load('bills'); -$langs->load('banks'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array("bills","banks","companies")); // Security check $id=GETPOST('rowid')?GETPOST('rowid','int'):GETPOST('id','int'); diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index cb574da939a..4398dfd8b8e 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -47,9 +47,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$langs->load("sendings"); -$langs->load("other"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("sendings","other","companies")); /*