Merge pull request #9547 from grandoc/new_branch_17_09_2018

Standardize and update code
This commit is contained in:
Laurent Destailleur 2018-09-18 14:57:50 +02:00 committed by GitHub
commit fa61ebeb9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 21 deletions

View File

@ -430,8 +430,9 @@ class ChargeSociales extends CommonObject
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;
$langs->load('customers');
$langs->load('bills'); // Load translation files required by the page
$langs->loadLangs(array("customers","bills"));
if ($mode == 0 || $mode == 1) if ($mode == 0 || $mode == 1)
{ {

View File

@ -1149,8 +1149,8 @@ class FormOther
if ($nbboxactivated) if ($nbboxactivated)
{ {
$langs->load("boxes"); // Load translation files required by the page
$langs->load("projects"); $langs->loadLangs(array("boxes","projects"));
$emptybox=new ModeleBoxes($db); $emptybox=new ModeleBoxes($db);

View File

@ -101,9 +101,8 @@ class FormSms
if (! is_object($form)) $form=new Form($this->db); if (! is_object($form)) $form=new Form($this->db);
$langs->load("other"); // Load translation files required by the page
$langs->load("mails"); $langs->loadLangs(array('other', 'mails', 'sms'));
$langs->load("sms");
$soc=new Societe($this->db); $soc=new Societe($this->db);
if (!empty($this->withtosocid) && $this->withtosocid > 0) if (!empty($this->withtosocid) && $this->withtosocid > 0)

View File

@ -98,8 +98,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
{ {
global $conf,$langs; global $conf,$langs;
$langs->load("companies"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('companies', 'errors'));
$form = new Form($this->db); $form = new Form($this->db);

View File

@ -95,10 +95,10 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
*/ */
function info($langs) function info($langs)
{ {
global $conf,$langs; global $conf, $langs;
$langs->load("companies"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('companies', 'errors'));
$form = new Form($this->db); $form = new Form($this->db);

View File

@ -93,10 +93,10 @@ class doc_generic_user_odt extends ModelePDFUser
*/ */
function info($langs) function info($langs)
{ {
global $conf,$langs; global $conf, $langs;
$langs->load("companies"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('companies', 'errors'));
$form = new Form($this->db); $form = new Form($this->db);

View File

@ -37,10 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
*/ */
class doc_generic_usergroup_odt extends ModelePDFUserGroup class doc_generic_usergroup_odt extends ModelePDFUserGroup
{ {
var $emetteur; // Objet societe qui emet public $emetteur; // Objet societe qui emet
var $phpmin = array(5,2,0); // Minimum version of PHP required by module public $phpmin = array(5,4,0); // Minimum version of PHP required by module
var $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
@ -50,10 +50,10 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
*/ */
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf, $langs, $mysoc;
$langs->load("main"); // Load translation files required by the page
$langs->load("companies"); $langs->loadLangs(array('companies', 'main'));
$this->db = $db; $this->db = $db;
$this->name = "ODT templates"; $this->name = "ODT templates";