From 0b581fc507dd1e1f9b05bc5a011fca9118178d80 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 19 May 2018 08:06:52 +0200 Subject: [PATCH] loadLangs --- htdocs/accountancy/index.php | 4 ++-- htdocs/loan/card.php | 10 ++++------ htdocs/loan/class/loan.class.php | 5 ++--- htdocs/loan/createschedule.php | 11 ++++++----- htdocs/loan/document.php | 10 +++------- htdocs/loan/index.php | 11 ++++------- htdocs/loan/info.php | 8 +++----- htdocs/loan/note.php | 8 ++++---- htdocs/loan/payment/card.php | 7 ++----- htdocs/loan/payment/payment.php | 5 ++--- 10 files changed, 32 insertions(+), 47 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 8de7209ef93..ba79f9ee78e 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016 Alexandre Spangaro +/* Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2016-2018 Alexandre Spangaro * * 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 diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 53cf9e7cb82..62b294f7108 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2017 Laurent Destailleur * @@ -32,9 +32,7 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accoun require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -$langs->load("compta"); -$langs->load("bills"); -$langs->load("loan"); +$langs->loadLangs(array("compta","bills","loan")); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); @@ -308,7 +306,7 @@ if ($action == 'create') $formproject=new FormProjets($db); // Projet associe - $langs->load("projects"); + $langs->loadLangs(array("projects")); print ''.$langs->trans("Project").''; @@ -444,7 +442,7 @@ if ($id > 0) // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); + $langs->loadLangs(array("projects")); $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->loan->write) { diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 1de0e908c97..02832c0ecf5 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -369,8 +369,7 @@ class Loan extends CommonObject function LibStatut($statut,$mode=0,$alreadypaid=-1) { global $langs; - $langs->load('customers'); - $langs->load('bills'); + $langs->loadLangs(array("customers","bills")); if ($mode == 0) { diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 0ecc0038835..6988839fa51 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2017 Franck Moreau + * Copyright (C) 2018 Alexandre Spangaro * * 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 @@ -16,9 +17,9 @@ */ /** - * \file htdocs/loan/createecheancier.php - * \ingroup loan - * \brief Schedule card + * \file htdocs/loan/createschedule.php + * \ingroup loan + * \brief Schedule card */ require '../main.inc.php'; @@ -33,7 +34,7 @@ $action = GETPOST('action','aZ09'); $object = new Loan($db); $object->fetch($loanid); -$langs->load('loan'); +$langs->loadLangs(array("loan")); if ($action == 'createecheancier') { diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 54333029689..b6504d0a776 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Ferran Marcet +/* Copyright (C) 2014-2018 Alexandre Spangaro + * Copyright (C) 2017 Ferran Marcet * * 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 @@ -32,11 +32,7 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("other"); -$langs->load("companies"); -$langs->load("compta"); -$langs->load("bills"); -$langs->load("loan"); +$langs->loadLangs(array("other","companies","compta","bills","loan")); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index 7a6bee5d79f..bf5b6590c33 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -1,8 +1,8 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France - * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2016 Laurent Destailleur * * 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 @@ -27,10 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; -$langs->load("loan"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +$langs->loadLangs(array("loan","compta","banks","bills")); // Security check $socid = GETPOST('socid', 'int'); diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index ea7237cdd34..d94bedbf9fb 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Ferran Marcet +/* Copyright (C) 2014-2018 Alexandre Spangaro + * Copyright (C) 2017 Ferran Marcet * * 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 @@ -30,9 +30,7 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("compta"); -$langs->load("bills"); -$langs->load("loan"); +$langs->loadLangs(array("compta","bills","loan")); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 8f64036f819..9e5fedc423b 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -4,8 +4,8 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Frederic France - * Copyright (C) 2016 Alexandre Spangaro - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2016-2018 Alexandre Spangaro + * Copyright (C) 2017 Ferran Marcet * * 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 @@ -36,7 +36,7 @@ if (! empty($conf->projet->enabled)) { $action = GETPOST('action','aZ09'); -$langs->load('loan'); +$langs->loadLangs(array("loan")); // Security check $id = GETPOST('id','int'); @@ -82,7 +82,7 @@ if ($id > 0) $morehtmlref.=$form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); + $langs->loadLangs(array("projects")); $morehtmlref .= '
' . $langs->trans('Project') . ' : '; if ($user->rights->loan->write) { //if ($action != 'classify') diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 47efb9c8cde..f7b687caed9 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * * 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 @@ -26,10 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.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'); -$langs->load('loan'); +$langs->loadLangs(array("bills","banks","companies","loan")); // Security check $id=GETPOST("id",'int'); diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 8faac08fb60..ee83bf17f00 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -27,8 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("bills"); -$langs->load("loan"); +$langs->loadLangs(array("bills","loan")); $chid=GETPOST('id','int'); $action=GETPOST('action','aZ09');