From cd8e0aa919a636d6dec9af8ad919a16051c2eaaa Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 16 Sep 2018 11:47:56 +0200 Subject: [PATCH] Standardize and update code --- htdocs/fourn/commande/index.php | 4 ++-- htdocs/fourn/commande/info.php | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 1d5cfc2097b..59e7b82e488 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -34,8 +34,8 @@ $orderid = GETPOST('orderid'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); -$langs->load("suppliers"); -$langs->load("orders"); +// Load translation files required by the page +$langs->loadLangs(array("suppliers", "orders")); /* diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 747247a38c2..dee7a83bc6a 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -33,10 +33,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("orders"); -$langs->load("suppliers"); -$langs->load("companies"); -$langs->load('stocks'); +// Load translation files required by the page +$langs->loadLangs(array("suppliers", "orders", "companies", "stocks")); $id=GETPOST('id','int'); $ref=GETPOST('ref','alpha');