From a6d13b06b0f8f6ea04145bccaa654ea22fea7a32 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 7 Sep 2018 10:40:36 +0200 Subject: [PATCH] Standardize and update call to --- htdocs/adherents/admin/adherent.php | 4 ++-- htdocs/adherents/admin/adherent_emails.php | 4 ++-- htdocs/adherents/admin/adherent_extrafields.php | 4 ++-- htdocs/adherents/admin/adherent_type_extrafields.php | 4 ++-- htdocs/adherents/admin/website.php | 4 ++-- htdocs/adherents/agenda.php | 4 ++-- htdocs/adherents/document.php | 6 +++--- htdocs/adherents/index.php | 4 ++-- htdocs/adherents/ldap.php | 6 ++---- htdocs/adherents/note.php | 5 ++--- htdocs/adherents/stats/byproperties.php | 4 ++-- htdocs/adherents/stats/geo.php | 4 ++-- htdocs/adherents/stats/index.php | 4 ++-- htdocs/adherents/subscription/card.php | 6 ++---- htdocs/adherents/subscription/info.php | 6 ++---- htdocs/adherents/type_ldap.php | 5 ++--- 16 files changed, 33 insertions(+), 41 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 2abc3b10841..ba43b6d47a6 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 76d40e57c17..60e0b2c3b48 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index f47f92faa4c..0ec1968ab34 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -28,8 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index e78c4ef29e5..3a5226d00f4 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -31,8 +31,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 75a3c4ee0d7..91df8e59ea5 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 8fb1851e021..f22070107ca 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); $id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int'); diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 46b2b827d73..7e46b7864f8 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -33,9 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("companies"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","other")); + $id=GETPOST('id','int'); $action=GETPOST('action','alpha'); diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 030700bb0f6..931e9323904 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); // Security check $result=restrictedArea($user,'adherent'); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index f7389e9fbbc..5b830623a4b 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("ldap"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","ldap","admin")); $rowid = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index ae278b5dbb5..8cd12cd6ca2 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills")); $action=GETPOST('action','alpha'); $id=GETPOST('id','int'); diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index 7ae29a7eeb9..defbde2dce2 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -44,8 +44,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 9de537ed39a..2175569b7ce 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -45,8 +45,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 902c2d35359..e3bc7287864 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -46,8 +46,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 34b58c5b04d..0bacc8cf863 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -29,10 +29,8 @@ if (! empty($conf->banque->enabled)) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); $adh = new Adherent($db); $object = new Subscription($db); diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 649a1e22996..eb8f8e4eab3 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -28,10 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); if (!$user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 5d60beb2a4d..c18074130aa 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("members"); -$langs->load("admin"); -$langs->load("ldap"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members","ldap")); $id = GETPOST('rowid', 'int'); $action = GETPOST('action','alpha');