loadLangs

This commit is contained in:
Alexandre SPANGARO 2018-05-19 08:06:52 +02:00
parent 1af4a857be
commit 0b581fc507
10 changed files with 32 additions and 47 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* *
@ -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.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
$langs->load("compta"); $langs->loadLangs(array("compta","bills","loan"));
$langs->load("bills");
$langs->load("loan");
$id=GETPOST('id','int'); $id=GETPOST('id','int');
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');
@ -308,7 +306,7 @@ if ($action == 'create')
$formproject=new FormProjets($db); $formproject=new FormProjets($db);
// Projet associe // Projet associe
$langs->load("projects"); $langs->loadLangs(array("projects"));
print '<tr><td>'.$langs->trans("Project").'</td><td>'; print '<tr><td>'.$langs->trans("Project").'</td><td>';
@ -444,7 +442,7 @@ if ($id > 0)
// Project // Project
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
{ {
$langs->load("projects"); $langs->loadLangs(array("projects"));
$morehtmlref.='<br>'.$langs->trans('Project') . ' '; $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->loan->write) if ($user->rights->loan->write)
{ {

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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) function LibStatut($statut,$mode=0,$alreadypaid=-1)
{ {
global $langs; global $langs;
$langs->load('customers'); $langs->loadLangs(array("customers","bills"));
$langs->load('bills');
if ($mode == 0) if ($mode == 0)
{ {

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com> /* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,7 +17,7 @@
*/ */
/** /**
* \file htdocs/loan/createecheancier.php * \file htdocs/loan/createschedule.php
* \ingroup loan * \ingroup loan
* \brief Schedule card * \brief Schedule card
*/ */
@ -33,7 +34,7 @@ $action = GETPOST('action','aZ09');
$object = new Loan($db); $object = new Loan($db);
$object->fetch($loanid); $object->fetch($loanid);
$langs->load('loan'); $langs->loadLangs(array("loan"));
if ($action == 'createecheancier') { if ($action == 'createecheancier') {

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -32,11 +32,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
} }
$langs->load("other"); $langs->loadLangs(array("other","companies","compta","bills","loan"));
$langs->load("companies");
$langs->load("compta");
$langs->load("bills");
$langs->load("loan");
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$action = GETPOST('action','aZ09'); $action = GETPOST('action','aZ09');

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
@ -27,10 +27,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
$langs->load("loan"); $langs->loadLangs(array("loan","compta","banks","bills"));
$langs->load("compta");
$langs->load("banks");
$langs->load("bills");
// Security check // Security check
$socid = GETPOST('socid', 'int'); $socid = GETPOST('socid', 'int');

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -30,9 +30,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
} }
$langs->load("compta"); $langs->loadLangs(array("compta","bills","loan"));
$langs->load("bills");
$langs->load("loan");
$id=GETPOST('id','int'); $id=GETPOST('id','int');
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -36,7 +36,7 @@ if (! empty($conf->projet->enabled)) {
$action = GETPOST('action','aZ09'); $action = GETPOST('action','aZ09');
$langs->load('loan'); $langs->loadLangs(array("loan"));
// Security check // Security check
$id = GETPOST('id','int'); $id = GETPOST('id','int');
@ -82,7 +82,7 @@ if ($id > 0)
$morehtmlref.=$form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); $morehtmlref.=$form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1);
// Project // Project
if (! empty($conf->projet->enabled)) { if (! empty($conf->projet->enabled)) {
$langs->load("projects"); $langs->loadLangs(array("projects"));
$morehtmlref .= '<br>' . $langs->trans('Project') . ' : '; $morehtmlref .= '<br>' . $langs->trans('Project') . ' : ';
if ($user->rights->loan->write) { if ($user->rights->loan->write) {
//if ($action != 'classify') //if ($action != 'classify')

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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'; 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'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load('bills'); $langs->loadLangs(array("bills","banks","companies","loan"));
$langs->load('banks');
$langs->load('companies');
$langs->load('loan');
// Security check // Security check
$id=GETPOST("id",'int'); $id=GETPOST("id",'int');

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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.'/loan/class/paymentloan.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("bills"); $langs->loadLangs(array("bills","loan"));
$langs->load("loan");
$chid=GETPOST('id','int'); $chid=GETPOST('id','int');
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');