From 84f2b31d46f58c9ce99f012c693fecb5c460a473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 27 May 2018 09:40:17 +0200 Subject: [PATCH] loadlangs --- htdocs/compta/bank/annuel.php | 4 ++-- htdocs/compta/bank/bankentries_list.php | 1 + htdocs/compta/bank/bilan.php | 4 ++-- htdocs/compta/bank/budget.php | 4 ++-- htdocs/compta/bank/card.php | 1 + htdocs/compta/bank/categ.php | 4 ++-- htdocs/compta/bank/document.php | 15 ++++++--------- htdocs/compta/bank/graph.php | 4 ++-- htdocs/compta/bank/info.php | 5 ++--- htdocs/compta/bank/ligne.php | 6 ++---- htdocs/compta/bank/list.php | 6 ++---- htdocs/compta/bank/releve.php | 1 + htdocs/compta/bank/transfer.php | 1 + htdocs/compta/bank/treso.php | 6 ++---- htdocs/compta/bank/various_payment/card.php | 1 + htdocs/compta/bank/various_payment/document.php | 1 + htdocs/compta/bank/various_payment/index.php | 1 + htdocs/compta/bank/various_payment/info.php | 1 + htdocs/compta/facture/stats/index.php | 2 +- 19 files changed, 33 insertions(+), 35 deletions(-) diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 3eee68bcb24..c4bf31afc87 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width',380); // Large for one graph in a smarpthone. $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',160); diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 3179a6486e9..55fdcdd71d9 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -48,6 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","bills","categories","companies","margins","salaries","loan","donations","trips","members","compta","accountancy")); $id = GETPOST('id','int'); diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 22f7c8c9e79..5e5194d55c8 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -25,8 +25,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); if (!$user->rights->banque->lire) accessforbidden(); diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 15aae28c1d1..9afe5319ef5 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -27,8 +27,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 6a9ce1d2ba1..db497733863 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -39,6 +39,7 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","bills","categories","companies","compta")); $action = GETPOST('action','aZ09'); diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index fb514120d57..be029fcb2f5 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -30,8 +30,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index a6e206c4b09..33e74dc3691 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -25,17 +25,14 @@ * \brief Page de gestion des documents attaches a un compte bancaire */ require('../../main.inc.php'); -require_once(DOL_DOCUMENT_ROOT . "/core/lib/bank.lib.php"); -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/class/html.formfile.class.php"); +require_once DOL_DOCUMENT_ROOT . "/core/lib/bank.lib.php"; +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/class/html.formfile.class.php"; require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; -$langs->load("banks"); - - -$langs->load('companies'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'companies', 'other')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index a813a71eeca..b829002a990 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width',768); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',200); diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 832ec95dcd2..ab43b9374aa 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -26,9 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'companies')); $id = GETPOST("rowid"); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 05f331eba99..e006f78c6e7 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -32,10 +32,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'compta', 'bills')); if (! empty($conf->adherent->enabled)) $langs->load("members"); if (! empty($conf->don->enabled)) $langs->load("donations"); if (! empty($conf->loan->enabled)) $langs->load("loan"); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 9fc8f5028bb..38d5d3e9246 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("accountancy"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'accountancy', 'compta')); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 5e9f98be02d..1d9d5526700 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories","companies","bills","trips")); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index e50d4822da7..765001e75a5 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -30,6 +30,7 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks", "categories", "multicurrency")); if (! $user->rights->banque->transfer) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 136e352ff00..b566a4146a5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies')); // Security check if (isset($_GET["account"]) || isset($_GET["ref"])) diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 2828963d889..1b4d7579892 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -35,6 +35,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); // Get parameters diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index ff304676686..cf596860a4b 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); $id = GETPOST('id','int'); diff --git a/htdocs/compta/bank/various_payment/index.php b/htdocs/compta/bank/various_payment/index.php index f92090a0259..36a7755e665 100644 --- a/htdocs/compta/bank/various_payment/index.php +++ b/htdocs/compta/bank/various_payment/index.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","banks","bills","accountancy")); // Security check diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index f6c7dc063f7..bb66871d6c0 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); $id=GETPOST('id','int'); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index f8b9705e51f..0416e04f7b0 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -3,7 +3,7 @@ * Copyright (c) 2004-2012 Laurent Destailleur * Copyright (C) 2012 Marcos García * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by