From f20dd8019426c164af8d210692445c830aca28c4 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:20:36 +0100 Subject: [PATCH 01/39] FIX: better thirparty support --- htdocs/don/card.php | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 6a63074166c..d2a43b41813 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015-2016 Alexandre Spangaro - * Copyright (C) 2018 Thibault FOUCART + * Copyright (C) 2018-2019 Thibault FOUCART * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -107,8 +107,8 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); $object->fk_project = GETPOST("fk_project",'alpha'); @@ -154,6 +154,7 @@ if ($action == 'add') if (! $error) { + $object->fk_soc = GETPOST("fk_soc",'int'); $object->firstname = GETPOST("firstname",'alpha'); $object->lastname = GETPOST("lastname",'alpha'); $object->societe = GETPOST("societe",'alpha'); @@ -161,8 +162,8 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); @@ -516,7 +517,7 @@ if (! empty($id) && $action == 'edit') // Amount if ($object->statut == 0) { - print "".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; + print "".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; } else { @@ -530,6 +531,14 @@ if (! empty($id) && $action == 'edit') print ""; print "\n"; +if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) { + + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + +} else { $langs->load("companies"); print ''.$langs->trans("Company").''; print ''.$langs->trans("Lastname").''; @@ -537,10 +546,10 @@ if (! empty($id) && $action == 'edit') print ''.$langs->trans("Address").''; print ''; - // Zip / Town - print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; + // Zip / Town + print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6); - print ' '; + print ' '; print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id')); print ''; @@ -551,7 +560,7 @@ if (! empty($id) && $action == 'edit') print ''; print "".''.$langs->trans("EMail").''; - +} // Payment mode print "".$langs->trans("PaymentMode")."\n"; if ($object->modepaymentid) $selected = $object->modepaymentid; @@ -683,11 +692,22 @@ if (! empty($id) && $action != 'edit') print ''.$langs->trans("PublicDonation").''; print yn($object->public); print ''; + +if ($object->fk_soc) { + + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + +} else { print ''.$langs->trans("Company").''.$object->societe.''; print ''.$langs->trans("Lastname").''.$object->lastname.''; print ''.$langs->trans("Firstname").''.$object->firstname.''; +} + // Payment mode print "".$langs->trans("PaymentMode").""; $form->form_modes_reglement(null, $object->modepaymentid,'none'); From c7bedbe7dc8eca76a73e2d0681eb1ca7a573baa8 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:22:33 +0100 Subject: [PATCH 02/39] Update for thirdparty support --- htdocs/don/class/don.class.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..7c8feaa8a15 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin * Copyright (C) 2014 Florian Henry * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2019 Thibault FOUCART * * 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 @@ -366,6 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -388,6 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); + $sql.= ", '".$this->fk_soc."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; @@ -489,7 +492,7 @@ class Don extends CommonObject $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",zip='".$this->db->escape($this->zip)."'"; $sql .= ",town='".$this->db->escape($this->town)."'"; - $sql .= ",fk_country = ".$this->country_id; + $sql .= ",fk_country = ".($this->country_id > 0 ? $this->country_id : '0'); $sql .= ",public=".$this->public; $sql .= ",fk_projet=".($this->fk_project>0?$this->fk_project:'null'); $sql .= ",note_private=".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL"); @@ -636,7 +639,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,"; - $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, "; + $sql.= " d.fk_soc,d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, "; $sql.= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, "; $sql.= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,"; $sql.= " p.ref as project_ref,"; @@ -670,6 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; @@ -682,7 +686,7 @@ class Don extends CommonObject $this->country_code = $obj->country_code; $this->country = $obj->country; $this->country_olddata= $obj->country_olddata; // deprecated - $this->email = $obj->email; + $this->email = $obj->email; $this->phone = $obj->phone; $this->phone_mobile = $obj->phone_mobile; $this->project = $obj->project_ref; @@ -692,7 +696,7 @@ class Don extends CommonObject $this->modepaymentid = $obj->fk_payment; $this->modepaymentcode = $obj->payment_code; $this->modepayment = $obj->payment_label; - $this->paid = $obj->paid; + $this->paid = $obj->paid; $this->amount = $obj->amount; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; From 754714abf7d177720b9e26ef7c179a7151262b86 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:23:59 +0100 Subject: [PATCH 03/39] Update llx_don.sql --- htdocs/install/mysql/tables/llx_don.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index 82728861fc6..4cb081045ee 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -31,6 +31,7 @@ create table llx_don amount double(24,8) DEFAULT 0, fk_payment integer, -- Id of payment mode paid smallint default 0 NOT NULL, + fk_soc integer NULL, firstname varchar(50), lastname varchar(50), societe varchar(50), @@ -38,7 +39,7 @@ create table llx_don zip varchar(30), town varchar(50), country varchar(50), -- Deprecated - Replace with fk_country - fk_country integer NOT NULL, + fk_country integer NOT NULL, email varchar(255), phone varchar(24), phone_mobile varchar(24), From 5232024de94e08672bd572094aba801e161f6750 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:26:12 +0100 Subject: [PATCH 04/39] ADD thirdparty support --- htdocs/don/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 47408fe4bb5..3203d1fd47f 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2019 Thibault FOUCART * * 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 @@ -85,7 +86,7 @@ llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M $donationstatic=new Don($db); // Genere requete de liste des dons -$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,"; +$sql = "SELECT d.rowid, d.datedon, d.fk_soc, d.firstname, d.lastname, d.societe,"; $sql.= " d.amount, d.fk_statut as statut, "; $sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; From af03f108a12883c8273adcdc0550ca865b220075 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:28:09 +0100 Subject: [PATCH 05/39] Update card.php --- htdocs/don/card.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index d2a43b41813..034e045bb46 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -107,8 +107,8 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); $object->fk_project = GETPOST("fk_project",'alpha'); @@ -117,7 +117,7 @@ if ($action == 'update') $object->modepaymentid = GETPOST('modepayment','int'); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); if ($ret < 0) $error++; if ($object->update($user) > 0) @@ -162,9 +162,9 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); - $object->date = $donation_date; + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST('email', 'int'); + $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); $object->public = GETPOST("public",'alpha'); From 09567ebaafca3175126e86401728cd5faf8a33f6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:28:29 +0100 Subject: [PATCH 06/39] Update card.php --- htdocs/don/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 034e045bb46..a55ebe5e2e8 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -154,7 +154,7 @@ if ($action == 'add') if (! $error) { - $object->fk_soc = GETPOST("fk_soc",'int'); + $object->fk_soc = GETPOST("fk_soc",'int'); $object->firstname = GETPOST("firstname",'alpha'); $object->lastname = GETPOST("lastname",'alpha'); $object->societe = GETPOST("societe",'alpha'); From 4b447d779916b87877d2230947f003d7d420b94f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 14:13:55 +0100 Subject: [PATCH 07/39] Update card.php --- htdocs/don/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index a55ebe5e2e8..9e7fd3e5c9e 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -537,7 +537,7 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - + } else { $langs->load("companies"); print ''.$langs->trans("Company").''; @@ -699,7 +699,7 @@ if ($object->fk_soc) { $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - + } else { print ''.$langs->trans("Company").''.$object->societe.''; From 89e348515a11eb8dce1f4b4c5388b5ecf4a7545e Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 14:14:38 +0100 Subject: [PATCH 08/39] Update don.class.php --- htdocs/don/class/don.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 7c8feaa8a15..1d649b1bd76 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -367,7 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; - $sql.= ", fk_soc"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -390,7 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); - $sql.= ", '".$this->fk_soc."'"; + $sql.= ", '".$this->fk_soc."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; @@ -673,7 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->fk_soc = $obj->fk_soc; + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; From 8fcdb3bb6d2a0d05be6ca13a31bc2f904a975344 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:30:28 +0100 Subject: [PATCH 09/39] Update card.php --- htdocs/don/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 9e7fd3e5c9e..146c8efaa6b 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -539,6 +539,7 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; } else { + $langs->load("companies"); print ''.$langs->trans("Company").''; print ''.$langs->trans("Lastname").''; From d961ae3225161196334514a5852a4a2efd15bf52 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:31:26 +0100 Subject: [PATCH 10/39] Update card.php --- htdocs/don/card.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 146c8efaa6b..e71574acc23 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -537,7 +537,6 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - } else { $langs->load("companies"); @@ -700,13 +699,11 @@ if ($object->fk_soc) { $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - } else { print ''.$langs->trans("Company").''.$object->societe.''; print ''.$langs->trans("Lastname").''.$object->lastname.''; print ''.$langs->trans("Firstname").''.$object->firstname.''; - } // Payment mode From c2c238ec248af07f552a25d092c40c1fed6bf686 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:32:13 +0100 Subject: [PATCH 11/39] Update don.class.php --- htdocs/don/class/don.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 1d649b1bd76..2f720281b4f 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -367,7 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; - $sql.= ", fk_soc"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -673,7 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->fk_soc = $obj->fk_soc; + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; From e74bccca211951fcaab650c34a67cb2f980a1e3a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 17:51:42 +0100 Subject: [PATCH 12/39] Update don.class.php --- htdocs/don/class/don.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 2f720281b4f..0f3a1879638 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -390,7 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); - $sql.= ", '".$this->fk_soc."'"; + $sql.= ", '".$this->db->escape($this->fk_soc)."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; From a3153889b8e416b64c1a716276e652d61aee6a2f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 19 Jan 2019 11:31:40 +0100 Subject: [PATCH 13/39] fix --- htdocs/don/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index e71574acc23..f412eac3e63 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -163,7 +163,7 @@ if ($action == 'add') $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST('email', 'int'); + $object->email = GETPOST('email', 'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); From 406f26b9d2a8c27904ac36be4c4b4ba2edd0b9be Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 21 Jan 2019 16:48:14 +0100 Subject: [PATCH 14/39] FIX JSON.parse not needeed and missing simple quote escaping --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 44da2914fe8..145e560940a 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -58,7 +58,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); ?> -var categories = JSON.parse( '' ); +var categories = ; var currentcat; var pageproducts=0; var pagecategories=0; From 0a36a487c461878f5f167aaf89bee39004568375 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 21 Jan 2019 18:43:12 +0100 Subject: [PATCH 15/39] FIX remove unused option --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 145e560940a..c8033351913 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -58,7 +58,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); ?> -var categories = ; +var categories = ; var currentcat; var pageproducts=0; var pagecategories=0; From 4d2231a6a2fb6f1c52f520181e0b3e2d9d3a1dfe Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 21 Jan 2019 23:53:17 +0100 Subject: [PATCH 16/39] Fix double < --- htdocs/don/class/don.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 0f3a1879638..248c2c29aba 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1,4 +1,4 @@ -< * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin From e5d1466ec58dd1c418b170a931afa0f0bbf03d3f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 22 Jan 2019 18:44:28 +0100 Subject: [PATCH 17/39] Update card.php --- htdocs/don/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index f412eac3e63..d7512e95799 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -107,7 +107,7 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id','int'); $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); @@ -162,7 +162,7 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id','int'); $object->email = GETPOST('email', 'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); From b3dfbaf38ca1f1ff2bf4e51a884ff8668a46217e Mon Sep 17 00:00:00 2001 From: jfefe Date: Wed, 23 Jan 2019 02:44:34 +0100 Subject: [PATCH 18/39] FIX: wrong permission test for inventory creation --- htdocs/product/inventory/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 24848ad26c5..a9cff0e79c7 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -78,12 +78,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $permissiontoadd = $user->rights->stock->write; - $permissiontodelete = $user->rights->stock->write; + $permissiontoadd = $user->rights->stock->creer; + $permissiontodelete = $user->rights->stock->supprimer; } else { - $permissiontoadd = $user->rights->stock->inventory_advance->create; + $permissiontoadd = $user->rights->stock->inventory_advance->write; $permissiontodelete = $user->rights->stock->inventory_advance->write; } From 84e1f92acd2eddc186c0d06b0e909863d0c0bd78 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 23 Jan 2019 15:09:57 +0100 Subject: [PATCH 19/39] FIX : when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; --- htdocs/compta/facture/card.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8541581fb49..5e736df5855 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -725,20 +725,31 @@ if (empty($reshook)) { // If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT + // Total payments $sql = 'SELECT SUM(pf.amount) as total_paiements'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql.= ' WHERE pf.fk_facture = '.$object->id; $sql.= ' AND pf.fk_paiement = p.rowid'; $sql.= ' AND p.entity IN (' . getEntity('facture').')'; - $resql = $db->query($sql); if (! $resql) dol_print_error($db); $res = $db->fetch_object($resql); $total_paiements = $res->total_paiements; - $discount->amount_ht = $discount->amount_ttc = $total_paiements - $object->total_ttc; + // Total credit note and deposit + $total_creditnote_and_deposit = 0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql .= " re.description, re.fk_facture_source"; + $sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re"; + $sql .= " WHERE fk_facture = " . $object->id; + $resql = $db->query($sql); + if (!empty($resql)) { + while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc; + } else dol_print_error($db); + + $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; $discount->amount_tva = 0; $discount->tva_tx = 0; From 9ff848210f30c400323e83ed8b3dd55276d64b19 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 23 Jan 2019 22:14:13 +0100 Subject: [PATCH 20/39] NEW: Automatically binding for intra/export accountancy code --- htdocs/accountancy/customer/list.php | 22 ++++++++++++++++++---- htdocs/product/card.php | 25 +++++++++++-------------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 9f95c6857b0..332cf49bf04 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -212,7 +212,8 @@ if (empty($chartaccountcode)) $sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,"; $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,"; -$sql.= " aa.rowid as aarowid,"; +$sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,"; +$sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; $sql.= " co.code as country_code, co.label as country,"; $sql.= " s.tva_intra"; $parameters=array(); @@ -437,7 +438,9 @@ if ($result) { $code_sell_p_notset = ''; $objp->aarowid_suggest = $objp->aarowid; - if ($objp->type_l == 1) { + $isinEEC = isInEEC($objp->country_code); + + if ($objp->type_l == 1) { $objp->code_sell_l = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); if ($objp->aarowid == '') { $objp->aarowid_suggest = $aarowid_s; @@ -450,8 +453,19 @@ if ($result) { } if ($objp->code_sell_l == -1) $objp->code_sell_l=''; + if ($objp->country_sell == '1') { + $objp->code_sell_p = $objp->code_sell; + $objp->aarowid_suggest = $objp->aarowid; + } elseif ($isinEEC == true) { + $objp->code_sell_p = $objp->code_sell_intra; + $objp->aarowid_suggest = $objp->aarowid_intra; + } else { + $objp->code_sell_p = $objp->code_sell_export; + $objp->aarowid_suggest = $objp->aarowid_export; + } + if (! empty($objp->code_sell)) { - $objp->code_sell_p = $objp->code_sell; // Code on product + //$objp->code_sell_p = $objp->code_sell; // Code on product } else { $code_sell_p_notset = 'color:orange'; } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 698d65795f1..4640701a6dd 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2013-2016 Marcos García * Copyright (C) 2012-2013 Cédric Salvador - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2019 Alexandre Spangaro * Copyright (C) 2014 Cédric Gross * Copyright (C) 2014-2015 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry @@ -1179,24 +1179,21 @@ else print $formaccounting->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, ''); print ''; - if ($conf->global->MAIN_FEATURES_LEVEL) + // Accountancy_code_sell_intra + if ($mysoc->isInEEC()) { - // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { - print ''.$langs->trans("ProductAccountancySellIntraCode").''; - print ''; - print $formaccounting->select_account(GETPOST('accountancy_code_sell_intra'), 'accountancy_code_sell_intra', 1, null, 1, 1, ''); - print ''; - } - - // Accountancy_code_sell_export - print ''.$langs->trans("ProductAccountancySellExportCode").''; + print ''.$langs->trans("ProductAccountancySellIntraCode").''; print ''; - print $formaccounting->select_account(GETPOST('accountancy_code_sell_export'), 'accountancy_code_sell_export', 1, null, 1, 1, ''); + print $formaccounting->select_account(GETPOST('accountancy_code_sell_intra'), 'accountancy_code_sell_intra', 1, null, 1, 1, ''); print ''; } + // Accountancy_code_sell_export + print ''.$langs->trans("ProductAccountancySellExportCode").''; + print ''; + print $formaccounting->select_account(GETPOST('accountancy_code_sell_export'), 'accountancy_code_sell_export', 1, null, 1, 1, ''); + print ''; + // Accountancy_code_buy print ''.$langs->trans("ProductAccountancyBuyCode").''; print ''; From 4c70c05e200099e16034de8f579735423dd25dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 23 Jan 2019 23:35:57 +0100 Subject: [PATCH 21/39] fix travis --- htdocs/website/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 31fc81280c2..f67160bf6d8 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1858,7 +1858,6 @@ if (! GETPOST('hide_websitemenu')) } print $form->textwithpicto($linktotestonwebserver, $htmltext, 1, 'none', 'valignmiddle', 0, 2, 'helpvirtualhost'); print ''; - } if (in_array($action, array('editcss','editmenu','file_manager'))) From 822706000f3ea4ed847822f67d32a671488ce0c1 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 24 Jan 2019 18:01:40 +0100 Subject: [PATCH 22/39] fix broken link into contact tpl --- htdocs/core/tpl/contacts.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index f1dfdf3d7a8..a603f0f9bbe 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -207,7 +207,7 @@ if ($permission) { if ($tab[$i]['source']=='external') { $contactstatic->fetch($tab[$i]['id']); - echo $contactstatic->getNomUrl(1, '', 0, 0, 0, 0, '', 'valignmiddle'); + echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0, '', 'valignmiddle'); } ?> From 97cc414b298b461f5c0e27e79851d6d1e31d7ff8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jan 2019 12:35:02 +0100 Subject: [PATCH 23/39] Update doliwamp --- build/exe/doliwamp/Languages/MyEnglish.isl | 2 +- build/exe/doliwamp/Languages/MyFrench.isl | 54 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/build/exe/doliwamp/Languages/MyEnglish.isl b/build/exe/doliwamp/Languages/MyEnglish.isl index c46827f889e..8a8ced59ddb 100644 --- a/build/exe/doliwamp/Languages/MyEnglish.isl +++ b/build/exe/doliwamp/Languages/MyEnglish.isl @@ -32,7 +32,7 @@ PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go bac FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? -ChooseDefaultBrowser=Please choose your default browser. If you are not sure, just click Open : +ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open : LaunchNow=Launch Dolibarr now diff --git a/build/exe/doliwamp/Languages/MyFrench.isl b/build/exe/doliwamp/Languages/MyFrench.isl index f3966334247..c3a91cdfdc1 100644 --- a/build/exe/doliwamp/Languages/MyFrench.isl +++ b/build/exe/doliwamp/Languages/MyFrench.isl @@ -2,47 +2,47 @@ [CustomMessages] NameAndVersion=%1 version %2 -Additionalcons=Ic�nes suppl�mentaires : -CreateDesktopIcon=Cr�er une ic�ne sur le &Bureau -CreateQuickLaunchIcon=Cr�er une ic�ne dans la barre de &Lancement rapide +AdditionalIcons=Icônes supplémentaires : +CreateDesktopIcon=Créer une icône sur le &Bureau +CreateQuickLaunchIcon=Créer une icône dans la barre de &Lancement rapide ProgramOnTheWeb=Page d'accueil de %1 -UninstallProgram=D�sinstaller %1 -LaunchProgram=Ex�cuter %1 +UninstallProgram=Désinstaller %1 +LaunchProgram=Exécuter %1 AssocFileExtension=&Associer %1 avec l'extension de fichier %2 AssocingFileExtension=Associe %1 avec l'extension de fichier %2... -YouWillInstallDoliWamp=Vous allez installer ou mettre � jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur. -ThisAssistantInstallOrUpgrade=Cet assistant installe ou met � jour Dolibarr ERP-CRM et tous ses composants pr�requis (Apache, Mysql et PHP) optimis�s pour une utilisation de Dolibarr. -IfYouHaveTechnicalKnowledge=Si vous cherchez un h�bergement dans le Cloud, aller voir sur https://saas.dolibarr.org. Si vous avez des comp�tences techniques et voulez g�rer vous m�me Apache, Mysql et PHP, vous ne devriez pas utiliser cet assistant mais faire plut�t une installation manuelle de Dolibarr sur votre socle Apache, Mysql et PHP existant. -ButIfYouLook=Mais si vous recherchez une installation automatis�e locale sur votre ordinateur, cl� en main, vous �tes sur la bonne voie... -DoYouWantToStart=Voulez-vous d�marrer le processus d'installation/mise � jour ? +YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur. +ThisAssistantInstallOrUpgrade=Cet assistant installe ou met à jour Dolibarr ERP-CRM et tous ses composants prérequis (Apache, Mysql et PHP) optimisés pour une utilisation de Dolibarr. +IfYouHaveTechnicalKnowledge=Si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant. +ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée, vous êtes sur la bonne voie... +DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ? -TechnicalParameters=Param�tres techniques -IfFirstInstall=S'il s'agit de la premi�re installation, merci de sp�cifier ces quelques param�tres techniques. Si vous ne les comprennez pas, �tes non s�r, ou proc�dez � une mise � jour, laissez les champs avec les valeurs propos�es par d�faut. +TechnicalParameters=Paramètres techniques +IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut. ; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS -SMTPServer=Serveur SMTP (le votre ou de votre FAI, premi�re installation uniquement): -ApachePort=Port Apache (premi�re installation uniquement, le choix standard est 80): -MySqlPort=Port Mysql (premi�re installation uniquement, le choix standard est 3306): -MySqlPassword=Mot de passe serveur+base MySql de root (premi�re installation uniquement): +SMTPServer=Serveur SMTP (le votre ou de votre FAI, première installation uniquement): +ApachePort=Port Apache (première installation uniquement, le choix standard est 80): +MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306): +MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement): -FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signal�. Cliquez sur OK pour continuer... +FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer... -PortAlreadyInUse=Le port %1 semble d�j� utilis�. Il est recommand� d'annuler pour revenir en arri�re et sp�cifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ? +PortAlreadyInUse=Le port %1 semble déjà utilisé. Il est recommandé d'annuler pour revenir en arrière et spécifier une autre valeur pour le port %2. Annuler le choix et choisir une autre valeur ? -FirefoxDetected=Firefox a �t� d�tect� sur votre ordinateur. Voulez-vous en faire votre navigateur par d�faut pour Dolibarr ? -ChromeDetected=Chrome a �t� d�tect� sur votre ordinateur. Voulez-vous en faire votre navigateur par d�faut pour Dolibarr ? -ChooseDefaultBrowser=Merci de choisir votre navigateur par d�faut. Si vous n'�tes pas s�r, cliquez simplement sur Ouvrir : +FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ? +ChromeDetected=Chrome a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ? +ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir : LaunchNow=Lancer Dolibarr maintenant -ProgramHasBeenRemoved=Les fichiers du programme Dolibarr ont �t� supprim�s. Toutefois, tous vos fichiers de donn�es sont toujours dans le r�pertoire %1. Vous devez supprimer ce r�pertoire manuellement pour avoir une d�sinstallation compl�te. +ProgramHasBeenRemoved=Les fichiers du programme Dolibarr ont été supprimés. Toutefois, tous vos fichiers de données sont toujours dans le répertoire %1. Vous devez supprimer ce répertoire manuellement pour avoir une désinstallation complète. -DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d�marrer ou red�marrer Apache et Mysql, ceci peut durer de quelques secondes � une minute apr�s cette confirmation. D�marrer l'installation ou mise � jour du serveur web et base de donn�es requis par Dolibarr ? +DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant démarrer ou redémarrer Apache et Mysql, ceci peut durer de quelques secondes à une minute après cette confirmation. Démarrer l'installation ou mise à jour du serveur web et base de données requis par Dolibarr ? -OldVersionFoundAndMoveInNew=Une ancienne version de base a �t� trouv�e et d�plac�e pour fonctionner avec la nouvelle version de Dolibarr. -OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a �t� trouv�e mais ne peut �tre d�plac�e pour �tre utilis�e avec la nouvelle version de Dolibarr. +OldVersionFoundAndMoveInNew=Une ancienne version de base a été trouvée et déplacée pour fonctionner avec la nouvelle version de Dolibarr. +OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a été trouvée mais ne peut être déplacée pour être utilisée avec la nouvelle version de Dolibarr. -DLLMissing=L'installation de votre Windows est incompl�te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit version (vcredist_x86.exe) d'abord (vous pourrez le trouver � https://www.microsoft.com/en-us/download/) puis relancer l'installation de DoliWamp après. -ContinueAnyway=Continuer malgr� tout (le process d'installaton échouera) +DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit version (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après. +ContinueAnyway=Continuer malgré tout (le process d'installaton échouera) From 43694f9384c981899ed755fb035fa7e5b93d73c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jan 2019 13:32:36 +0100 Subject: [PATCH 24/39] FIX Compatibility with windows 10 --- build/exe/doliwamp/rundoliadmin.bat.install | 2 +- build/exe/doliwamp/rundolihelp.bat.install | 2 +- build/exe/doliwamp/rundoliwamp.bat.install | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/exe/doliwamp/rundoliadmin.bat.install b/build/exe/doliwamp/rundoliadmin.bat.install index aa882b2335c..dcd113f4ab5 100644 --- a/build/exe/doliwamp/rundoliadmin.bat.install +++ b/build/exe/doliwamp/rundoliadmin.bat.install @@ -3,4 +3,4 @@ REM Launch Dolibarr Admin center REM ---------------------------- REM Go to admin center page -start "DoliWamp admin" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/ +start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/ diff --git a/build/exe/doliwamp/rundolihelp.bat.install b/build/exe/doliwamp/rundolihelp.bat.install index d0adbe3b4d7..eed5346de9f 100644 --- a/build/exe/doliwamp/rundolihelp.bat.install +++ b/build/exe/doliwamp/rundolihelp.bat.install @@ -4,4 +4,4 @@ REM --------------------------- REM Go to help center page echo Please wait... -start "Dolibarr Help center" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/ +start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/ diff --git a/build/exe/doliwamp/rundoliwamp.bat.install b/build/exe/doliwamp/rundoliwamp.bat.install index cbda6c86aba..c576c5d240b 100644 --- a/build/exe/doliwamp/rundoliwamp.bat.install +++ b/build/exe/doliwamp/rundoliwamp.bat.install @@ -3,7 +3,7 @@ REM Launch Dolibarr REM --------------- REM If no lock file, we call install process -IF NOT EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/ +IF NOT EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/ REM If lock file exists, we call home page -IF EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/ +IF EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/ From 6867a8a88a0ba8b68a3d3f5a0455b3cb8175a68e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jan 2019 13:46:59 +0100 Subject: [PATCH 25/39] Typo --- build/exe/doliwamp/Languages/MyFrench.isl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/exe/doliwamp/Languages/MyFrench.isl b/build/exe/doliwamp/Languages/MyFrench.isl index c3a91cdfdc1..1caaf25b693 100644 --- a/build/exe/doliwamp/Languages/MyFrench.isl +++ b/build/exe/doliwamp/Languages/MyFrench.isl @@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d OldVersionFoundAndMoveInNew=Une ancienne version de base a été trouvée et déplacée pour fonctionner avec la nouvelle version de Dolibarr. OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a été trouvée mais ne peut être déplacée pour être utilisée avec la nouvelle version de Dolibarr. -DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit version (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après. +DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après. ContinueAnyway=Continuer malgré tout (le process d'installaton échouera) From bec25fb45c8f62886158d2758c214437b4bfe011 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 27 Jan 2019 01:28:32 +0100 Subject: [PATCH 26/39] Remove absolut divs and add Dolistore POS category link to TakePOS --- htdocs/langs/en_US/cashdesk.lang | 3 +- htdocs/takepos/admin/setup.php | 8 +- htdocs/takepos/css/pos.css | 69 ++++++++++++-- .../takepos/img/marketplace/cashcontrol.jpg | Bin 80604 -> 0 bytes .../takepos/img/marketplace/takeposmobile.jpg | Bin 57525 -> 0 bytes htdocs/takepos/invoice.php | 2 +- htdocs/takepos/takepos.php | 85 +++++++++--------- 7 files changed, 116 insertions(+), 51 deletions(-) delete mode 100644 htdocs/takepos/img/marketplace/cashcontrol.jpg delete mode 100644 htdocs/takepos/img/marketplace/takeposmobile.jpg diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index e948f15f2b0..69137bfd998 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -52,4 +52,5 @@ CashFenceDone=Cash fence done for the period NbOfInvoices=Nb of invoices Paymentnumpad=Payment Num Pad Numberspad=Numbers Pad -BillsCoinsPad=Bills and Coins Pad \ No newline at end of file +BillsCoinsPad=Bills and Coins Pad +DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr \ No newline at end of file diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 2216d0b7659..88b6151621b 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -273,14 +273,14 @@ print '

'; // Marketplace print "\n"; print "\n"; -print ''; +print ''; print ''; print ''; print "\n"; -$url='https://www.dolistore.com/en/modules/980-TakePOS-7-mobile.html'; -print ''; -print ''; +$url='https://www.dolistore.com/45-pos'; + print ''; +print ''; print ''; print ''; diff --git a/htdocs/takepos/css/pos.css b/htdocs/takepos/css/pos.css index 15a2993f593..122f55ac974 100644 --- a/htdocs/takepos/css/pos.css +++ b/htdocs/takepos/css/pos.css @@ -2,10 +2,7 @@ html,body { padding:0; margin:0; height:100%; -} - -body { - width:100%; + width:100%; } .row { @@ -90,7 +87,7 @@ div.wrapper{ div.wrapper2{ float:left; /* important */ position:relative; /* important(so we can absolutely position the description div */ - width:10.2%; + width:10.9%; height:23%; margin-top:0.5%; margin-bottom:0.5%; @@ -126,6 +123,68 @@ div.description{ } } +.container{ + width: 98%; + height: 98%; + margin: 0 auto; + overflow: visible; + box-sizing: border-box; +} + +.row1{ + margin: 0 auto; + width: 100%; + height: 34%; +} + +.row2{ + margin: 0 auto; + width: 100%; + height: 66%; +} + +.div1{ + height:100%; + width: 33%; + float: left; + text-align: center; + box-sizing: border-box; +} + +.div2{ + height: 100%; + width: 33%; + font-size: 0; + float: left; + text-align: center; + padding-left: 10px; + box-sizing: border-box; +} + +.div3{ + height: 100%; + width: 33%; + float: left; + text-align: center; + box-sizing: border-box; +} + +.div4{ + height: 100%; + width: 34%; + float: left; + box-sizing: border-box; + font-size: 6px; +} + +.div5{ + height: 100%; + width: 66%; + float: left; + box-sizing: border-box; + font-size: 6px; +} + p.description_content{ padding:10px; margin:0px; diff --git a/htdocs/takepos/img/marketplace/cashcontrol.jpg b/htdocs/takepos/img/marketplace/cashcontrol.jpg deleted file mode 100644 index 66240218dff5cd3557993179a6185ab3bada8d1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80604 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 A$N&HU diff --git a/htdocs/takepos/img/marketplace/takeposmobile.jpg b/htdocs/takepos/img/marketplace/takeposmobile.jpg deleted file mode 100644 index 918f7c49d5e265b53ae235be41d784b35a889d82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57525 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�Uq6)r@jYGrOE?a9E0E)r< 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 CVQ 0) { if ($line->special_code == "3") { print ' order'; } print '" id="' . $line->rowid . '">'; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 83f21a506ea..c8d9b3f07bc 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -55,7 +55,7 @@ $head=' top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> - + @@ -353,27 +353,30 @@ $( document ).ready(function() { -
-
+
+
-
- - - - - - - - - - - - - - - - -
+
+
+ +
+ + + + + + + + + + + + + + + + +
-
+
'.$menu['title'].''; } ?> -
- -
+
+
+
+
-
id='catdiv'> - width="98%" id='catimg'/> -
-
-
-
+
id='catdiv'> + width="98%" id='catimg'/> +
+
+
+
-
+
-
+
-
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > - width="95%" id='proimg'/> -
-
-
-
+
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > + width="95%" id='proimg'/> +
+
+
+
+
+
- Date: Sun, 27 Jan 2019 09:17:01 +0100 Subject: [PATCH 27/39] correct menu --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 215ce25e398..e441fbce582 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -805,7 +805,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200); $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202); - $newmenu->add("/fichinter/card-red.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203); + $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203); $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); } } From 6e91b3cefcd28a410f59b224071704b932501f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 27 Jan 2019 10:49:34 +0100 Subject: [PATCH 28/39] PSR2 usage of else if is discouraged --- dev/examples/code/create_user.php | 2 +- dev/setup/codesniffer/ruleset.xml | 3 +- dev/translation/autotranslator.class.php | 4 +- dev/translation/sanity_check_en_langfiles.php | 4 +- dev/translation/strip_language_file.php | 2 +- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 14 +-- htdocs/accountancy/admin/card.php | 6 +- htdocs/accountancy/admin/categories_list.php | 16 +-- htdocs/accountancy/admin/fiscalyear_card.php | 6 +- htdocs/accountancy/admin/journals_list.php | 12 +-- htdocs/accountancy/bookkeeping/card.php | 6 +- htdocs/accountancy/customer/lines.php | 4 +- htdocs/accountancy/customer/list.php | 4 +- htdocs/accountancy/expensereport/lines.php | 4 +- htdocs/accountancy/expensereport/list.php | 4 +- htdocs/accountancy/journal/bankjournal.php | 50 +++++----- htdocs/accountancy/supplier/lines.php | 4 +- htdocs/accountancy/supplier/list.php | 4 +- htdocs/adherents/class/adherent.class.php | 4 +- htdocs/adherents/class/api_members.class.php | 2 +- htdocs/adherents/stats/geo.php | 6 +- htdocs/adherents/subscription.php | 4 +- htdocs/adherents/type.php | 10 +- htdocs/admin/agenda_other.php | 8 +- htdocs/admin/agenda_reminder.php | 8 +- htdocs/admin/bank.php | 4 +- htdocs/admin/boxes.php | 6 +- htdocs/admin/commande.php | 20 ++-- htdocs/admin/company.php | 12 +-- htdocs/admin/confexped.php | 2 +- htdocs/admin/const.php | 2 +- htdocs/admin/contract.php | 12 +-- htdocs/admin/dict.php | 80 +++++++-------- htdocs/admin/dolistore/ajax/image.php | 2 +- .../admin/dolistore/class/dolistore.class.php | 2 +- htdocs/admin/ecm.php | 2 +- htdocs/admin/expedition.php | 12 +-- htdocs/admin/expensereport.php | 12 +-- htdocs/admin/facture.php | 8 +- htdocs/admin/fckeditor.php | 2 +- htdocs/admin/fichinter.php | 14 +-- htdocs/admin/holiday.php | 12 +-- htdocs/admin/ihm.php | 2 +- htdocs/admin/mails.php | 4 +- htdocs/admin/mails_templates.php | 4 +- htdocs/admin/menus/other.php | 2 +- htdocs/admin/modules.php | 8 +- htdocs/admin/notification.php | 2 +- htdocs/admin/pdf.php | 2 +- htdocs/admin/prelevement.php | 4 +- htdocs/admin/propal.php | 6 +- htdocs/admin/reception_setup.php | 12 +-- htdocs/admin/security.php | 6 +- htdocs/admin/security_file.php | 2 +- htdocs/admin/security_other.php | 4 +- htdocs/admin/supplier_invoice.php | 8 +- htdocs/admin/supplier_order.php | 16 +-- htdocs/admin/supplier_payment.php | 10 +- htdocs/admin/supplier_proposal.php | 6 +- htdocs/admin/syslog.php | 2 +- htdocs/admin/system/constall.php | 2 +- htdocs/admin/system/database-tables.php | 6 +- htdocs/admin/system/dbtable.php | 2 +- htdocs/admin/system/dolibarr.php | 4 +- htdocs/admin/tools/dolibarr_export.php | 2 +- htdocs/admin/tools/dolibarr_import.php | 4 +- htdocs/admin/tools/eaccelerator.php | 12 +-- htdocs/admin/tools/listsessions.php | 2 +- htdocs/admin/translation.php | 2 +- htdocs/api/class/api.class.php | 2 +- htdocs/api/class/api_setup.class.php | 2 +- htdocs/blockedlog/admin/blockedlog_list.php | 2 +- htdocs/blockedlog/class/authority.class.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 24 ++--- htdocs/cashdesk/class/Facturation.class.php | 30 +++--- htdocs/cashdesk/facturation.php | 2 +- htdocs/cashdesk/facturation_verif.php | 4 +- htdocs/categories/card.php | 24 ++--- htdocs/categories/class/categorie.class.php | 6 +- htdocs/categories/traduction.php | 2 +- htdocs/categories/viewcat.php | 12 +-- htdocs/comm/action/card.php | 4 +- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/comm/action/index.php | 10 +- htdocs/comm/action/pertype.php | 8 +- htdocs/comm/action/peruser.php | 8 +- htdocs/comm/address.php | 8 +- htdocs/comm/index.php | 6 +- htdocs/comm/mailing/card.php | 22 ++--- htdocs/comm/mailing/cibles.php | 6 +- .../mailing/class/advtargetemailing.class.php | 8 +- htdocs/comm/propal/card.php | 66 ++++++------- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/comm/propal/contact.php | 6 +- htdocs/comm/propal/index.php | 2 +- htdocs/comm/propal/list.php | 2 +- htdocs/commande/card.php | 64 ++++++------ htdocs/commande/class/api_orders.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/commande/contact.php | 4 +- htdocs/compta/bank/card.php | 8 +- htdocs/compta/bank/class/account.class.php | 4 +- htdocs/compta/bank/ligne.php | 26 ++--- htdocs/compta/deplacement/card.php | 16 +-- .../class/deplacementstats.class.php | 2 +- htdocs/compta/facture/card.php | 64 ++++++------ .../facture/class/facture-rec.class.php | 4 +- htdocs/compta/facture/class/facture.class.php | 12 +-- htdocs/compta/facture/contact.php | 4 +- htdocs/compta/facture/fiche-rec.php | 4 +- .../compta/facture/invoicetemplate_list.php | 8 +- htdocs/compta/facture/list.php | 4 +- htdocs/compta/localtax/clients.php | 8 +- htdocs/compta/localtax/quadri_detail.php | 4 +- htdocs/compta/paiement/cheque/card.php | 2 +- .../cheque/class/remisecheque.class.php | 4 +- htdocs/compta/paiement/cheque/list.php | 4 +- .../compta/paiement/class/paiement.class.php | 10 +- htdocs/compta/resultat/index.php | 28 +++--- .../salaries/class/salariesstats.class.php | 2 +- htdocs/compta/stats/byratecountry.php | 6 +- htdocs/compta/stats/cabyprodserv.php | 10 +- htdocs/compta/stats/cabyuser.php | 6 +- htdocs/compta/stats/casoc.php | 14 +-- htdocs/compta/stats/index.php | 8 +- htdocs/compta/tva/clients.php | 6 +- htdocs/compta/tva/list.php | 2 +- htdocs/compta/tva/quadri_detail.php | 6 +- htdocs/contact/class/contact.class.php | 4 +- htdocs/contact/list.php | 12 +-- htdocs/contact/perso.php | 2 +- htdocs/contrat/card.php | 28 +++--- htdocs/contrat/class/contrat.class.php | 2 +- htdocs/contrat/list.php | 6 +- htdocs/core/actions_builddoc.inc.php | 2 +- htdocs/core/actions_sendmails.inc.php | 6 +- htdocs/core/actions_setnotes.inc.php | 2 +- htdocs/core/ajax/ajaxdirpreview.php | 30 +++--- htdocs/core/ajax/constantonoff.php | 2 +- htdocs/core/ajax/extraparams.php | 16 +-- htdocs/core/ajax/loadinplace.php | 12 +-- htdocs/core/ajax/price.php | 2 +- htdocs/core/ajax/saveinplace.php | 16 +-- .../boxes/box_graph_product_distribution.php | 6 +- htdocs/core/class/CMailFile.class.php | 8 +- htdocs/core/class/CSMSFile.class.php | 2 +- .../core/class/commondocgenerator.class.php | 10 +- htdocs/core/class/commonobject.class.php | 90 ++++++++--------- htdocs/core/class/conf.class.php | 10 +- htdocs/core/class/coreobject.class.php | 6 +- htdocs/core/class/discount.class.php | 4 +- htdocs/core/class/dolgeoip.class.php | 2 +- htdocs/core/class/dolgraph.class.php | 2 +- htdocs/core/class/extrafields.class.php | 14 +-- htdocs/core/class/fileupload.class.php | 4 +- htdocs/core/class/html.form.class.php | 98 +++++++++---------- htdocs/core/class/html.formadmin.class.php | 4 +- htdocs/core/class/html.formcompany.class.php | 14 +-- htdocs/core/class/html.formcontract.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 48 ++++----- htdocs/core/class/html.formmail.class.php | 6 +- htdocs/core/class/html.formprojet.class.php | 10 +- htdocs/core/class/html.formsms.class.php | 2 +- htdocs/core/class/interfaces.class.php | 4 +- htdocs/core/class/menubase.class.php | 2 +- htdocs/core/class/rssparser.class.php | 4 +- htdocs/core/class/smtps.class.php | 10 +- htdocs/core/class/translate.class.php | 8 +- htdocs/core/db/mssql.class.php | 8 +- htdocs/core/db/mysqli.class.php | 4 +- htdocs/core/db/pgsql.class.php | 12 +-- htdocs/core/db/sqlite3.class.php | 16 +-- .../connectors/php/commands.php | 2 +- htdocs/core/lib/bank.lib.php | 2 +- htdocs/core/lib/barcode.lib.php | 8 +- htdocs/core/lib/company.lib.php | 10 +- htdocs/core/lib/date.lib.php | 18 ++-- htdocs/core/lib/files.lib.php | 98 +++++++++---------- htdocs/core/lib/functions.lib.php | 98 +++++++++---------- htdocs/core/lib/functions2.lib.php | 34 +++---- htdocs/core/lib/geturl.lib.php | 8 +- htdocs/core/lib/ldap.lib.php | 6 +- htdocs/core/lib/memory.lib.php | 8 +- htdocs/core/lib/modulebuilder.lib.php | 6 +- htdocs/core/lib/pdf.lib.php | 16 +-- htdocs/core/lib/product.lib.php | 6 +- htdocs/core/lib/project.lib.php | 4 +- htdocs/core/lib/security.lib.php | 92 ++++++++--------- htdocs/core/lib/security2.lib.php | 2 +- htdocs/core/lib/tax.lib.php | 20 ++-- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/login/functions_openid.php | 4 +- htdocs/core/menus/standard/auguria.lib.php | 8 +- htdocs/core/menus/standard/auguria_menu.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 8 +- htdocs/core/menus/standard/eldy_menu.php | 2 +- htdocs/core/menus/standard/empty.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 2 +- .../barcode/doc/tcpdfbarcode.modules.php | 2 +- .../barcode/mod_barcode_product_standard.php | 2 +- .../modules/contract/mod_contract_olive.php | 2 +- .../modules/dons/html_cerfafr.modules.php | 30 +++--- .../doc/pdf_standard.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 8 +- .../core/modules/facture/mod_facture_mars.php | 6 +- .../modules/facture/mod_facture_mercure.php | 4 +- .../modules/facture/mod_facture_terre.php | 4 +- .../modules/import/import_csv.modules.php | 6 +- .../modules/import/import_xlsx.modules.php | 6 +- .../modules/mailings/xinputfile.modules.php | 2 +- .../modules/member/doc/pdf_standard.class.php | 12 +-- .../doc/pdf_standardlabel.class.php | 12 +-- .../printsheet/doc/pdf_tcpdflabel.class.php | 16 +-- .../product/mod_codeproduct_elephant.php | 6 +- .../product/mod_codeproduct_leopard.php | 2 +- .../societe/mod_codeclient_elephant.php | 4 +- .../societe/mod_codeclient_leopard.php | 2 +- .../modules/societe/mod_codeclient_monkey.php | 2 +- .../societe/mod_codecompta_aquarium.php | 6 +- .../stock/doc/pdf_stdmovement.modules.php | 2 +- .../mod_facture_fournisseur_cactus.php | 4 +- .../mod_facture_fournisseur_tulip.php | 4 +- htdocs/core/photos_resize.php | 16 +-- htdocs/core/tpl/card_presend.tpl.php | 2 +- htdocs/core/tpl/login.tpl.php | 2 +- htdocs/core/tpl/objectline_create.tpl.php | 6 +- htdocs/core/tpl/passwordforgotten.tpl.php | 2 +- htdocs/cron/card.php | 2 +- htdocs/don/admin/donation.php | 6 +- htdocs/don/card.php | 2 +- htdocs/don/class/don.class.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 4 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/dir_card.php | 2 +- htdocs/expedition/card.php | 32 +++--- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/expedition/contact.php | 4 +- htdocs/expedition/shipment.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/exports/export.php | 2 +- htdocs/externalsite/frames.php | 2 +- htdocs/fichinter/card-rec.php | 4 +- htdocs/fichinter/card.php | 36 +++---- htdocs/fichinter/contact.php | 4 +- htdocs/filefunc.inc.php | 2 +- .../fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 8 +- htdocs/fourn/commande/card.php | 40 ++++---- htdocs/fourn/commande/contact.php | 4 +- htdocs/fourn/commande/dispatch.php | 2 +- htdocs/fourn/facture/card.php | 22 ++--- htdocs/fourn/facture/contact.php | 4 +- htdocs/fourn/facture/paiement.php | 4 +- htdocs/ftp/index.php | 10 +- htdocs/holiday/card.php | 8 +- htdocs/hrm/establishment/card.php | 4 +- htdocs/install/check.php | 2 +- htdocs/install/inc.php | 16 +-- htdocs/install/lib/repair.lib.php | 8 +- htdocs/install/repair.php | 14 +-- htdocs/install/step1.php | 4 +- htdocs/install/upgrade.php | 2 +- htdocs/install/upgrade2.php | 2 +- htdocs/livraison/card.php | 2 +- htdocs/loan/card.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/master.inc.php | 6 +- htdocs/opensurvey/exportcsv.php | 2 +- htdocs/opensurvey/results.php | 12 +-- htdocs/product/admin/product.php | 2 +- htdocs/product/admin/product_extrafields.php | 2 +- .../product/actions_card_product.class.php | 10 +- .../service/actions_card_service.class.php | 2 +- htdocs/product/card.php | 10 +- .../product/class/html.formproduct.class.php | 8 +- htdocs/product/class/product.class.php | 14 +-- htdocs/product/composition/card.php | 2 +- .../class/price_parser.class.php | 6 +- htdocs/product/dynamic_price/editor.php | 6 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/index.php | 4 +- htdocs/product/list.php | 6 +- htdocs/product/popuprop.php | 2 +- htdocs/product/price.php | 2 +- htdocs/product/stats/card.php | 2 +- .../stock/class/mouvementstock.class.php | 6 +- .../product/stock/lib/replenishment.lib.php | 2 +- htdocs/product/stock/movement_list.php | 2 +- htdocs/product/stock/replenishorders.php | 4 +- htdocs/product/traduction.php | 2 +- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/admin/project.php | 20 ++-- htdocs/projet/class/project.class.php | 6 +- htdocs/projet/element.php | 26 ++--- htdocs/projet/list.php | 10 +- htdocs/projet/tasks.php | 16 +-- htdocs/projet/tasks/list.php | 8 +- htdocs/projet/tasks/time.php | 6 +- htdocs/public/members/new.php | 8 +- htdocs/public/onlinesign/newonlinesign.php | 2 +- htdocs/public/opensurvey/studs.php | 12 +-- htdocs/public/payment/newpayment.php | 4 +- htdocs/public/payment/paymentko.php | 2 +- htdocs/public/payment/paymentok.php | 6 +- htdocs/reception/card.php | 22 ++--- htdocs/reception/class/reception.class.php | 2 +- htdocs/reception/contact.php | 4 +- htdocs/resource/contact.php | 4 +- htdocs/societe/admin/societe.php | 2 +- .../canvas/actions_card_common.class.php | 2 +- htdocs/societe/card.php | 8 +- htdocs/societe/class/societe.class.php | 12 +-- htdocs/societe/consumption.php | 4 +- htdocs/societe/societecontact.php | 4 +- htdocs/supplier_proposal/card.php | 50 +++++----- .../class/supplier_proposal.class.php | 2 +- htdocs/supplier_proposal/contact.php | 4 +- htdocs/supplier_proposal/index.php | 2 +- htdocs/takepos/customers.php | 4 +- htdocs/takepos/genimg/index.php | 2 +- htdocs/takepos/invoice.php | 11 +-- htdocs/takepos/takepos.php | 4 +- htdocs/user/card.php | 10 +- htdocs/user/class/user.class.php | 6 +- htdocs/user/class/usergroup.class.php | 2 +- htdocs/user/group/card.php | 2 +- htdocs/user/hierarchy.php | 2 +- htdocs/user/home.php | 2 +- htdocs/user/list.php | 6 +- htdocs/user/perms.php | 4 +- .../webservices/server_productorservice.php | 2 +- htdocs/website/index.php | 2 +- scripts/user/sync_groups_ldap2dolibarr.php | 2 +- scripts/user/sync_users_ldap2dolibarr.php | 2 +- 335 files changed, 1524 insertions(+), 1526 deletions(-) diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index f8e0ba23011..4e6669de03c 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -80,7 +80,7 @@ if ($idobject > 0) dol_print_error($db,$obj->error); } } -else if ($obj->error == 'ErrorLoginAlreadyExists') +elseif ($obj->error == 'ErrorLoginAlreadyExists') { print "User with login ".$obj->login." already exists\n"; } diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 879d791b8e9..525797429b5 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -65,7 +65,7 @@ 0 - + diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 123b7f6157d..fbab36c0120 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -221,8 +221,8 @@ class autoTranslator } if ($key == 'CHARSET') $val=$this->_outputpagecode; - else if (preg_match('/^Format/',$key)) $val=$value; - else if ($value=='-') $val=$value; + elseif (preg_match('/^Format/',$key)) $val=$value; + elseif ($value=='-') $val=$value; else { // If not translated then translate diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 0e3b2c7513f..cfc51e210f4 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -215,8 +215,8 @@ foreach ($dups as $string => $pages) $s.="\n"; if ($duplicateinsamefile) $sduplicateinsamefile .= $s; - else if ($inmain) $sinmainandother .= $s; - else if ($inadmin) $sininstallandadmin .= $s; + elseif ($inmain) $sinmainandother .= $s; + elseif ($inadmin) $sininstallandadmin .= $s; else $sother .= $s; } diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index 92233d71b98..685626d6c11 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -310,7 +310,7 @@ foreach($filesToProcess as $fileToProcess) { //print "Key $key is a key we always want to see into secondary file (line: $cnt).\n"; } - else if ( ! array_key_exists($key, $aSecondary)) + elseif ( ! array_key_exists($key, $aSecondary)) { //print "Key $key does NOT exist in secondary language (line: $cnt).\n"; continue; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c9b72d9cc4c..45ecb5cd6e6 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -162,7 +162,7 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($accounting->error, $accounting->errors, 'errors'); } - } else if ($action == 'enable') { + } elseif ($action == 'enable') { if ($accounting->fetch($id)) { $result = $accounting->account_activate($id); } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e5f1d211f3b..809132b3719 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -270,7 +270,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($value == 'entity') { + elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -318,7 +318,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -535,7 +535,7 @@ if ($id) { print '
'; } @@ -729,14 +729,14 @@ if ($id) { $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; } - else if ($value == 'source') + elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -747,7 +747,7 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='country_id') { $showfield=0; } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index a2ec757b212..b8e6945b632 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -124,7 +124,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) exit; } } -} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) { if (! $cancel) { $result = $object->fetch($id); @@ -177,7 +177,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) header("Location: " . $urltogo); exit(); } -} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) { $result = $object->fetch($id); if (! empty($object->id)) { @@ -272,7 +272,7 @@ if ($action == 'create') { print ''; } -else if ($id > 0 || $ref) { +elseif ($id > 0 || $ref) { $result = $object->fetch($id, $ref, 1); diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1f10403f798..1f4748266b1 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -268,7 +268,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($field == 'fk_country' && $_POST['country'] > 0) { $_POST[$listfieldvalue[$i]] = $_POST['country']; } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -492,7 +492,7 @@ if ($id) { print ''; } @@ -699,10 +699,10 @@ if ($id) { $valuetoshow = yn($valuetoshow); } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -713,20 +713,20 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { $langs->loadLangs(array("propal")); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { $key=$langs->trans("Action".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 297a3026b02..42a6710c3c1 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -73,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") { } } -else if ($action == 'add') { +elseif ($action == 'add') { if (! GETPOST('cancel', 'alpha')) { $error = 0; @@ -118,7 +118,7 @@ else if ($action == 'add') { } // Update record -else if ($action == 'update') { +elseif ($action == 'update') { if (! GETPOST('cancel', 'alpha')) { $result = $object->fetch($id); @@ -198,7 +198,7 @@ if ($action == 'create') print ''; print ''; -} else if ($id) { +} elseif ($id) { $result = $object->fetch($id); if ($result > 0) { $head = fiscalyear_prepare_head($object); diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 49745676eb3..111a707d51d 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -270,7 +270,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -441,7 +441,7 @@ if ($id) { print ''; } @@ -611,11 +611,11 @@ if ($id) if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { + elseif ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { $key=$langs->trans("AccountingJournalType".strtoupper($obj->nature)); $valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { $valuetoshow=$langs->trans($obj->label); } @@ -630,8 +630,8 @@ if ($id) if (isset($obj->code) && $id != 10) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } $canbemodified=$iserasable; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 36ed261f20f..4cc03f7a529 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -140,7 +140,7 @@ if ($action == "confirm_update") { } } -else if ($action == "add") { +elseif ($action == "add") { $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) @@ -201,7 +201,7 @@ else if ($action == "add") { } } -else if ($action == "confirm_delete") { +elseif ($action == "confirm_delete") { $object = new BookKeeping($db); $result = $object->fetch($id, null, $mode); @@ -218,7 +218,7 @@ else if ($action == "confirm_delete") { $action = ''; } -else if ($action == "confirm_create") { +elseif ($action == "confirm_create") { $error = 0; $object = new BookKeeping($db); diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 46ebb8b4bc8..4a4cfa928ac 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -219,12 +219,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index c6c12a26f31..79ff0d07ae6 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -257,12 +257,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c617f984af3..c6fa1202171 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -190,12 +190,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 6977d76845d..078a91bc96e 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -219,12 +219,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 24bf2097b67..b6b5137fe34 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -290,18 +290,18 @@ if ($result) { $paymentstatic->ref = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2, '', ''); // TODO Do not include list of invoice in tooltip, the dol_string_nohtmltag is ko with this $tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id; - } else if ($links[$key]['type'] == 'payment_supplier') { + } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->id = $links[$key]['url_id']; $paymentsupplierstatic->ref = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentsupplierid"] = $paymentsupplierstatic->id; - } else if ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; $societestatic->name = $links[$key]['label']; $societestatic->email = $tabcompany[$obj->rowid]['email']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } else if ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { $userstatic->id = $links[$key]['url_id']; $userstatic->name = $links[$key]['label']; $userstatic->email = $tabuser[$obj->rowid]['email']; @@ -310,7 +310,7 @@ if ($result) { if ($userstatic->id > 0) $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); else $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment. if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount; - } else if ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { $chargestatic->id = $links[$key]['url_id']; $chargestatic->ref = $links[$key]['url_id']; @@ -339,14 +339,14 @@ if ($result) { $objmid = $db->fetch_object($resultmid); $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; } - } else if ($links[$key]['type'] == 'payment_donation') { + } elseif ($links[$key]['type'] == 'payment_donation') { $paymentdonstatic->id = $links[$key]['url_id']; $paymentdonstatic->ref = $links[$key]['url_id']; $paymentdonstatic->fk_donation = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id; $tabtp[$obj->rowid][$account_pay_donation] += $obj->amount; - } else if ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { $paymentsubscriptionstatic->id = $links[$key]['url_id']; $paymentsubscriptionstatic->ref = $links[$key]['url_id']; $paymentsubscriptionstatic->label = $links[$key]['label']; @@ -354,24 +354,24 @@ if ($result) { $tabpay[$obj->rowid]["paymentsubscriptionid"] = $paymentsubscriptionstatic->id; $paymentsubscriptionstatic->fetch($paymentsubscriptionstatic->id); $tabtp[$obj->rowid][$account_pay_subscription] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_vat') { // Payment VAT + } elseif ($links[$key]['type'] == 'payment_vat') { // Payment VAT $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $links[$key]['url_id']; $paymentvatstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentvatid"] = $paymentvatstatic->id; $tabtp[$obj->rowid][$account_pay_vat] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_salary') { + } elseif ($links[$key]['type'] == 'payment_salary') { $paymentsalstatic->id = $links[$key]['url_id']; $paymentsalstatic->ref = $links[$key]['url_id']; $paymentsalstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id; - } else if ($links[$key]['type'] == 'payment_expensereport') { + } elseif ($links[$key]['type'] == 'payment_expensereport') { $paymentexpensereportstatic->id = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= $paymentexpensereportstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentexpensereport"] = $paymentexpensereportstatic->id; - } else if ($links[$key]['type'] == 'payment_various') { + } elseif ($links[$key]['type'] == 'payment_various') { $paymentvariousstatic->id = $links[$key]['url_id']; $paymentvariousstatic->ref = $links[$key]['url_id']; $paymentvariousstatic->label = $links[$key]['label']; @@ -380,7 +380,7 @@ if ($result) { $paymentvariousstatic->fetch($paymentvariousstatic->id); $account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word $tabtp[$obj->rowid][$account_various] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_loan') { + } elseif ($links[$key]['type'] == 'payment_loan') { $paymentloanstatic->id = $links[$key]['url_id']; $paymentloanstatic->ref = $links[$key]['url_id']; $paymentloanstatic->fk_loan = $links[$key]['url_id']; @@ -399,7 +399,7 @@ if ($result) { $tabtp[$obj->rowid][$objmid->accountancy_account_insurance] -= $objmid->amount_insurance; $tabtp[$obj->rowid][$objmid->accountancy_account_interest] -= $objmid->amount_interest; } - } else if ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { $accountLinestatic->fetch($links[$key]['url_id']); $tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1); $tabtp[$obj->rowid][$account_transfer] += $obj->amount; @@ -567,68 +567,68 @@ if (! $error && $action == 'writebookkeeping') { $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice + } elseif ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice $bookkeeping->subledger_account = $tabcompany[$key]['code_compta']; $bookkeeping->subledger_label = $tabcompany[$key]['name']; $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_expensereport') { + } elseif ($tabtype[$key] == 'payment_expensereport') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; $accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_salary') { + } elseif ($tabtype[$key] == 'payment_salary') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; $accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution + } elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $objmid->labelc; - } else if ($tabtype[$key] == 'payment_vat') { + } elseif ($tabtype[$key] == 'payment_vat') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_donation') { + } elseif ($tabtype[$key] == 'payment_donation') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'member') { + } elseif ($tabtype[$key] == 'member') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_loan') { + } elseif ($tabtype[$key] == 'payment_loan') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_various') { + } elseif ($tabtype[$key] == 'payment_various') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'banktransfert') { + } elseif ($tabtype[$key] == 'banktransfert') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; @@ -845,11 +845,11 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; if ($tabtype[$key] == 'payment_supplier') { print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep; - } else if($tabtype[$key] == 'payment') { + } elseif($tabtype[$key] == 'payment') { print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep; - } else if($tabtype[$key] == 'payment_expensereport') { + } elseif($tabtype[$key] == 'payment_expensereport') { print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep; - } else if($tabtype[$key] == 'payment_salary') { + } elseif($tabtype[$key] == 'payment_salary') { print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep; } else { print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 051562c656e..585c8400680 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -214,12 +214,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 4ca53d4bcab..1a315897f02 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -256,12 +256,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3a698c6b042..826e1ddef1d 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2487,7 +2487,7 @@ class Adherent extends CommonObject if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption) } // Set LDAP password if possible - else if ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password + elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password { if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) { @@ -2502,7 +2502,7 @@ class Adherent extends CommonObject } } // Use $this->pass_indatabase value if exists - else if (! empty($this->pass_indatabase)) + elseif (! empty($this->pass_indatabase)) { if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 4); // md5 for OpenLdap TODO add type of encryption diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 2da35df7e2c..7db60a11003 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -213,7 +213,7 @@ class Members extends DolibarrApi if ($result < 0) { throw new RestException(500, 'Error when resiliating member: '.$member->error); } - } else if ($value == '1') { + } elseif ($value == '1') { $result = $member->validate(DolibarrApiAccess::$user); if ($result < 0) { throw new RestException(500, 'Error when validating member: '.$member->error); diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 8da764179a4..1a52c9226f5 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -210,9 +210,9 @@ if ($mode && ! count($data)) else { if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'
'; - else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'
'; - else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'
'; - else if ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'
';//+ + elseif ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'
'; + elseif ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'
'; + elseif ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'
';//+ else { print $langs->trans("MembersStatisticsDesc").'
'; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index e476492fdfa..86c31e6cd04 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -793,8 +793,8 @@ if ($rowid > 0) else { if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $bankviainvoice=1; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1; } print "\n\n\n"; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c1ce5c2c294..86b149fe2b9 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -538,11 +538,11 @@ if ($rowid > 0) if ($status != '') { if ($status == '-1,1') { $titre=$langs->trans("MembersListQualified"); } - else if ($status == '-1') { $titre=$langs->trans("MembersListToValid"); } - else if ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); } - else if ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); } - else if ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } - else if ($status == '0') { $titre=$langs->trans("MembersListResiliated"); } + elseif ($status == '-1') { $titre=$langs->trans("MembersListToValid"); } + elseif ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); } + elseif ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); } + elseif ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } + elseif ($status == '0') { $titre=$langs->trans("MembersListResiliated"); } } elseif ($action == 'search') { diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 72097057149..f16226c812b 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -86,7 +86,7 @@ if ($action == 'set') dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -133,13 +133,13 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -149,7 +149,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 856d6f19668..10d716a1af6 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -81,7 +81,7 @@ if ($action == 'set') dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -128,13 +128,13 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -144,7 +144,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 031e4200268..34becb49ada 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -133,7 +133,7 @@ if ($action == 'specimen') { if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') { +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { if ($conf->global->BANKADDON_PDF == "$value") @@ -141,7 +141,7 @@ else if ($action == 'del') { } } // Set default model -else if ($action == 'setdoc') { +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // The constant that was read before the new set diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index c0480bb7e50..c5bc3f596b4 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -289,14 +289,14 @@ if ($resql) $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } - else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) + elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) { $box_order = "B0".$record['box_order']; $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } } - else if (dol_strlen($record['box_order']) == 2) + elseif (dol_strlen($record['box_order']) == 2) { if (preg_match("/[13579]{1}/",substr($record['box_order'],-1))) { @@ -304,7 +304,7 @@ if ($resql) $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } - else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) + elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) { $box_order = "B".$record['box_order']; $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 2360c1f7b6e..42ea60d0f9f 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -73,7 +73,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -119,12 +119,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -134,7 +134,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -151,7 +151,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated // by calling method canBeActivated @@ -159,7 +159,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') +elseif ($action == 'set_COMMANDE_DRAFT_WATERMARK') { $draft = GETPOST("COMMANDE_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); @@ -176,7 +176,7 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') } } -else if ($action == 'set_ORDER_FREE_TEXT') +elseif ($action == 'set_ORDER_FREE_TEXT') { $freetext = GETPOST("ORDER_FREE_TEXT",'none'); // No alpha here, we want exact string @@ -195,7 +195,7 @@ else if ($action == 'set_ORDER_FREE_TEXT') } // Activate Set Shippable Icon In List -else if ($action=="setshippableiconinlist") { +elseif ($action=="setshippableiconinlist") { $setshippableiconinlist = GETPOST('value','int'); $res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity); if (! $res > 0) $error++; @@ -207,7 +207,7 @@ else if ($action=="setshippableiconinlist") { } // Activate ask for payment bank -else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') +elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER",$value,'chaine',0,'',$conf->entity); @@ -224,7 +224,7 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') } // Activate ask for warehouse -else if ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') +elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') { $res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER",$value,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f0a0cde4c92..41786c2c55b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -137,7 +137,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING); } - else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) + elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) { $error++; $langs->load("errors"); @@ -821,7 +821,7 @@ else { print '
  '; } - else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { print ''; } @@ -1097,11 +1097,11 @@ else { print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) { print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); } @@ -1151,11 +1151,11 @@ else { print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) { print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) { print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); } diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index 660f7c7c500..a54e1eb7aeb 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -71,7 +71,7 @@ if ($action == 'activate_delivery') header("Location: confexped.php"); exit; } -else if ($action == 'disable_delivery') +elseif ($action == 'disable_delivery') { dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity); header("Location: confexped.php"); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index cfda870e9da..fedccb49642 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -233,7 +233,7 @@ $sql.= ", entity"; $sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")"; if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug -else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); $sql.= " ORDER BY entity, name ASC"; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 60be9e062ba..0a704ce5ee8 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -69,7 +69,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For contract +elseif ($action == 'specimen') // For contract { $modele= GETPOST('module','alpha'); @@ -115,12 +115,12 @@ else if ($action == 'specimen') // For contract } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -130,7 +130,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -147,7 +147,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -155,7 +155,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_other') +elseif ($action == 'set_other') { $freetext= GETPOST('CONTRACT_FREE_TEXT','none'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fc3b8f15f39..a77583b44b8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -728,7 +728,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($value == 'entity') { + elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]); } if ($i) $sql.=","; @@ -780,7 +780,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]); } if ($i) $sql.=","; @@ -1125,7 +1125,7 @@ if ($id) { print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; } @@ -1409,14 +1409,14 @@ if ($id) { $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; } - else if ($value == 'source') + elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -1427,143 +1427,143 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { + elseif ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { $valuetoshow=yn($valuetoshow); $align="center"; } - else if ($fieldlist[$field]=='type_cdr') { + elseif ($fieldlist[$field]=='type_cdr') { if(empty($valuetoshow)) $valuetoshow = $langs->trans('None'); elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth'); elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext'); $align="center"; } - else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) { + elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) { $valuetoshow=price($valuetoshow); } if ($value == 'private') { $valuetoshow = yn($elementList[$valuetoshow]); } - else if ($fieldlist[$field]=='libelle_facture') { + elseif ($fieldlist[$field]=='libelle_facture') { $langs->load("bills"); $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); $valuetoshow=nl2br($valuetoshow); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { $langs->load("propal"); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { $key=$langs->trans("Action".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { + elseif (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { $key=$langs->trans("Currency".strtoupper($obj->code_iso)); $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { $key=$langs->trans(strtoupper($obj->code)); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { $key=$langs->trans(strtoupper($obj->code)); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { $key=$langs->trans("Civility".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { $langs->load('agenda'); $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { $langs->load("bills"); $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { $langs->load("bills"); $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { $langs->load("orders"); $key=$langs->trans($obj->code); $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]}; } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { $langs->load("sendings"); $key=$langs->trans("SendingMethod".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') + elseif ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') { $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') + elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { $langs->load('trips'); $key = $langs->trans(strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } - else if ($fieldlist[$field]=='unicode') { + elseif ($fieldlist[$field]=='unicode') { $valuetoshow = $langs->getCurrencySymbol($obj->code,1); } - else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + elseif ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { $langs->load("products"); $valuetoshow=$langs->trans($obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + elseif ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { $langs->load("products"); $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); } - else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) + elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) { $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') { + elseif ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') { $align="center"; } - else if ($fieldlist[$field]=='localtax1_type') { + elseif ($fieldlist[$field]=='localtax1_type') { if ($obj->localtax1 != 0) $valuetoshow=$localtax_typeList[$valuetoshow]; else $valuetoshow = ''; $align="center"; } - else if ($fieldlist[$field]=='localtax2_type') { + elseif ($fieldlist[$field]=='localtax2_type') { if ($obj->localtax2 != 0) $valuetoshow=$localtax_typeList[$valuetoshow]; else $valuetoshow = ''; $align="center"; } - else if ($fieldlist[$field]=='taux') { + elseif ($fieldlist[$field]=='taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); $align="center"; } - else if (in_array($fieldlist[$field],array('recuperableonly'))) + elseif (in_array($fieldlist[$field],array('recuperableonly'))) { $align="center"; } - else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { + elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { $valuetoshow = length_accountg($valuetoshow); } elseif ($fieldlist[$field] == 'fk_tva') @@ -1604,8 +1604,8 @@ if ($id) if (isset($obj->code) && $id != 10) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } @@ -1639,8 +1639,8 @@ if ($id) else { if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); + elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); + elseif (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); else print $langs->trans("AlwaysActive"); } print ""; diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index c1bb4e997dc..1fac509705c 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -53,6 +53,6 @@ try { // Here we are dealing with errors $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); - else if ($trace[0]['args'][0] == 401) die('Bad auth key'); + elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); else die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV); } diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 553ce2e54e0..92f776b9ea9 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -154,7 +154,7 @@ class Dolistore // Here we are dealing with errors $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); - else if ($trace[0]['args'][0] == 401) die('Bad auth key'); + elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 3126f432938..e058778155a 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -100,7 +100,7 @@ else { print ''.img_picto($langs->trans("Disabled"),'off').''; } - else if(! empty($conf->global->USER_MAIL_REQUIRED)) + elseif(! empty($conf->global->USER_MAIL_REQUIRED)) { print ''.img_picto($langs->trans("Enabled"),'on').''; } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 2ae3a7cad99..2dec14f0a24 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -74,7 +74,7 @@ if ($action == 'updateMask') } } -else if ($action == 'set_param') +elseif ($action == 'set_param') { $freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -98,7 +98,7 @@ else if ($action == 'set_param') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -144,12 +144,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -159,7 +159,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -176,7 +176,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index f8429069611..23d2571b256 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -70,7 +70,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For fiche inter +elseif ($action == 'specimen') // For fiche inter { $modele= GETPOST('module','alpha'); @@ -118,7 +118,7 @@ else if ($action == 'specimen') // For fiche inter } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF)) @@ -127,7 +127,7 @@ else if ($action == 'set') } } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -137,7 +137,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -154,7 +154,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -162,7 +162,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "EXPENSEREPORT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'setoptions') +elseif ($action == 'setoptions') { $db->begin(); diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index fe78e5aa5b6..6e9ccf792b0 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -124,12 +124,12 @@ if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -139,7 +139,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "FACTURE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -156,7 +156,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 8751d906918..e975a2f0ff8 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -167,7 +167,7 @@ else { print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } - else if ($value == 1) + elseif ($value == 1) { print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 9a259fd3c0d..7e263a5e285 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -70,7 +70,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For fiche inter +elseif ($action == 'specimen') // For fiche inter { $modele= GETPOST('module','alpha'); @@ -116,12 +116,12 @@ else if ($action == 'specimen') // For fiche inter } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -131,7 +131,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -148,7 +148,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -156,7 +156,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_FICHINTER_FREE_TEXT') +elseif ($action == 'set_FICHINTER_FREE_TEXT') { $freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -173,7 +173,7 @@ else if ($action == 'set_FICHINTER_FREE_TEXT') } } -else if ($action == 'set_FICHINTER_DRAFT_WATERMARK') +elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK') { $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha'); $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index c687a6fbc2d..62fe6631a60 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -71,7 +71,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For contract +elseif ($action == 'specimen') // For contract { $modele= GETPOST('module','alpha'); @@ -117,12 +117,12 @@ else if ($action == 'specimen') // For contract } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -132,7 +132,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -149,7 +149,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -157,7 +157,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "HOLIDAY_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_other') +elseif ($action == 'set_other') { $freetext= GETPOST('HOLIDAY_FREE_TEXT','none'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "HOLIDAY_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index e2168ec2d76..84ce38f9757 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -173,7 +173,7 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND",$original_file,'chaine',0,'',$conf->entity); } - else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) + elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) { $error++; $langs->load("errors"); diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 33b6d83e0da..d7eb804fa4d 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -673,11 +673,11 @@ else { print $langs->trans('RobotEmail'); } - else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') + elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') { print $langs->trans('UserEmail'); } - else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') + elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') { print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>'); } diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index da31a794374..afda116772c 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -479,7 +479,7 @@ foreach ($fieldlist as $field => $value) { print '
\n"; } - else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) + elseif (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) { print ''; } @@ -783,7 +783,7 @@ if ($mode == 'common') { // Should never happened } - else if (! empty($objMod->disabled)) + elseif (! empty($objMod->disabled)) { print $langs->trans("Disabled"); } diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index af2aed5a744..4a4e07d35f9 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -71,7 +71,7 @@ if ($action == 'setvalue' && $user->admin) $newval=GETPOST($shortkey.'_key'); //print $newkey.' - '.$newval.'
'; } - else if (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg)) + elseif (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg)) { // Add a new entry $newkey='NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 37c836043a0..3d9a6984f88 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -86,7 +86,7 @@ if ($action == 'activate_pdfsecurity') header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } -else if ($action == 'disable_pdfsecurity') +elseif ($action == 'disable_pdfsecurity') { dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index e0caadc9677..a6c5c54a40f 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -96,9 +96,7 @@ if ($action == "set") { $res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - } else - - if (! $error) + } elseif (! $error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index beb63b8eb0c..b9fe6bca9d0 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -188,7 +188,7 @@ if ($action == 'set') $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -197,7 +197,7 @@ else if ($action == 'del') } } -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -212,7 +212,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 4aa362932af..07781551eb6 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -80,7 +80,7 @@ if ($action == 'updateMask') } } -else if ($action == 'set_param') +elseif ($action == 'set_param') { $freetext=GETPOST('RECEPTION_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "RECEPTION_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -104,7 +104,7 @@ else if ($action == 'set_param') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -150,12 +150,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -165,7 +165,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "RECEPTION_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -182,7 +182,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { dolibarr_set_const($db, "RECEPTION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 26dcdc85b8d..7a4581ac8ec 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -108,7 +108,7 @@ if ($action == 'activate_encrypt') dol_print_error($db,''); } } -else if ($action == 'disable_encrypt') +elseif ($action == 'disable_encrypt') { //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes //Do not allow "disable encryption" as passwords cannot be decrypted @@ -137,7 +137,7 @@ if ($action == 'activate_encryptdbpassconf') setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } } -else if ($action == 'disable_encryptdbpassconf') +elseif ($action == 'disable_encryptdbpassconf') { $result = encodedecode_dbpassconf(0); if ($result > 0) @@ -161,7 +161,7 @@ if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') header("Location: security.php"); exit; } -else if ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') +elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK",$conf->entity); header("Location: security.php"); diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index f551aafaaff..f3449e12885 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -67,7 +67,7 @@ if ($action == 'updateform') // Delete file -else if ($action == 'delete') +elseif ($action == 'delete') { $langs->load("other"); $file = $conf->admin->dir_temp . '/' . GETPOST('urlfile','alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index e26fcf900be..99684305cec 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -57,7 +57,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) } } -else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) +elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -71,7 +71,7 @@ else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) } } -else if ($action == 'updateform') +elseif ($action == 'updateform') { $res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity); $res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index c3c25c9e4e6..a4446f1f8fb 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -122,12 +122,12 @@ if ($action == 'specimen') // For invoices } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -137,7 +137,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -153,7 +153,7 @@ else if ($action == 'setdoc') $ret = addDocumentModel($value, $type, $label, $scandir); } } -else if ($action == 'unsetdoc') +elseif ($action == 'unsetdoc') { dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity); } diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index b23e821b31e..69d582ff90a 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -73,7 +73,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -120,12 +120,12 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -135,7 +135,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -152,7 +152,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -160,13 +160,13 @@ else if ($action == 'setmod') dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'addcat') +elseif ($action == 'addcat') { $fourn = new Fournisseur($db); $fourn->CreateCategory($user,$_POST["cat"]); } -else if ($action == 'set_SUPPLIER_ORDER_OTHER') +elseif ($action == 'set_SUPPLIER_ORDER_OTHER') { $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT','none'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED','alpha'); @@ -206,7 +206,7 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER') } // Activate ask for payment bank -else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') +elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER",$value,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 77f2a95070e..ecb7b455657 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -61,18 +61,18 @@ if ($action == 'updateMask') { setEventMessages($langs->trans("Error"), null, 'errors'); } -}else if ($action == 'setmod') +}elseif ($action == 'setmod') { dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON", $value, 'chaine', 0, '', $conf->entity); } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -82,7 +82,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -99,7 +99,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 1756974379c..7c18a1b8e19 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -169,7 +169,7 @@ if ($action == 'set') $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -178,7 +178,7 @@ else if ($action == 'del') } } -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -193,7 +193,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 0eaa7161d5e..9c857964a3c 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -230,7 +230,7 @@ foreach ($syslogModules as $moduleName) if (! empty($tmpoption)) { if (isset($_POST[$tmpoption])) $value=$_POST[$tmpoption]; - else if (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; + elseif (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; } else $value = (isset($option['default']) ? $option['default'] : ''); diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index fef49bd5c12..645abf36ce8 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -183,7 +183,7 @@ foreach($configfileparameters as $key) // Value print "
"; diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index c19c7075784..2436807b584 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -56,17 +56,17 @@ if (preg_match('/mysql/i',$conf->db->type)) $sql = "SHOW TABLE STATUS"; $base=1; } -else if ($conf->db->type == 'pgsql') +elseif ($conf->db->type == 'pgsql') { $sql = "SELECT conname, contype FROM pg_constraint;"; $base=2; } -else if ($conf->db->type == 'mssql') +elseif ($conf->db->type == 'mssql') { //$sqls[0] = ""; //$base=3; } -else if ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3') +elseif ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3') { //$sql = "SELECT name, type FROM sqlite_master"; $base = 4; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 2cf249c0f74..9f9cc63505d 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -50,7 +50,7 @@ if (preg_match('/mysql/i',$conf->db->type)) $sql = "SHOW TABLE STATUS LIKE '".$db->escape($table)."'"; $base=1; } -else if ($conf->db->type == 'pgsql') +elseif ($conf->db->type == 'pgsql') { $sql = "SELECT conname,contype FROM pg_constraint"; $base=2; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index f81053e1631..a8b5b2da401 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -374,8 +374,8 @@ foreach($configfileparameters as $key => $value) // Value print "'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 05d5fa43c86..0e9463cd43c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -293,7 +293,7 @@ class ActionComm extends CommonObject $this->type_id=$cactioncomm->id; $this->type_code=$cactioncomm->code; } - else if ($result == 0) + elseif ($result == 0) { $this->error='Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"'; return -1; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a73731699f2..5eaf2c5a6a5 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -779,7 +779,7 @@ if (count($listofextcals)) $datecurstart=dol_stringtotime($icalevent['DTSTART;VALUE=DATE'],1); $datecurend=dol_stringtotime($icalevent['DTEND;VALUE=DATE'],1)-1; // We remove one second to get last second of day } - else if (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime'])) + elseif (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime'])) { $datecurstart=$icalevent['DTSTART']['unixtime']; $datecurend=$icalevent['DTEND']['unixtime']; @@ -1365,7 +1365,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; } - else if ($event->type_code == 'ICALEVENT') // Event come from external ical file + elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file { $numical++; if (! empty($event->icalname)) { @@ -1378,7 +1378,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $color=($event->icalcolor?$event->icalcolor:-1); $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1425,11 +1425,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { $cssclass.= " unmovable"; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $cssclass.= " unmovable"; } - else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) + elseif ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); $tmpmonthend = date('m',$event->date_end_in_calendar); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 67a4534ca14..789ef82daa3 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -809,7 +809,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s $nummytasks++; $cssclass='family_mytasks'; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $numical++; if (! empty($event->icalname)) @@ -823,7 +823,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s $color=$event->icalcolor; $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1026,7 +1026,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string']; if ($output[0]['color']) $color1 = $output[0]['color']; } - else if (count($cases1[$h]) > 1) + elseif (count($cases1[$h]) > 1) { $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); $color1='222222'; @@ -1039,7 +1039,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string']; if ($output[0]['color']) $color2 = $output[0]['color']; } - else if (count($cases2[$h]) > 1) + elseif (count($cases2[$h]) > 1) { $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); $color2='222222'; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 9e2a7278a27..075e5997fbd 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -970,7 +970,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if (! empty($conf->global->AGENDA_USE_COLOR_PER_EVENT_TYPE)) $color=$event->type_color; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $numical++; if (! empty($event->icalname)) @@ -984,7 +984,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $color=$event->icalcolor; $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1201,7 +1201,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string']; if ($output[0]['color']) $color1 = $output[0]['color']; } - else if (count($cases1[$h]) > 1) + elseif (count($cases1[$h]) > 1) { $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); $color1='222222'; @@ -1214,7 +1214,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string']; if ($output[0]['color']) $color2 = $output[0]['color']; } - else if (count($cases2[$h]) > 1) + elseif (count($cases2[$h]) > 1) { $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); $color2='222222'; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index f9cf7dc5bf1..04b7cd3ad63 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -83,7 +83,7 @@ if ($action == 'add' || $action == 'update') header("Location: ".$backtopage); exit; } - else if ($origin == 'commande') + elseif ($origin == 'commande') { header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); exit; @@ -112,7 +112,7 @@ if ($action == 'add' || $action == 'update') } // Update address - else if ($action == 'update') + elseif ($action == 'update') { $result = $object->update($id, $socid, $user); @@ -123,7 +123,7 @@ if ($action == 'add' || $action == 'update') header("Location: ".$backtopage); exit; } - else if ($origin == 'commande') + elseif ($origin == 'commande') { header("Location: ../commande/contact.php?id=".$originid); exit; @@ -153,7 +153,7 @@ if ($action == 'add' || $action == 'update') } } -else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) +elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { $result = $object->delete($id, $socid); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index e0b60a87753..bee64fb41d1 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -496,7 +496,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''; print ''; print ''; @@ -759,7 +759,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } @@ -863,7 +863,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 233f32d26be..5ce2b5c2f61 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -122,7 +122,7 @@ if (empty($reshook)) setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $action=''; } - else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action=''; @@ -525,13 +525,13 @@ if (empty($reshook)) $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1,$object,'mailing'); if ($action == 'settitre') $object->titre = trim(GETPOST('titre','alpha')); - else if ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha')); - else if ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha')); - else if ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha')); - else if ($action == 'settitre' && empty($object->titre)) { + elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha')); + elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha')); + elseif ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha')); + elseif ($action == 'settitre' && empty($object->titre)) { $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle")); } - else if ($action == 'setfrom' && empty($object->email_from)) { + elseif ($action == 'setfrom' && empty($object->email_from)) { $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom")); } @@ -803,12 +803,12 @@ else print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset - else if ($action == 'reset') + elseif ($action == 'reset') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete - else if ($action == 'delete') + elseif ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -842,7 +842,7 @@ else if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings'); $_GET["action"]=''; } - else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings'); if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings'); @@ -1008,7 +1008,7 @@ else { print ''.$langs->trans("ValidMailing").''; } - else if (empty($user->rights->mailing->valider)) + elseif (empty($user->rights->mailing->valider)) { print ''.$langs->trans("ValidMailing").''; } @@ -1024,7 +1024,7 @@ else { print ''.$langs->trans("SendMailing").''; } - else if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send) + elseif (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("SendMailing").''; } diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index ac23177652f..0cb414be421 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -557,7 +557,7 @@ if ($object->fetch($id) >= 0) $objectstatic->fetch($obj->source_id); print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'user') + elseif ($obj->source_type == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $objectstatic=new User($db); @@ -565,14 +565,14 @@ if ($object->fetch($id) >= 0) $objectstatic->id=$obj->source_id; print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'thirdparty') + elseif ($obj->source_type == 'thirdparty') { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $objectstatic=new Societe($db); $objectstatic->fetch($obj->source_id); print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'contact') + elseif ($obj->source_type == 'contact') { include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $objectstatic=new Contact($db); diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 83833304d44..84d20180f20 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -785,12 +785,12 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) { $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")"; } - } else if (($extrafields->attribute_type[$key] == 'date') || + } elseif (($extrafields->attribute_type[$key] == 'date') || ($extrafields->attribute_type[$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){ $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')"; } - }else if ($extrafields->attribute_type[$key] == 'boolean') { + }elseif ($extrafields->attribute_type[$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct']!=''){ if ($arrayquery['options_'.$key.'_cnct']==0) { $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))"; @@ -885,12 +885,12 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['options_'.$key.'_max'])) { $sqlwhere[]= " (tse.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND tse.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; } - } else if (($extrafields->attribute_type[$key] == 'date') || + } elseif (($extrafields->attribute_type[$key] == 'date') || ($extrafields->attribute_type[$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'])){ $sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; } - }else if ($extrafields->attribute_type[$key] == 'boolean') { + }elseif ($extrafields->attribute_type[$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")"; } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c6ba6781423..93511ce0513 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -205,7 +205,7 @@ if (empty($reshook)) } // Delete proposal - else if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); if ($result > 0) { @@ -218,7 +218,7 @@ if (empty($reshook)) } // Remove line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $result = $object->deleteline($lineid); // reorder lines @@ -242,7 +242,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) + elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { $result = $object->valid($user); if ($result >= 0) @@ -269,7 +269,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate' && $usercancreate) + elseif ($action == 'setdate' && $usercancreate) { $datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -284,13 +284,13 @@ if (empty($reshook)) dol_print_error($db, $object->error); } } - else if ($action == 'setecheance' && $usercancreate) + elseif ($action == 'setecheance' && $usercancreate) { $result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setdate_livraison' && $usercancreate) + elseif ($action == 'setdate_livraison' && $usercancreate) { $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear'])); if ($result < 0) @@ -298,7 +298,7 @@ if (empty($reshook)) } // Positionne ref client - else if ($action == 'setref_client' && $usercancreate) + elseif ($action == 'setref_client' && $usercancreate) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) @@ -314,7 +314,7 @@ if (empty($reshook)) } // Create proposal - else if ($action == 'add' && $usercancreate) + elseif ($action == 'add' && $usercancreate) { $object->socid = $socid; $object->fetch_thirdparty(); @@ -619,7 +619,7 @@ if (empty($reshook)) } // Classify billed - else if ($action == 'classifybilled' && $usercanclose) + elseif ($action == 'classifybilled' && $usercanclose) { $db->begin(); @@ -641,7 +641,7 @@ if (empty($reshook)) } // Close proposal - else if ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha')) + elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha')) { if (! (GETPOST('statut','int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); @@ -672,7 +672,7 @@ if (empty($reshook)) } // Reopen proposal - else if ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha')) + elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) @@ -808,7 +808,7 @@ if (empty($reshook)) } } - else if ($action == "setabsolutediscount" && $usercancreate) { + elseif ($action == "setabsolutediscount" && $usercancreate) { if ($_POST["remise_id"]) { if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); @@ -820,7 +820,7 @@ if (empty($reshook)) } // Add line - else if ($action == 'addline' && $usercancreate) { + elseif ($action == 'addline' && $usercancreate) { // Set if we used free entry or predefined product $predef=''; @@ -1184,7 +1184,7 @@ if (empty($reshook)) } // Update a line within proposal - else if ($action == 'updateline' && $usercancreate && GETPOST('save')) + elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) { // Define info_bits $info_bits = 0; @@ -1320,66 +1320,66 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha')) + elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } // Set project - else if ($action == 'classin' && $usercancreate) { + elseif ($action == 'classin' && $usercancreate) { $object->setProject(GETPOST('projectid','int')); } // Delai de livraison - else if ($action == 'setavailability' && $usercancreate) { + elseif ($action == 'setavailability' && $usercancreate) { $result = $object->set_availability($user, GETPOST('availability_id','int')); } // Origine de la propale - else if ($action == 'setdemandreason' && $usercancreate) { + elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->set_demand_reason($user, GETPOST('demand_reason_id','int')); } // Conditions de reglement - else if ($action == 'setconditions' && $usercancreate) { + elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } - else if ($action == 'setremisepercent' && $usercancreate) { + elseif ($action == 'setremisepercent' && $usercancreate) { $result = $object->set_remise_percent($user, $_POST['remise_percent']); } - else if ($action == 'setremiseabsolue' && $usercancreate) { + elseif ($action == 'setremiseabsolue' && $usercancreate) { $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } // Mode de reglement - else if ($action == 'setmode' && $usercancreate) { + elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $usercancreate) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $usercancreate) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } // bank account - else if ($action == 'setbankaccount' && $usercancreate) { + elseif ($action == 'setbankaccount' && $usercancreate) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } // shipping method - else if ($action == 'setshippingmethod' && $usercancreate) { + elseif ($action == 'setshippingmethod' && $usercancreate) { $result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int')); } - else if ($action == 'update_extras') { + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form @@ -1421,7 +1421,7 @@ if (empty($reshook)) } // Bascule du statut d'un contact - else if ($action == 'swapstatut') { + elseif ($action == 'swapstatut') { if ($object->fetch($id) > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); } else { @@ -1430,7 +1430,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') { + elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($lineid); @@ -1909,22 +1909,22 @@ if ($action == 'create') } // Confirm delete - else if ($action == 'delete') { + elseif ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen - else if ($action == 'reopen') { + elseif ($action == 'reopen') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line - else if ($action == 'ask_deleteline') { + elseif ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal - else if ($action == 'validate') { + elseif ($action == 'validate') { $error = 0; // We verifie whether the object is provisionally numbering diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 55dd950abf2..12de0610ad4 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2706,7 +2706,7 @@ class Propal extends CommonObject { $ga[$obj->propalid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->propalid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 7fc556a3b12..dc14324c293 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -56,7 +56,7 @@ if ($id > 0 || ! empty($ref)) setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; } - else if ($ret < 0) + elseif ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -105,7 +105,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->propale->creer) +elseif ($action == 'swapstatut' && $user->rights->propale->creer) { if ($object->id > 0) { @@ -114,7 +114,7 @@ else if ($action == 'swapstatut' && $user->rights->propale->creer) } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->propale->creer) +elseif ($action == 'deletecontact' && $user->rights->propale->creer) { $result = $object->delete_contact($lineid); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index b96a95d8e64..e708e0dac15 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -367,7 +367,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 61fa1d548d7..193859cdd70 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -940,7 +940,7 @@ if ($resql) print $nbofsalesrepresentative; print ''; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 36dac7431af..08da5786589 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -159,7 +159,7 @@ if (empty($reshook)) } // Reopen a closed order - else if ($action == 'reopen' && $user->rights->commande->creer) + elseif ($action == 'reopen' && $user->rights->commande->creer) { if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) { @@ -176,7 +176,7 @@ if (empty($reshook)) } // Remove order - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer) { $result = $object->delete($user); if ($result > 0) @@ -191,7 +191,7 @@ if (empty($reshook)) } // Remove a product line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer) { $result = $object->deleteline($user, $lineid); if ($result > 0) @@ -222,13 +222,13 @@ if (empty($reshook)) } // Link to a project - else if ($action == 'classin' && $user->rights->commande->creer) + elseif ($action == 'classin' && $user->rights->commande->creer) { $object->setProject(GETPOST('projectid','int')); } // Add order - else if ($action == 'add' && $user->rights->commande->creer) + elseif ($action == 'add' && $user->rights->commande->creer) { $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); @@ -481,7 +481,7 @@ if (empty($reshook)) } } - else if ($action == 'classifybilled' && $user->rights->commande->creer) + elseif ($action == 'classifybilled' && $user->rights->commande->creer) { $ret=$object->classifyBilled($user); @@ -489,7 +489,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'classifyunbilled' && $user->rights->commande->creer) + elseif ($action == 'classifyunbilled' && $user->rights->commande->creer) { $ret=$object->classifyUnBilled(); if ($ret < 0) { @@ -498,7 +498,7 @@ if (empty($reshook)) } // Positionne ref commande client - else if ($action == 'setref_client' && $user->rights->commande->creer) { + elseif ($action == 'setref_client' && $user->rights->commande->creer) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) { @@ -506,7 +506,7 @@ if (empty($reshook)) } } - else if ($action == 'setremise' && $user->rights->commande->creer) { + elseif ($action == 'setremise' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise')); if ($result < 0) { @@ -514,7 +514,7 @@ if (empty($reshook)) } } - else if ($action == 'setabsolutediscount' && $user->rights->commande->creer) { + elseif ($action == 'setabsolutediscount' && $user->rights->commande->creer) { if (GETPOST('remise_id')) { if ($object->id > 0) { $object->insert_discount(GETPOST('remise_id')); @@ -524,7 +524,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate' && $user->rights->commande->creer) { + elseif ($action == 'setdate' && $user->rights->commande->creer) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $date = dol_mktime(0, 0, 0, GETPOST('order_month'), GETPOST('order_day'), GETPOST('order_year')); @@ -534,7 +534,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate_livraison' && $user->rights->commande->creer) { + elseif ($action == 'setdate_livraison' && $user->rights->commande->creer) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); @@ -544,35 +544,35 @@ if (empty($reshook)) } } - else if ($action == 'setmode' && $user->rights->commande->creer) { + elseif ($action == 'setmode' && $user->rights->commande->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->commande->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } - else if ($action == 'setavailability' && $user->rights->commande->creer) { + elseif ($action == 'setavailability' && $user->rights->commande->creer) { $result = $object->availability(GETPOST('availability_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - else if ($action == 'setdemandreason' && $user->rights->commande->creer) { + elseif ($action == 'setdemandreason' && $user->rights->commande->creer) { $result = $object->demand_reason(GETPOST('demand_reason_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - else if ($action == 'setconditions' && $user->rights->commande->creer) { + elseif ($action == 'setconditions' && $user->rights->commande->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) { dol_print_error($db, $object->error); @@ -604,7 +604,7 @@ if (empty($reshook)) } // bank account - else if ($action == 'setbankaccount' && $user->rights->commande->creer) { + elseif ($action == 'setbankaccount' && $user->rights->commande->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -612,7 +612,7 @@ if (empty($reshook)) } // shipping method - else if ($action == 'setshippingmethod' && $user->rights->commande->creer) { + elseif ($action == 'setshippingmethod' && $user->rights->commande->creer) { $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -620,23 +620,23 @@ if (empty($reshook)) } // warehouse - else if ($action == 'setwarehouse' && $user->rights->commande->creer) { + elseif ($action == 'setwarehouse' && $user->rights->commande->creer) { $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'setremisepercent' && $user->rights->commande->creer) { + elseif ($action == 'setremisepercent' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise_percent')); } - else if ($action == 'setremiseabsolue' && $user->rights->commande->creer) { + elseif ($action == 'setremiseabsolue' && $user->rights->commande->creer) { $result = $object->set_remise_absolue($user, GETPOST('remise_absolue')); } // Add a new line - else if ($action == 'addline' && $user->rights->commande->creer) + elseif ($action == 'addline' && $user->rights->commande->creer) { $langs->load('errors'); $error = 0; @@ -998,7 +998,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save')) { // Clean parameters $date_start=''; @@ -1134,12 +1134,12 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } - else if ($action == 'confirm_validate' && $confirm == 'yes' && + elseif ($action == 'confirm_validate' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))) ) @@ -1196,7 +1196,7 @@ if (empty($reshook)) } // Go back to draft status - else if ($action == 'confirm_modif' && $user->rights->commande->creer) { + elseif ($action == 'confirm_modif' && $user->rights->commande->creer) { $idwarehouse = GETPOST('idwarehouse'); $qualified_for_stock_change=0; @@ -1244,14 +1244,14 @@ if (empty($reshook)) } } - else if ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { + elseif ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { $result = $object->cloture($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'confirm_cancel' && $confirm == 'yes' && + elseif ($action == 'confirm_cancel' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))) ) @@ -1441,7 +1441,7 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); @@ -1451,7 +1451,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact($lineid); diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 1135a5c2502..7005f495481 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -565,7 +565,7 @@ class Orders extends DolibarrApi $result = $this->commande->set_reopen(DolibarrApiAccess::$user); if( $result < 0) { throw new RestException(405, $this->commande->error); - }else if( $result == 0) { + }elseif( $result == 0) { throw new RestException(304); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8934e293973..1ec2f5d8ef8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2533,7 +2533,7 @@ class Commande extends CommonOrder { $ga[$obj->cid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->cid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index b40a284e728..9c5c1c183b0 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -79,7 +79,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->commande->creer) +elseif ($action == 'swapstatut' && $user->rights->commande->creer) { if ($object->fetch($id)) { @@ -92,7 +92,7 @@ else if ($action == 'swapstatut' && $user->rights->commande->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->commande->creer) +elseif ($action == 'deletecontact' && $user->rights->commande->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 4e33a8c0aae..b63136c8581 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -364,7 +364,7 @@ if ($action == 'create') { $selectedcode=$_POST["account_country_id"]?$_POST["account_country_id"]:$object->country_code; } - else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; + elseif (empty($selectedcode)) $selectedcode=$mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''; @@ -610,7 +610,7 @@ else print ''; @@ -846,7 +846,7 @@ else $object->country_id=$object->country_id?$object->country_id:$mysoc->country_id; $selectedcode=$object->country_code; if (isset($_POST["account_country_id"])) $selectedcode=$_POST["account_country_id"]; - else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; + elseif (empty($selectedcode)) $selectedcode=$mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''; @@ -872,7 +872,7 @@ else print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 80a0c6f819b..6d34c965871 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1358,7 +1358,7 @@ class Account extends CommonObject { $url = DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$this->id; } - else if ($mode == 'receipts') + elseif ($mode == 'receipts') { $url = DOL_URL_ROOT.'/compta/bank/releve.php?account='.$this->id; } @@ -1783,7 +1783,7 @@ class AccountLine extends CommonObject $sql.= " WHERE b.fk_account = ba.rowid"; $sql.= " AND ba.entity IN (".getEntity('bank_account').")"; if ($num) $sql.= " AND b.num_chq='".$this->db->escape($num)."'"; - else if ($ref) $sql.= " AND b.rowid='".$this->db->escape($ref)."'"; + elseif ($ref) $sql.= " AND b.rowid='".$this->db->escape($ref)."'"; else $sql.= " AND b.rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index d98db0ea998..d359a5c814f 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -351,7 +351,7 @@ if ($result) print '';*/ print $paymenttmp->getNomUrl(1); } - else if ($links[$key]['type']=='payment_supplier') { + elseif ($links[$key]['type']=='payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $paymenttmp=new PaiementFourn($db); $paymenttmp->fetch($links[$key]['url_id']); @@ -362,72 +362,72 @@ if ($result) print '';*/ print $paymenttmp->getNomUrl(1); } - else if ($links[$key]['type']=='company') { + elseif ($links[$key]['type']=='company') { $societe=new Societe($db); $societe->fetch($links[$key]['url_id']); print $societe->getNomUrl(1); } - else if ($links[$key]['type']=='sc') { + elseif ($links[$key]['type']=='sc') { print ''; print img_object($langs->trans('ShowSocialContribution'),'bill').' '; print $langs->trans("SocialContribution").($links[$key]['label']?' - '.$links[$key]['label']:''); print ''; } - else if ($links[$key]['type']=='payment_sc') { + elseif ($links[$key]['type']=='payment_sc') { print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; } - else if ($links[$key]['type']=='payment_vat') { + elseif ($links[$key]['type']=='payment_vat') { print ''; print img_object($langs->trans('ShowVAT'),'payment').' '; print $langs->trans("VATPayment"); print ''; } - else if ($links[$key]['type']=='payment_salary') { + elseif ($links[$key]['type']=='payment_salary') { print ''; print img_object($langs->trans('ShowPaymentSalary'),'payment').' '; print $langs->trans("SalaryPayment"); print ''; } - else if ($links[$key]['type']=='payment_loan') { + elseif ($links[$key]['type']=='payment_loan') { print ''; print img_object($langs->trans('ShowLoanPayment'),'payment').' '; print $langs->trans("PaymentLoan"); print ''; } - else if ($links[$key]['type']=='loan') { + elseif ($links[$key]['type']=='loan') { print ''; print img_object($langs->trans('ShowLoan'),'bill').' '; print $langs->trans("Loan"); print ''; } - else if ($links[$key]['type']=='member') { + elseif ($links[$key]['type']=='member') { print ''; print img_object($langs->trans('ShowMember'),'user').' '; print $links[$key]['label']; print ''; } - else if ($links[$key]['type']=='payment_donation') { + elseif ($links[$key]['type']=='payment_donation') { print ''; print img_object($langs->trans('ShowDonation'),'payment').' '; print $langs->trans("DonationPayment"); print ''; } - else if ($links[$key]['type']=='banktransfert') { + elseif ($links[$key]['type']=='banktransfert') { print ''; print img_object($langs->trans('ShowTransaction'),'payment').' '; print $langs->trans("TransactionOnTheOtherAccount"); print ''; } - else if ($links[$key]['type']=='user') { + elseif ($links[$key]['type']=='user') { print ''; print img_object($langs->trans('ShowUser'),'user').' '; print $langs->trans("User"); print ''; } - else if ($links[$key]['type']=='payment_various') { + elseif ($links[$key]['type']=='payment_various') { print ''; print img_object($langs->trans('ShowVariousPayment'),'payment').' '; print $langs->trans("VariousPayment"); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 922df54c147..94f66f2552e 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -78,7 +78,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) } } -else if ($action == 'classifyrefunded' && $user->rights->deplacement->creer) +elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) { $object->fetch($id); if ($object->statut == 1) @@ -96,7 +96,7 @@ else if ($action == 'classifyrefunded' && $user->rights->deplacement->creer) } } -else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) +elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { $result=$object->delete($id); if ($result >= 0) @@ -110,7 +110,7 @@ else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->depl } } -else if ($action == 'add' && $user->rights->deplacement->creer) +elseif ($action == 'add' && $user->rights->deplacement->creer) { if (! GETPOST('cancel','alpha')) { @@ -169,7 +169,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) } // Update record -else if ($action == 'update' && $user->rights->deplacement->creer) +elseif ($action == 'update' && $user->rights->deplacement->creer) { if (! GETPOST('cancel','alpha')) { @@ -203,7 +203,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) } // Set into a project -else if ($action == 'classin' && $user->rights->deplacement->creer) +elseif ($action == 'classin' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setProject(GETPOST('projectid','int')); @@ -211,14 +211,14 @@ else if ($action == 'classin' && $user->rights->deplacement->creer) } // Set fields -else if ($action == 'setdated' && $user->rights->deplacement->creer) +elseif ($action == 'setdated' && $user->rights->deplacement->creer) { $dated=dol_mktime(GETPOST('datedhour','int'), GETPOST('datedmin','int'), GETPOST('datedsec','int'), GETPOST('datedmonth','int'), GETPOST('datedday','int'), GETPOST('datedyear','int')); $object->fetch($id); $result=$object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); if ($result < 0) dol_print_error($db, $object->error); } -else if ($action == 'setkm' && $user->rights->deplacement->creer) +elseif ($action == 'setkm' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setValueFrom('km', GETPOST('km','int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY'); @@ -314,7 +314,7 @@ if ($action == 'create') print ''; } -else if ($id) +elseif ($id) { $result = $object->fetch($id); if ($result > 0) diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index ae93eb094d9..5baea1c866a 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -69,7 +69,7 @@ class DeplacementStats extends Stats $this->where.=" AND fk_soc = ".$this->socid; } if (is_array($this->userid) && count($this->userid) > 0) $this->where.=' AND fk_user IN ('.join(',',$this->userid).')'; - else if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; + elseif ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 1fd2906c26f..92d8cf629c7 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -178,7 +178,7 @@ if (empty($reshook)) } // Change status of invoice - else if ($action == 'reopen' && $usercancreate) { + elseif ($action == 'reopen' && $usercancreate) { $result = $object->fetch($id); if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced') || ($object->statut == 1 && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted $result = $object->set_unpaid($user); @@ -192,7 +192,7 @@ if (empty($reshook)) } // Delete invoice - else if ($action == 'confirm_delete' && $confirm == 'yes') { + elseif ($action == 'confirm_delete' && $confirm == 'yes') { $result = $object->fetch($id); $object->fetch_thirdparty(); @@ -222,7 +222,7 @@ if (empty($reshook)) } // Delete line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -256,7 +256,7 @@ if (empty($reshook)) } // Delete link of credit note to invoice - else if ($action == 'unlinkdiscount' && $usercancreate) + elseif ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); @@ -264,7 +264,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'valid' && $usercancreate) + elseif ($action == 'valid' && $usercancreate) { $object->fetch($id); @@ -284,7 +284,7 @@ if (empty($reshook)) } } - else if ($action == 'set_thirdparty' && $usercancreate) + elseif ($action == 'set_thirdparty' && $usercancreate) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY'); @@ -293,13 +293,13 @@ if (empty($reshook)) exit(); } - else if ($action == 'classin' && $usercancreate) + elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $object->setProject($_POST['projectid']); } - else if ($action == 'setmode' && $usercancreate) + elseif ($action == 'setmode' && $usercancreate) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); @@ -308,16 +308,16 @@ if (empty($reshook)) } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $usercancreate) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $usercancreate) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } - else if ($action == 'setinvoicedate' && $usercancreate) + elseif ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; @@ -336,7 +336,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setdate_pointoftax' && $usercancreate) + elseif ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); @@ -345,7 +345,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setconditions' && $usercancreate) + elseif ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property @@ -361,7 +361,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setpaymentterm' && $usercancreate) + elseif ($action == 'setpaymentterm' && $usercancreate) { $object->fetch($id); $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); @@ -374,7 +374,7 @@ if (empty($reshook)) dol_print_error($db, $object->error); } - else if ($action == 'setrevenuestamp' && $usercancreate) + elseif ($action == 'setrevenuestamp' && $usercancreate) { $object->fetch($id); $object->revenuestamp = GETPOST('revenuestamp'); @@ -391,18 +391,18 @@ if (empty($reshook)) } // bank account - else if ($action == 'setbankaccount' && $usercancreate) + elseif ($action == 'setbankaccount' && $usercancreate) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } - else if ($action == 'setremisepercent' && $usercancreate) + elseif ($action == 'setremisepercent' && $usercancreate) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); } - else if ($action == "setabsolutediscount" && $usercancreate) + elseif ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -460,14 +460,14 @@ if (empty($reshook)) } } - else if ($action == 'setref_client' && $usercancreate) + elseif ($action == 'setref_client' && $usercancreate) { $object->fetch($id); $object->set_ref_client(GETPOST('ref_client')); } // Classify to validated - else if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) + elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -567,7 +567,7 @@ if (empty($reshook)) } // Go back to draft status (unvalidate) - else if ($action == 'confirm_modif' && $usercanunvalidate) + elseif ($action == 'confirm_modif' && $usercanunvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -647,13 +647,13 @@ if (empty($reshook)) } // Classify "paid" - else if ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) + elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); $result = $object->set_paid($user); if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } // Classif "paid partialy" - else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) + elseif ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); $close_code = GETPOST("close_code",'none'); @@ -665,7 +665,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } } // Classify "abandoned" - else if ($action == 'confirm_canceled' && $confirm == 'yes') { + elseif ($action == 'confirm_canceled' && $confirm == 'yes') { $object->fetch($id); $close_code = GETPOST("close_code",'none'); $close_note = GETPOST("close_note",'none'); @@ -678,7 +678,7 @@ if (empty($reshook)) } // Convertir en reduc - else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -824,7 +824,7 @@ if (empty($reshook)) /* * Insert new invoice in database */ - else if ($action == 'add' && $usercancreate) + elseif ($action == 'add' && $usercancreate) { if ($socid > 0) $object->socid = GETPOST('socid', 'int'); @@ -1648,7 +1648,7 @@ if (empty($reshook)) } // Add a new line - else if ($action == 'addline' && $usercancreate) + elseif ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; @@ -2172,7 +2172,7 @@ if (empty($reshook)) } } - else if ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) + elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) { if (!$object->fetch($id) > 0) dol_print_error($db); if (!is_null(GETPOST('all_progress')) && GETPOST('all_progress') != "") @@ -2189,7 +2189,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -3283,7 +3283,7 @@ if ($action == 'create') print '
'; } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Show object in view mode @@ -4540,7 +4540,7 @@ else if ($id > 0 || ! empty($ref)) } else { print '
' . $langs->trans('Modify') . '
'; } - } else if (!$object->is_last_in_cycle()) { + } elseif (!$object->is_last_in_cycle()) { print '
' . $langs->trans('Modify') . '
'; } else { print '
' . $langs->trans('Modify') . '
'; @@ -4758,7 +4758,7 @@ else if ($id > 0 || ! empty($ref)) if ($usercancreate && ($object->type == 5) && ($object->statut == 1 || $object->statut == 2)) { if ($object->is_last_in_cycle() && $object->situation_final != 1) { print '
'; - } else if (!$object->is_last_in_cycle()) { + } elseif (!$object->is_last_in_cycle()) { print ''; } else { print ''; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5090132632e..bc0e4289289 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1398,7 +1398,7 @@ class FactureRec extends CommonInvoice $line->total_ttc=-119.6; $line->total_tva=-19.6; } - else if ($xnbp == 2) // UP is negative (free line) + elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice=-100; $line->total_ht=-100; @@ -1406,7 +1406,7 @@ class FactureRec extends CommonInvoice $line->total_tva=-19.6; $line->remise_percent=0; } - else if ($xnbp == 3) // Discount is 50% (product line) + elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3e4335774c9..dd90b466d30 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2313,7 +2313,7 @@ class Facture extends CommonInvoice { $num = $force_number; } - else if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date { @@ -3337,8 +3337,8 @@ class Facture extends CommonInvoice // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->FACTURE_ADDON)) $conf->global->FACTURE_ADDON='mod_facture_terre'; - else if ($conf->global->FACTURE_ADDON=='terre') $conf->global->FACTURE_ADDON='mod_facture_terre'; - else if ($conf->global->FACTURE_ADDON=='mercure') $conf->global->FACTURE_ADDON='mod_facture_mercure'; + elseif ($conf->global->FACTURE_ADDON=='terre') $conf->global->FACTURE_ADDON='mod_facture_terre'; + elseif ($conf->global->FACTURE_ADDON=='mercure') $conf->global->FACTURE_ADDON='mod_facture_mercure'; if (! empty($conf->global->FACTURE_ADDON)) { @@ -3511,7 +3511,7 @@ class Facture extends CommonInvoice { $ga[$obj->fid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')'; } @@ -3971,7 +3971,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc=-239.2; $line->multicurrency_total_tva=-39.2; } - else if ($xnbp == 2) // UP is negative (free line) + elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice=-100; $line->total_ht=-100; @@ -3982,7 +3982,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc=-239.2; $line->multicurrency_total_tva=-39.2; } - else if ($xnbp == 3) // Discount is 50% (product line) + elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 80277e14741..4e0c52589de 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -85,7 +85,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->facture->creer) +elseif ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) { @@ -98,7 +98,7 @@ else if ($action == 'swapstatut' && $user->rights->facture->creer) } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->facture->creer) +elseif ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->delete_contact($lineid); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index c048737b156..7cc63b10e72 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -405,7 +405,7 @@ if (empty($reshook)) setEventMessages($line->error, $line->errors, 'errors'); } } - else if ($action == 'update_extras') + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -1145,7 +1145,7 @@ if ($action == 'create') $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title, '', ''); diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index be372e8a570..1b70c50c8f4 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -247,12 +247,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.date_last_gen, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } @@ -260,12 +260,12 @@ if ($search_month_date_when > 0) { if ($search_year_date_when > 0 && empty($search_day_date_when)) $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,$search_month_date_when,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,$search_month_date_when,false))."'"; - else if ($search_year_date_when > 0 && ! empty($search_day_date_when)) + elseif ($search_year_date_when > 0 && ! empty($search_day_date_when)) $sql.= " AND f.date_date_when_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'"; else $sql.= " AND date_format(f.date_when, '%m') = '".$db->escape($search_month_date_when)."'"; } -else if ($search_year_date_when > 0) +elseif ($search_year_date_when > 0) { $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,12,false))."'"; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7a06e6f66df..c3aeb8f6608 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -273,7 +273,7 @@ if ($massaction == 'withdrawrequest') if($objecttmp->paye || $objecttmp->resteapayer==0){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); - } else if($objecttmp->resteapayer<0){ + } elseif($objecttmp->resteapayer<0){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); } @@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest') $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } - else if (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ + elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); } diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 574c7103c61..924c6bf3a09 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -58,8 +58,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -229,7 +229,7 @@ if($calc ==0 || $calc == 2) $langs->load("errors"); if ($coll_list == -1) print '
'; - else if ($coll_list == -2) + elseif ($coll_list == -2) print ''; else print ''; @@ -305,7 +305,7 @@ if($calc ==0 || $calc == 1){ $langs->load("errors"); if ($coll_list == -1) print ''; - else if ($coll_list == -2) + elseif ($coll_list == -2) print ''; else print ''; diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 73a9f77341a..6875083901b 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -68,8 +68,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index c19d51b5891..e186dfce4cd 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -270,7 +270,7 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) } // Remove file in doc form -else if ($action == 'remove_file' && $user->rights->banque->cheque) +elseif ($action == 'remove_file' && $user->rights->banque->cheque) { if ($object->fetch($id) > 0) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 28973d3c4e2..b69b1788eda 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -423,8 +423,8 @@ class RemiseCheque extends CommonObject // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->CHEQUERECEIPTS_ADDON)) $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; - else if ($conf->global->CHEQUERECEIPTS_ADDON=='thyme') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_thyme'; - else if ($conf->global->CHEQUERECEIPTS_ADDON=='mint') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; + elseif ($conf->global->CHEQUERECEIPTS_ADDON=='thyme') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_thyme'; + elseif ($conf->global->CHEQUERECEIPTS_ADDON=='mint') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; if (! empty($conf->global->CHEQUERECEIPTS_ADDON)) { diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index d9ac1ab11eb..d84b26f78b2 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -100,12 +100,12 @@ if ($month > 0) { if ($year > 0 && empty($day)) $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(bc.date_bordereau, '%m') = '".$month."'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c4cb529d895..657a29cebbe 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -168,9 +168,9 @@ class Paiement extends CommonObject $sql.= ' WHERE p.entity IN (' . getEntity('invoice').')'; if ($id > 0) $sql.= ' AND p.rowid = '.$id; - else if ($ref) + elseif ($ref) $sql.= " AND p.ref = '".$ref."'"; - else if ($fk_bank) + elseif ($fk_bank) $sql.= ' AND p.fk_bank = '.$fk_bank; $resql = $this->db->query($sql); @@ -357,7 +357,7 @@ class Paiement extends CommonObject ); if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice, nor situation invoice. We do nothing more."); - else if ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); + elseif ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); //else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); else { @@ -1034,8 +1034,8 @@ class Paiement extends CommonObject // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON='mod_payment_cicada'; - else if ($conf->global->PAYMENT_ADDON=='ant') $conf->global->PAYMENT_ADDON='mod_payment_ant'; - else if ($conf->global->PAYMENT_ADDON=='cicada') $conf->global->PAYMENT_ADDON='mod_payment_cicada'; + elseif ($conf->global->PAYMENT_ADDON=='ant') $conf->global->PAYMENT_ADDON='mod_payment_ant'; + elseif ($conf->global->PAYMENT_ADDON=='cicada') $conf->global->PAYMENT_ADDON='mod_payment_cicada'; if (! empty($conf->global->PAYMENT_ADDON)) { diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 3a3ba57cb18..38888110d79 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -134,7 +134,7 @@ if ($modecompta == 'CREANCES-DETTES') $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") { +elseif ($modecompta=="RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -146,7 +146,7 @@ else if ($modecompta=="RECETTES-DEPENSES") { $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode=$langs->trans("CalcModeBookkeeping"); @@ -191,7 +191,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -232,7 +232,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -278,12 +278,12 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { // Nothing from this table } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -307,7 +307,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT sum(pf.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -347,7 +347,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -429,7 +429,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { // TVA reellement deja payee $sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm"; @@ -493,7 +493,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco } } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -516,7 +516,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco if (! empty($date_start) && ! empty($date_end)) $sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -554,7 +554,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -578,7 +578,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco if (! empty($date_start) && ! empty($date_end)) $sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -616,7 +616,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 82a8d094148..eaf5ff362ae 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -67,7 +67,7 @@ class SalariesStats extends Stats $this->where.=" AND fk_soc = ".$this->socid; } if (is_array($this->userid) && count($this->userid) > 0) $this->where.=' AND fk_user IN ('.join(',',$this->userid).')'; - else if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; + elseif ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; } diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index df199d2e23e..4e1e429f0e5 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -210,7 +210,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByVatRate"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -221,12 +221,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 701fe86f10e..388ae43eb1e 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -178,7 +178,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -189,12 +189,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { @@ -231,7 +231,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -253,7 +253,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sql.=" AND cp.fk_product is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; $sql.= ")"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index ba9556dd2ac..397538d2ac1 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -158,7 +158,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -168,12 +168,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index eec3bbcfbac..727f65a8b68 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -184,7 +184,7 @@ if ($modecompta=="CREANCES-DETTES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -194,12 +194,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { @@ -228,7 +228,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -246,7 +246,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.=" AND cs.fk_soc is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql.=" OR c.fk_parent = " . $db->escape($selected_cat); $sql.= ")"; @@ -266,7 +266,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.=" AND cs.fk_soc is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; $sql.= ")"; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 79ff8ff5df5..b700905183c 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -128,7 +128,7 @@ if ($modecompta=="CREANCES-DETTES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -141,7 +141,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $name=$langs->trans("Turnover"); $calcmode=$langs->trans("CalcModeBookkeeping"); @@ -174,7 +174,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql.= " AND f.fk_soc = ".$socid; } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -189,7 +189,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $sql.= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql.= " AND f.fk_soc = ".$socid; } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 45b93692e3a..172b66c170c 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -66,8 +66,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -217,7 +217,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $langs->load("errors"); if ($x_coll == -1) { print '
'; - } else if ($x_coll == -2) { + } elseif ($x_coll == -2) { print ''; } else { print ''; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index f0bb433c65c..0d3b7ec135d 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -115,7 +115,7 @@ if ($month > 0) else $sql.= " AND date_format(t.datev, '%m') = '$month'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND t.datev BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index a8e22815ea4..b98b3791c8b 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -66,8 +66,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -209,7 +209,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $langs->load("errors"); if ($x_coll == -1) { print ''; - } else if ($x_coll == -2) { + } elseif ($x_coll == -2) { print ''; } else { print ''; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index a5297750386..b8e82e78632 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -344,7 +344,7 @@ class Contact extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; - else if ($this->socid == -1) $sql .= " fk_soc=null,"; + elseif ($this->socid == -1) $sql .= " fk_soc=null,"; $sql .= " civility='".$this->db->escape($this->civility_id)."'"; $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; @@ -874,7 +874,7 @@ class Contact extends CommonObject unset($this->gender); if (in_array($this->civility_id, array('MR'))) { $this->gender = 'man'; - } else if(in_array($this->civility_id, array('MME','MLE'))) { + } elseif(in_array($this->civility_id, array('MME','MLE'))) { $this->gender = 'woman'; } } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index af15d873acb..087db5ddea6 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -113,13 +113,13 @@ if ($type == "c") $titre.=' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche="card.php"; } -else if ($type == "f") +elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage='contactsupplierlist'; $titre.=' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche="card.php"; } -else if ($type == "o") +elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage='contactotherlist'; $titre.=' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; @@ -330,15 +330,15 @@ if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; } -else if ($type == "f") // filtre sur type +elseif ($type == "f") // filtre sur type { $sql .= " AND s.fournisseur = 1"; } -else if ($type == "c") // filtre sur type +elseif ($type == "c") // filtre sur type { $sql .= " AND s.client IN (1, 3)"; } -else if ($type == "p") // filtre sur type +elseif ($type == "p") // filtre sur type { $sql .= " AND s.client IN (2, 3)"; } @@ -487,7 +487,7 @@ if (! empty($conf->categorie->enabled)) { $moreforfilter.='
'; if ($type == 'c') $moreforfilter.=$langs->trans('CustomersCategoriesShort'). ': '; - else if ($type == 'p') $moreforfilter.=$langs->trans('ProspectsCategoriesShort'). ': '; + elseif ($type == 'p') $moreforfilter.=$langs->trans('ProspectsCategoriesShort'). ': '; else $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort'). ': '; $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ_thirdparty,'search_categ_thirdparty',1); $moreforfilter.='
'; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8e74c33cd14..da5a8d4eaa8 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -293,7 +293,7 @@ else $ageyear=convertSecondToTime($now-$object->birthday,'year')-1970; $agemonth=convertSecondToTime($now-$object->birthday,'month')-1; if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')'; - else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; + elseif ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; else print '('.$agemonth.' '.$langs->trans("DurationMonth").')'; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 844cd4321a4..d0e928ff7cd 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -119,7 +119,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) + elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { if (! GETPOST('dateend')) { @@ -408,13 +408,13 @@ if (empty($reshook)) } } - else if ($action == 'classin' && $user->rights->contrat->creer) + elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); } // Add a new line - else if ($action == 'addline' && $user->rights->contrat->creer) + elseif ($action == 'addline' && $user->rights->contrat->creer) { // Set if we used free entry or predefined product $predef=''; @@ -653,7 +653,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha')) + elseif ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha')) { $error = 0; @@ -761,7 +761,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->deleteline(GETPOST('lineid'),$user); @@ -776,7 +776,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->validate($user); @@ -805,7 +805,7 @@ if (empty($reshook)) } } - else if ($action == 'reopen' && $user->rights->contrat->creer) + elseif ($action == 'reopen' && $user->rights->contrat->creer) { $result = $object->reopen($user); if ($result < 0) @@ -815,7 +815,7 @@ if (empty($reshook)) } // Close all lines - else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->closeAll($user); if ($result < 0) @@ -825,7 +825,7 @@ if (empty($reshook)) } // Close all lines - else if ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->activateAll($user); if ($result < 0) @@ -834,7 +834,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) { $result=$object->delete($user); if ($result >= 0) @@ -848,7 +848,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { if (GETPOST('newcid') > 0) { @@ -871,7 +871,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors'); } } - else if ($action == 'update_extras') + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -1042,13 +1042,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { $result=$object->swapContactStatus(GETPOST('ligne')); } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact(GETPOST('lineid')); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 5929ec034d1..635d7c5851e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -445,7 +445,7 @@ class Contrat extends CommonObject { $num = $force_number; } - else if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life + elseif (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index c1d21426f83..3272d7ed908 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -241,12 +241,12 @@ if ($month > 0) { if ($year > 0 && empty($day)) $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(c.date_contrat, '%m') = '".$month."'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } @@ -711,7 +711,7 @@ while ($i < min($num,$limit)) print $nbofsalesrepresentative; print ''; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 9d33def496c..d585ace7cd2 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -60,7 +60,7 @@ if ($action == 'builddoc' && $permissioncreate) //{ if (GETPOST('fk_bank','int')) { // this field may come from an external module $object->fk_bank = GETPOST('fk_bank','int'); - } else if (! empty($object->fk_account)) { + } elseif (! empty($object->fk_account)) { $object->fk_bank = $object->fk_account; } //} diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 183585d986b..655c3e62efd 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -121,17 +121,17 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $thirdparty=$object->thirdparty; $sendtosocid=$thirdparty->id; } - else if ($object->element == 'member' || $object->element == 'user') + elseif ($object->element == 'member' || $object->element == 'user') { $thirdparty=$object; if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; } - else if ($object->element == 'societe') + elseif ($object->element == 'societe') { $thirdparty=$object; if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; } - else if ($object->element == 'contact') + elseif ($object->element == 'contact') { $contact=$object; if ($contact->id > 0) $sendtosocid=$contact->fetch_thirdparty()->id; diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index ec253d5ef4a..511adbf9e3e 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -61,7 +61,7 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel } } // Set public note -else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha')) +elseif ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha')) { if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index bfbf35b019c..4164b2e41de 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -185,33 +185,33 @@ if ($type == 'directory') // Auto area for suppliers invoices if ($module == 'company') $upload_dir = $conf->societe->dir_output; // Auto area for suppliers invoices - else if ($module == 'invoice') $upload_dir = $conf->facture->dir_output; + elseif ($module == 'invoice') $upload_dir = $conf->facture->dir_output; // Auto area for suppliers invoices - else if ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; + elseif ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; // Auto area for customers proposal - else if ($module == 'propal') $upload_dir = $conf->propal->dir_output; + elseif ($module == 'propal') $upload_dir = $conf->propal->dir_output; // Auto area for suppliers proposal - else if ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; + elseif ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; // Auto area for customers orders - else if ($module == 'order') $upload_dir = $conf->commande->dir_output; + elseif ($module == 'order') $upload_dir = $conf->commande->dir_output; // Auto area for suppliers orders - else if ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; + elseif ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; // Auto area for suppliers invoices - else if ($module == 'contract') $upload_dir = $conf->contrat->dir_output; + elseif ($module == 'contract') $upload_dir = $conf->contrat->dir_output; // Auto area for products - else if ($module == 'product') $upload_dir = $conf->product->dir_output; + elseif ($module == 'product') $upload_dir = $conf->product->dir_output; // Auto area for suppliers invoices - else if ($module == 'tax') $upload_dir = $conf->tax->dir_output; + elseif ($module == 'tax') $upload_dir = $conf->tax->dir_output; // Auto area for projects - else if ($module == 'project') $upload_dir = $conf->projet->dir_output; + elseif ($module == 'project') $upload_dir = $conf->projet->dir_output; // Auto area for interventions - else if ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; + elseif ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; // Auto area for users - else if ($module == 'user') $upload_dir = $conf->user->dir_output; + elseif ($module == 'user') $upload_dir = $conf->user->dir_output; // Auto area for expense report - else if ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; + elseif ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; // Auto area for holiday - else if ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; + elseif ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; // Automatic list if (in_array($module, $automodules)) @@ -280,7 +280,7 @@ if ($type == 'directory') $textifempty = $langs->trans('NoFileFound'); } - else if ($section === '0') + elseif ($section === '0') { if ($module == 'ecm') $textifempty='
'.$langs->trans("DirNotSynchronizedSyncFirst").'

'; else $textifempty = $langs->trans('NoFileFound'); diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index 0f733f4df5c..4977b526cc2 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -58,7 +58,7 @@ if (! empty($action) && ! empty($name)) { dolibarr_set_const($db, $name, $value, 'chaine', 0, '', $entity); } - else if ($action == 'del') + elseif ($action == 'del') { dolibarr_del_const($db, $name, $entity); } diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index e5972d29d70..5d06bb338ef 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -52,18 +52,18 @@ if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type)) // For compatibility if ($element == 'order' || $element == 'commande') { $classpath = $subelement = 'commande'; } - else if ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } - else if ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } - else if ($element == 'contract') { $classpath = $subelement = 'contrat'; } - else if ($element == 'shipping') { $classpath = $subelement = 'expedition'; } - else if ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } - else if ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } - else if ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } + elseif ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } + elseif ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } + elseif ($element == 'contract') { $classpath = $subelement = 'contrat'; } + elseif ($element == 'shipping') { $classpath = $subelement = 'expedition'; } + elseif ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } + elseif ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } + elseif ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } dol_include_once('/'.$classpath.'/class/'.$subelement.'.class.php'); if ($element == 'order_supplier') { $classname = 'CommandeFournisseur'; } - else if ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } + elseif ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } else $classname = ucfirst($subelement); $object = new $classname($db); diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index abf3efba7db..918d1920759 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -56,14 +56,14 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } if ($element == 'propal') $element = 'propale'; - else if ($element == 'fichinter') $element = 'ficheinter'; - else if ($element == 'product') $element = 'produit'; - else if ($element == 'member') $element = 'adherent'; - else if ($element == 'order_supplier') { + elseif ($element == 'fichinter') $element = 'ficheinter'; + elseif ($element == 'product') $element = 'produit'; + elseif ($element == 'member') $element = 'adherent'; + elseif ($element == 'order_supplier') { $element = 'fournisseur'; $subelement = 'commande'; } - else if ($element == 'invoice_supplier') { + elseif ($element == 'invoice_supplier') { $element = 'fournisseur'; $subelement = 'facture'; } @@ -84,7 +84,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ $ret = $form->$methodname(); if ($ret > 0) echo json_encode($form->$cachename); } - else if (! empty($ext_element)) + elseif (! empty($ext_element)) { $module = $subelement = $ext_element; if (preg_match('/^([^_]+)_([^_]+)/i',$ext_element,$regs)) diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index 3eab18216d1..3b5585837d6 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -53,7 +53,7 @@ if (! empty($output) && isset($amount) && isset($tva_tx)) $return['price_ht'] = $amount; $return['price_ttc'] = (isset($price) && $price != '' ? price($price) : ''); } - else if ($output == 'price_ht') { + elseif ($output == 'price_ht') { $price = price2num($amount / (1 + ($tva_tx/100)), 'MU'); $return['price_ht'] = (isset($price) && $price != '' ? price($price) : ''); diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 188dcbb29da..8715997d778 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -79,14 +79,14 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } if ($element == 'propal') $newelement = 'propale'; - else if ($element == 'fichinter') $newelement = 'ficheinter'; - else if ($element == 'product') $newelement = 'produit'; - else if ($element == 'member') $newelement = 'adherent'; - else if ($element == 'order_supplier') { + elseif ($element == 'fichinter') $newelement = 'ficheinter'; + elseif ($element == 'product') $newelement = 'produit'; + elseif ($element == 'member') $newelement = 'adherent'; + elseif ($element == 'order_supplier') { $newelement = 'fournisseur'; $subelement = 'commande'; } - else if ($element == 'invoice_supplier') { + elseif ($element == 'invoice_supplier') { $newelement = 'fournisseur'; $subelement = 'facture'; } @@ -131,13 +131,13 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ $return['error'] = $langs->trans('ErrorBadValue'); } } - else if ($type == 'datepicker') + elseif ($type == 'datepicker') { $timestamp = GETPOST('timestamp','int',2); $format = 'date'; $newvalue = ($timestamp / 1000); } - else if ($type == 'select') + elseif ($type == 'select') { $loadmethodname = 'load_cache_'.$loadmethod; $loadcachename = 'cache_'.$loadmethod; @@ -211,7 +211,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ if ($ret > 0) { if ($type == 'numeric') $value = price($newvalue); - else if ($type == 'textarea') $value = dol_nl2br($newvalue); + elseif ($type == 'textarea') $value = dol_nl2br($newvalue); $return['value'] = $value; $return['view'] = (! empty($view) ? $view : $value); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 9dc4c162e0f..5eff8a7405d 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -368,17 +368,17 @@ class box_graph_product_distribution extends ModeleBoxes if ($nbofgraph == 1) { if ($showinvoicenb) $stringtoshow.=$px1->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); else $stringtoshow.=$px3->show(); } if ($nbofgraph == 2) { $stringtoshow.='
'; if ($showinvoicenb) $stringtoshow.=$px1->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); $stringtoshow.='
'; if ($showordernb) $stringtoshow.=$px3->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); $stringtoshow.='
'; } if ($nbofgraph == 3) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 52d98790dcc..868d9b27039 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -294,7 +294,7 @@ class CMailFile $this->message.= $text_body . $files_encoded; $this->message.= "--" . $this->mixed_boundary . "--" . $this->eol; } - else if ($this->sendmode == 'smtps') + elseif ($this->sendmode == 'smtps') { // Use SMTPS library // ------------------------------------------ @@ -349,7 +349,7 @@ class CMailFile $this->smtps=$smtps; } - else if ($this->sendmode == 'swiftmailer') + elseif ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library // ------------------------------------------ @@ -670,7 +670,7 @@ class CMailFile if (! empty($conf->global->$keyforsmtpserver)) ini_restore('SMTP'); if (! empty($conf->global->$keyforsmtpport)) ini_restore('smtp_port'); } - else if ($this->sendmode == 'smtps') + elseif ($this->sendmode == 'smtps') { if (! is_object($this->smtps)) { @@ -750,7 +750,7 @@ class CMailFile } } } - else if ($this->sendmode == 'swiftmailer') + elseif ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library // ------------------------------------------ diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 86ffed48551..c3aa2e23417 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -139,7 +139,7 @@ class CSMSFile if (! empty($conf->global->MAIN_SMS_DEBUG)) $this->dump_sms_result($res); } } - else if (! empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + elseif (! empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp=explode('@',$conf->global->MAIN_SMS_SENDMODE); $classfile=$tmp[0]; $module=(empty($tmp[1])?$tmp[0]:$tmp[1]); diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 726e95214cb..d6a0e5845eb 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -230,7 +230,7 @@ abstract class CommonDocGenerator { $object->array_options['options_'.$key] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); } - else if($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') { $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } @@ -760,11 +760,11 @@ abstract class CommonDocGenerator //Add value to store price with currency $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } - else if($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') { $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } - else if($extrafields->attribute_type[$key] == 'date') + elseif($extrafields->attribute_type[$key] == 'date') { if (strlen($object->array_options['options_'.$key])>0) { @@ -782,7 +782,7 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - else if($extrafields->attribute_type[$key] == 'datetime') + elseif($extrafields->attribute_type[$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; $object->array_options['options_'.$key] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); // using company output language @@ -791,7 +791,7 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - else if($extrafields->attribute_type[$key] == 'link') + elseif($extrafields->attribute_type[$key] == 'link') { $id = $object->array_options['options_'.$key]; if ($id != "") diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 945d257b8eb..f9fd88513c8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -426,8 +426,8 @@ abstract class CommonObject $sql.= " WHERE entity IN (".getEntity($element).")" ; if ($id > 0) $sql.= " AND rowid = ".$db->escape($id); - else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'"; - else if ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'"; + elseif ($ref) $sql.= " AND ref = '".$db->escape($ref)."'"; + elseif ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'"; else { $error='ErrorWrongParameters'; dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR); @@ -1207,7 +1207,7 @@ abstract class CommonObject if($this->element=='shipping' && $this->origin_id != 0) { $id=$this->origin_id; $element='commande'; - } else if($this->element=='reception' && $this->origin_id != 0) { + } elseif($this->element=='reception' && $this->origin_id != 0) { $id=$this->origin_id; $element='order_supplier'; } else { @@ -1353,7 +1353,7 @@ abstract class CommonObject if (empty($idtype) && $idtype != '0') // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined { if ($this->element == 'product') $idtype = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; - else if ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; + elseif ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; else dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING); } @@ -1562,8 +1562,8 @@ abstract class CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'"; - else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value); - else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null"); + elseif ($format == 'int') $sql.= $field." = ".$this->db->escape($value); + elseif ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null"); if ($fk_user_field) { @@ -1648,8 +1648,8 @@ abstract class CommonObject $sql.= ",".MAIN_DB_PREFIX."usergroup_user as ug"; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - else if ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$alias.".rowid = sc.fk_soc"; $sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id; @@ -1660,7 +1660,7 @@ abstract class CommonObject $sql.=$filter; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -1694,8 +1694,8 @@ abstract class CommonObject $sql.= ",".MAIN_DB_PREFIX."usergroup_user as ug"; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - else if ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$alias.".rowid = sc.fk_soc"; $sql.= " WHERE te.".$fieldid." > '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id; @@ -1706,7 +1706,7 @@ abstract class CommonObject $sql.=$filter; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -2675,7 +2675,7 @@ abstract class CommonObject if ($this->db->query($sql)) { if ($suffix == '_public') $this->note_public = $note; - else if ($suffix == '_private') $this->note_private = $note; + elseif ($suffix == '_private') $this->note_private = $note; else { $this->note = $note; // deprecated @@ -3059,7 +3059,7 @@ abstract class CommonObject $sql.= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'"; if ($withtargettype) $sql.= " AND targettype = '".$targettype."'"; } - else if ($justtarget) + elseif ($justtarget) { $sql.= "fk_target = ".$targetid." AND targettype = '".$targettype."'"; if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'"; @@ -3087,7 +3087,7 @@ abstract class CommonObject { $this->linkedObjectsIds[$obj->targettype][$obj->rowid]=$obj->fk_target; } - else if ($justtarget) + elseif ($justtarget) { $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid]=$obj->fk_source; } @@ -3125,28 +3125,28 @@ abstract class CommonObject if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $classpath = 'compta/facture/class'; $module = 'facture'; } - else if ($objecttype == 'propal') { + elseif ($objecttype == 'propal') { $classpath = 'comm/propal/class'; } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { $classpath = 'supplier_proposal/class'; } - else if ($objecttype == 'shipping') { + elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; } - else if ($objecttype == 'delivery') { + elseif ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; } - else if ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { + elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; } - else if ($objecttype == 'fichinter') { + elseif ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $classpath = 'adherents/class'; $module = 'adherent'; } @@ -3156,19 +3156,19 @@ abstract class CommonObject if ($objecttype == 'order') { $classfile = 'commande'; $classname = 'Commande'; } - else if ($objecttype == 'invoice_supplier') { + elseif ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; } - else if ($objecttype == 'order_supplier') { + elseif ($objecttype == 'order_supplier') { $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $classfile = 'facture-rec'; $classname = 'FactureRec'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $classfile = 'subscription'; $classname = 'Subscription'; } @@ -3224,7 +3224,7 @@ abstract class CommonObject $updatetarget=false; if (! empty($sourceid) && ! empty($sourcetype) && empty($targetid) && empty($targettype)) $updatesource=true; - else if (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $updatetarget=true; + elseif (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $updatetarget=true; $sql = "UPDATE ".MAIN_DB_PREFIX."element_element SET "; if ($updatesource) @@ -3234,7 +3234,7 @@ abstract class CommonObject $sql.= " WHERE fk_target = ".$this->id; $sql.= " AND targettype = '".$this->db->escape($this->element)."'"; } - else if ($updatetarget) + elseif ($updatetarget) { $sql.= "fk_target = ".$targetid; $sql.= ", targettype = '".$this->db->escape($targettype)."'"; @@ -3271,7 +3271,7 @@ abstract class CommonObject $deletetarget=false; if (! empty($sourceid) && ! empty($sourcetype) && empty($targetid) && empty($targettype)) $deletesource=true; - else if (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $deletetarget=true; + elseif (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $deletetarget=true; $sourceid = (! empty($sourceid) ? $sourceid : $this->id); $sourcetype = (! empty($sourcetype) ? $sourcetype : $this->element); @@ -3291,7 +3291,7 @@ abstract class CommonObject $sql.= " fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."'"; $sql.= " AND fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."'"; } - else if ($deletetarget) + elseif ($deletetarget) { $sql.= " fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."'"; $sql.= " AND fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."'"; @@ -3626,7 +3626,7 @@ abstract class CommonObject { if (empty($totalToShip)) $totalToShip=0; // Avoid warning because $totalToShip is '' $totalToShip+=$line->qty_shipped; // defined for shipment only - }else if ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) + }elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) { if (empty($totalToShip)) $totalToShip=0; $totalToShip+=$line->qty; // defined for reception only @@ -4240,7 +4240,7 @@ abstract class CommonObject $discount->fk_soc = $this->socid; $this->tpl['label'].= $discount->getNomUrl(0,'discount'); } - else if (! empty($line->fk_product)) + elseif (! empty($line->fk_product)) { $productstatic = new Product($this->db); $productstatic->id = $line->fk_product; @@ -5437,7 +5437,7 @@ abstract class CommonObject { $morecss = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $morecss = 'minwidth200'; } @@ -6035,7 +6035,7 @@ abstract class CommonObject { $showsize = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $showsize = 'minwidth200'; } @@ -6589,12 +6589,12 @@ abstract class CommonObject { $buyPrice = $product->cost_price; } - else if ($product->pmp > 0) + elseif ($product->pmp > 0) { $buyPrice = $product->pmp; } } - else if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') + elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); @@ -6618,7 +6618,7 @@ abstract class CommonObject { $buyPrice = $productFournisseur->fourn_unitprice; } - else if ($result < 0) + elseif ($result < 0) { $this->errors[] = $productFournisseur->error; return -2; @@ -6740,7 +6740,7 @@ abstract class CommonObject if ($nbphoto % $nbbyrow == 1) $return.= '
'; $return.= ''; if (($nbphoto % $nbbyrow) == 0) $return.= ''; } - else if ($nbbyrow < 0) $return.=''; + elseif ($nbbyrow < 0) $return.=''; } if (empty($size)) { // Format origine @@ -7003,7 +7003,7 @@ abstract class CommonObject $queryarray[$field] = $this->db->idate($this->{$field}); } } - else if($this->isArray($info)) + elseif($this->isArray($info)) { if(! empty($this->{$field})) { if(! is_array($this->{$field})) { @@ -7014,7 +7014,7 @@ abstract class CommonObject $queryarray[$field] = null; } } - else if($this->isInt($info)) + elseif($this->isInt($info)) { if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field]=$conf->entity; else @@ -7023,7 +7023,7 @@ abstract class CommonObject if (empty($queryarray[$field])) $queryarray[$field]=0; // May be reset to null later if property 'notnull' is -1 for this field. } } - else if($this->isFloat($info)) + elseif($this->isFloat($info)) { $queryarray[$field] = (double) price2num($this->{$field}); if (empty($queryarray[$field])) $queryarray[$field]=0; @@ -7111,7 +7111,7 @@ abstract class CommonObject protected function quote($value, $fieldsentry) { if (is_null($value)) return 'NULL'; - else if (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value"); + elseif (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value"); else return "'".$this->db->escape($value)."'"; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index de39260e007..d25d3b13f36 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -180,10 +180,10 @@ class Conf if (! isset($this->modules_parts[$partname]) || ! is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $arrValue = json_decode($value,true); if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue; - else if (in_array($partname,array('login','menus','substitutions','triggers','tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; - else if (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; - else if (in_array($partname,array('sms'))) $value = '/'.$modulename.'/'; - else if ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe + elseif (in_array($partname,array('login','menus','substitutions','triggers','tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; + elseif (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; + elseif (in_array($partname,array('sms'))) $value = '/'.$modulename.'/'; + elseif ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); // $value may be a string or an array } // If this is a module constant (must be at end) @@ -252,7 +252,7 @@ class Conf if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones // Clean var use vat for company if (! isset($this->global->FACTURE_TVAOPTION)) $this->global->FACTURE_TVAOPTION=1; - else if (! empty($this->global->FACTURE_TVAOPTION) && ! is_numeric($this->global->FACTURE_TVAOPTION)) + elseif (! empty($this->global->FACTURE_TVAOPTION) && ! is_numeric($this->global->FACTURE_TVAOPTION)) { // Old value of option, we clean to use new value (0 or 1) if ($this->global->FACTURE_TVAOPTION != "franchise") $this->global->FACTURE_TVAOPTION=1; diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 5129ac54ece..a77b1cc8793 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -416,15 +416,15 @@ class CoreObject extends CommonObject { $this->setDate($key, $value); } - else if( $this->checkFieldType($key, 'array')) + elseif( $this->checkFieldType($key, 'array')) { $this->{$key} = $value; } - else if( $this->checkFieldType($key, 'float') ) + elseif( $this->checkFieldType($key, 'float') ) { $this->{$key} = (double) price2num($value); } - else if( $this->checkFieldType($key, 'int') ) { + elseif( $this->checkFieldType($key, 'int') ) { $this->{$key} = (int) price2num($value); } else diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 48c426a830f..bb1e10e7a43 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -538,7 +538,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND f.type = 3'; } - else if ($invoice->element == 'invoice_supplier') + elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; @@ -584,7 +584,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND (f.type = 2 OR f.type = 0)'; // Find discount coming from credit note or excess received } - else if ($invoice->element == 'invoice_supplier') + elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index a57e4e844ec..871951e3df0 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -48,7 +48,7 @@ class DolGeoIP // geoip may have been already included with PEAR if (! function_exists('geoip_country_code_by_name')) $res=include_once GEOIP_PATH.'geoip.inc'; } - else if ($type == 'city') + elseif ($type == 'city') { // geoip may have been already included with PEAR if (! function_exists('geoip_country_code_by_name')) $res=include_once GEOIP_PATH.'geoipcity.inc'; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 42386494a37..29d49c0ff9a 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -704,7 +704,7 @@ class DolGraph // Create graph $classname=''; if (! isset($this->type[0]) || $this->type[0] == 'bars') $classname='BarPlot'; // Only one type (first one) is supported by artichow - else if ($this->type[0] == 'lines' || $this->type[0] == 'linesnopoint') $classname='LinePlot'; + elseif ($this->type[0] == 'lines' || $this->type[0] == 'linesnopoint') $classname='LinePlot'; else $classname='TypeUnknown'; include_once ARTICHOW_PATH.$classname.'.class.php'; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cc1fae502b3..b09b48e1d3d 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -979,7 +979,7 @@ class ExtraFields { $morecss = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $morecss = 'minwidth200'; } @@ -1333,7 +1333,7 @@ class ExtraFields // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) { $InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]); - } else if (preg_match("#^.*list.php$#",$_SERVER["DOCUMENT_URI"])) { + } elseif (preg_match("#^.*list.php$#",$_SERVER["DOCUMENT_URI"])) { // Pattern for word=$ID$ $word = '\b[a-zA-Z0-9-\.-_]+\b=\$ID\$'; @@ -1371,7 +1371,7 @@ class ExtraFields $boolCond =(( $matchCondition[1] == "AND" )?' AND 1 ':' OR 0 '); $InfoFieldList[4]=str_replace($matchCondition[0],$boolCond.$matchCondition[3],$InfoFieldList[4]); } - else if (! empty($matchCondition[3])) { + elseif (! empty($matchCondition[3])) { $boolCond =(( $matchCondition[3] == "AND" )?' 1 AND ':' 0 OR'); $InfoFieldList[4]=str_replace($matchCondition[0],$boolCond,$InfoFieldList[4]); } @@ -1945,7 +1945,7 @@ class ExtraFields // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key=dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]); } - else if (in_array($key_type,array('checkbox','chkbxlst'))) + elseif (in_array($key_type,array('checkbox','chkbxlst'))) { $value_arr=GETPOST("options_".$key, 'array'); // check if an array if (!empty($value_arr)) { @@ -1954,7 +1954,7 @@ class ExtraFields $value_key=''; } } - else if (in_array($key_type,array('price','double'))) + elseif (in_array($key_type,array('price','double'))) { $value_arr=GETPOST("options_".$key, 'alpha'); $value_key=price2num($value_arr); @@ -2020,14 +2020,14 @@ class ExtraFields // Clean parameters $value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]); } - else if (in_array($key_type,array('checkbox', 'chkbxlst'))) + elseif (in_array($key_type,array('checkbox', 'chkbxlst'))) { $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix); // Make sure we get an array even if there's only one checkbox $value_arr=(array) $value_arr; $value_key=implode(',', $value_arr); } - else if (in_array($key_type,array('price','double'))) + elseif (in_array($key_type,array('price','double'))) { $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix); $value_key=price2num($value_arr); diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 027fdda0514..bf1045aaa35 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -136,7 +136,7 @@ class FileUpload $object_ref = dol_sanitizeFileName($object->ref); if ($element == 'invoice_supplier') { $object_ref = get_exdir($object->id,2,0,0,$object,'invoice_supplier') . $object_ref; - } else if ($element == 'project_task') { + } elseif ($element == 'project_task') { $object_ref = $object->project->ref . '/' . $object_ref; } @@ -456,7 +456,7 @@ class FileUpload } } } - else if ($this->options['discard_aborted_uploads']) + elseif ($this->options['discard_aborted_uploads']) { unlink($file_path); $file->error = 'abort'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 228c9fa1538..1b9b54f2bc3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -194,13 +194,13 @@ class Form $tmp=explode(':',$typeofdata); $ret.=''; } - else if (preg_match('/^(numeric|amount)/',$typeofdata)) + elseif (preg_match('/^(numeric|amount)/',$typeofdata)) { $tmp=explode(':',$typeofdata); $valuetoshow=price2num($editvalue?$editvalue:$value); $ret.=''; } - else if (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) + elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) { $tmp=explode(':',$typeofdata); $cols=$tmp[2]; @@ -217,15 +217,15 @@ class Form $ret.=dol_string_neverthesehtmltags($valuetoshow, array('textarea')); $ret.=''; } - else if ($typeofdata == 'day' || $typeofdata == 'datepicker') + elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $ret.=$this->selectDate($value,$htmlname,0,0,1,'form'.$htmlname,1,0); } - else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') + elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { $ret.=$this->selectDate($value,$htmlname,1,1,1,'form'.$htmlname,1,0); } - else if (preg_match('/^select;/',$typeofdata)) + elseif (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); foreach($arraydata as $val) @@ -235,7 +235,7 @@ class Form } $ret.=$this->selectarray($htmlname,$arraylist,$value); } - else if (preg_match('/^ckeditor/',$typeofdata)) + elseif (preg_match('/^ckeditor/',$typeofdata)) { $tmp=explode(':',$typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -261,7 +261,7 @@ class Form elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); - else if (preg_match('/^select;/',$typeofdata)) + elseif (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); foreach($arraydata as $val) @@ -271,7 +271,7 @@ class Form } $ret.=$arraylist[$value]; } - else if (preg_match('/^ckeditor/',$typeofdata)) + elseif (preg_match('/^ckeditor/',$typeofdata)) { $tmpcontent=dol_htmlentitiesbr($value); if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) @@ -314,8 +314,8 @@ class Form // Check parameters if (preg_match('/^text/',$inputType)) $value = dol_nl2br($value); - else if (preg_match('/^numeric/',$inputType)) $value = price($value); - else if ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day'); + elseif (preg_match('/^numeric/',$inputType)) $value = price($value); + elseif ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day'); if ($condition) { @@ -348,7 +348,7 @@ class Form if (! empty($tmp[2])) $savemethod=$tmp[2]; $out.= ''."\n"; } - else if ((preg_match('/^day$/',$inputType)) || (preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType))) + elseif ((preg_match('/^day$/',$inputType)) || (preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType))) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; @@ -357,21 +357,21 @@ class Form $out.= ''."\n"; // Use for timestamp format } - else if (preg_match('/^(select|autocomplete)/',$inputType)) + elseif (preg_match('/^(select|autocomplete)/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $loadmethod=$tmp[1]; if (! empty($tmp[2])) $savemethod=$tmp[2]; if (! empty($tmp[3])) $button_only=true; } - else if (preg_match('/^textarea/',$inputType)) + elseif (preg_match('/^textarea/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $rows=(empty($tmp[1])?'8':$tmp[1]); $cols=(empty($tmp[2])?'80':$tmp[2]); } - else if (preg_match('/^ckeditor/',$inputType)) + elseif (preg_match('/^ckeditor/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $toolbar=$tmp[1]; @@ -1081,7 +1081,7 @@ class Form $out.= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); $out.=''; if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : '; - else if ($hidelabel > 1) { + elseif ($hidelabel > 1) { $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { $out.= img_picto($langs->trans("Search"), 'search'); @@ -1131,7 +1131,7 @@ class Form $outarray=array(); if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); // Clean $filter that may contains sql conditions so sql code if (function_exists('testSqlAndScriptInject')) { @@ -1421,7 +1421,7 @@ class Form if (empty($htmlid)) $htmlid = $htmlname; if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); $out=''; if (! is_object($hookmanager)) @@ -1598,7 +1598,7 @@ class Form if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id; if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); $excludeUsers=null; $includeUsers=null; @@ -1607,12 +1607,12 @@ class Form if (is_array($exclude)) $excludeUsers = implode(",",$exclude); // Permettre l'inclusion d'utilisateurs if (is_array($include)) $includeUsers = implode(",",$include); - else if ($include == 'hierarchy') + elseif ($include == 'hierarchy') { // Build list includeUsers to have only hierarchy $includeUsers = implode(",",$user->getAllChildIds(0)); } - else if ($include == 'hierarchyme') + elseif ($include == 'hierarchyme') { // Build list includeUsers to have only hierarchy and current user $includeUsers = implode(",",$user->getAllChildIds(1)); @@ -1991,7 +1991,7 @@ class Form trans("RefOrLabel").' : '; - else if ($hidelabel > 1) { + elseif ($hidelabel > 1) { $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { print img_picto($langs->trans("Search"), 'search'); @@ -2367,7 +2367,7 @@ class Form if (! empty($conf->stock->enabled) && $objp->fk_product_type == 0 && isset($objp->stock)) { if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"'; - else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; + elseif ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; } $opt.= '>'; $opt.= $objp->ref; @@ -4906,7 +4906,7 @@ class Form $code_country.=",'".$societe_acheteuse->country_code."'"; } } - else if (! $idprod) // We don't know type of product + elseif (! $idprod) // We don't know type of product { $code_country.=",'".$societe_acheteuse->country_code."'"; } @@ -6370,40 +6370,40 @@ class Form $tplpath = 'compta/'.$element; if (empty($conf->facture->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $tplpath = 'compta/facture'; $tplname = 'linkedobjectblockForRec'; if (empty($conf->facture->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'propal') { + elseif ($objecttype == 'propal') { $tplpath = 'comm/'.$element; if (empty($conf->propal->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { if (empty($conf->supplier_proposal->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'shipping' || $objecttype == 'shipment') { + elseif ($objecttype == 'shipping' || $objecttype == 'shipment') { $tplpath = 'expedition'; if (empty($conf->expedition->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'reception') { + elseif ($objecttype == 'reception') { $tplpath = 'reception'; if (empty($conf->reception->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'delivery') { + elseif ($objecttype == 'delivery') { $tplpath = 'livraison'; if (empty($conf->expedition->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'invoice_supplier') { + elseif ($objecttype == 'invoice_supplier') { $tplpath = 'fourn/facture'; } - else if ($objecttype == 'order_supplier') { + elseif ($objecttype == 'order_supplier') { $tplpath = 'fourn/commande'; } - else if ($objecttype == 'expensereport') { + elseif ($objecttype == 'expensereport') { $tplpath = 'expensereport'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $tplpath = 'adherents'; } @@ -6509,7 +6509,7 @@ class Form $possiblelinks=array_merge($possiblelinks, $hookmanager->resArray); } } - else if ($reshook > 0) + elseif ($reshook > 0) { if (is_array($hookmanager->resArray) && count($hookmanager->resArray)) { @@ -6832,7 +6832,7 @@ class Form { $ret.=dol_htmlentities($object->name); } - else if ($object->element == 'member') + elseif ($object->element == 'member') { $ret.=$object->ref.'
'; $fullname=$object->getFullName($langs); @@ -6842,23 +6842,23 @@ class Form $ret.= dol_htmlentities($fullname) . ((! empty($object->societe) && $object->societe != $fullname)?' ('.dol_htmlentities($object->societe).')':''); } } - else if (in_array($object->element, array('contact', 'user', 'usergroup'))) + elseif (in_array($object->element, array('contact', 'user', 'usergroup'))) { $ret.=dol_htmlentities($object->getFullName($langs)); } - else if (in_array($object->element, array('action', 'agenda'))) + elseif (in_array($object->element, array('action', 'agenda'))) { $ret.=$object->ref.'
'.$object->label; } - else if (in_array($object->element, array('adherent_type'))) + elseif (in_array($object->element, array('adherent_type'))) { $ret.=$object->label; } - else if ($object->element == 'ecm_directories') + elseif ($object->element == 'ecm_directories') { $ret.=''; } - else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref); + elseif ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) @@ -6931,32 +6931,32 @@ class Form if (! empty($object->logo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_mini'); // getImageFileNameForSize include the thumbs - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo; } $email=$object->email; } - else if ($modulepart=='contact') + elseif ($modulepart=='contact') { $dir=$conf->societe->multidir_output[$entity].'/contact'; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo; } $email=$object->email; $capture='user'; } - else if ($modulepart=='userphoto') + elseif ($modulepart=='userphoto') { $dir=$conf->user->dir_output; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo; } @@ -6964,13 +6964,13 @@ class Form $email=$object->email; $capture='user'; } - else if ($modulepart=='memberphoto') + elseif ($modulepart=='memberphoto') { $dir=$conf->adherent->dir_output; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.$object->photo; } @@ -6985,7 +6985,7 @@ class Form if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; $originalfile=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; } @@ -7008,7 +7008,7 @@ class Form $ret.='Photo'; if ($addlinktofullsize) $ret.=''; } - else if ($altfile && file_exists($dir."/".$altfile)) + elseif ($altfile && file_exists($dir."/".$altfile)) { if ($addlinktofullsize) { diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 32a421a7b61..350c3c747ee 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -100,7 +100,7 @@ class FormAdmin $out.= ''; } } - else if ($selected == $key) + elseif ($selected == $key) { $out.= ''; } @@ -167,7 +167,7 @@ class FormAdmin $prefix=''; // 0=Recommanded, 1=Experimental, 2=Developpement, 3=Other if (preg_match('/^eldy/i',$file)) $prefix='0'; - else if (preg_match('/^smartphone/i',$file)) $prefix='2'; + elseif (preg_match('/^smartphone/i',$file)) $prefix='2'; else $prefix='3'; if ($file == $selected) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9d0bded74b6..edeab6a5983 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -816,12 +816,12 @@ class FormCompany { if (isset($idprof)) { if ($idprof==1) $formlength=9; - else if ($idprof==2) $formlength=14; - else if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier - else if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id + elseif ($idprof==2) $formlength=14; + elseif ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier + elseif ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id } } - else if ($country_code == 'ES') + elseif ($country_code == 'ES') { if ($idprof==1) $formlength=9; //CIF/NIF/NIE 9 digits if ($idprof==2) $formlength=12; //NASS 12 digits without / @@ -833,9 +833,9 @@ class FormCompany $selected=$preselected; if (! $selected && isset($idprof)) { if ($idprof==1 && ! empty($this->idprof1)) $selected=$this->idprof1; - else if ($idprof==2 && ! empty($this->idprof2)) $selected=$this->idprof2; - else if ($idprof==3 && ! empty($this->idprof3)) $selected=$this->idprof3; - else if ($idprof==4 && ! empty($this->idprof4)) $selected=$this->idprof4; + elseif ($idprof==2 && ! empty($this->idprof2)) $selected=$this->idprof2; + elseif ($idprof==3 && ! empty($this->idprof3)) $selected=$this->idprof3; + elseif ($idprof==4 && ! empty($this->idprof4)) $selected=$this->idprof4; } $maxlength=$formlength; diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 5bdb00cfc40..be028b5fe14 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -78,7 +78,7 @@ class FormContract // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; - else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') + elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') { $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " OR c.fk_soc IS NULL)"; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d8af718bb04..5bb922d43ed 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -380,7 +380,7 @@ class FormFile $modellist=ModeleThirdPartyDoc::liste_modeles($this->db); } } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -389,7 +389,7 @@ class FormFile $modellist=ModelePDFPropales::liste_modeles($this->db); } } - else if ($modulepart == 'supplier_proposal') + elseif ($modulepart == 'supplier_proposal') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -398,7 +398,7 @@ class FormFile $modellist=ModelePDFSupplierProposal::liste_modeles($this->db); } } - else if ($modulepart == 'commande') + elseif ($modulepart == 'commande') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -434,7 +434,7 @@ class FormFile $modellist=ModelePDFDeliveryOrder::liste_modeles($this->db); } } - else if ($modulepart == 'ficheinter') + elseif ($modulepart == 'ficheinter') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -524,7 +524,7 @@ class FormFile $modellist=ModeleExports::liste_modeles($this->db); } } - else if ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') + elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -533,7 +533,7 @@ class FormFile $modellist=ModelePDFSuppliersOrders::liste_modeles($this->db); } } - else if ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') + elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -542,7 +542,7 @@ class FormFile $modellist=ModelePDFSuppliersInvoices::liste_modeles($this->db); } } - else if ($modulepart == 'supplier_payment') + elseif ($modulepart == 'supplier_payment') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -551,7 +551,7 @@ class FormFile $modellist=ModelePDFSuppliersPayments::liste_modeles($this->db); } } - else if ($modulepart == 'remisecheque') + elseif ($modulepart == 'remisecheque') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -587,7 +587,7 @@ class FormFile $modellist=ModeleAction::liste_modeles($this->db); } } - else if ($modulepart == 'expensereport') + elseif ($modulepart == 'expensereport') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -596,7 +596,7 @@ class FormFile $modellist=ModeleExpenseReport::liste_modeles($this->db); } } - else if ($modulepart == 'unpaid') + elseif ($modulepart == 'unpaid') { $modellist=''; } @@ -1465,72 +1465,72 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $object_instance=new Societe($this->db); } - else if ($modulepart == 'invoice') + elseif ($modulepart == 'invoice') { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance=new Facture($this->db); } - else if ($modulepart == 'invoice_supplier') + elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance=new FactureFournisseur($this->db); } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance=new Propal($this->db); } - else if ($modulepart == 'supplier_proposal') + elseif ($modulepart == 'supplier_proposal') { include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; $object_instance=new SupplierProposal($this->db); } - else if ($modulepart == 'order') + elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance=new Commande($this->db); } - else if ($modulepart == 'order_supplier') + elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance=new CommandeFournisseur($this->db); } - else if ($modulepart == 'contract') + elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance=new Contrat($this->db); } - else if ($modulepart == 'product') + elseif ($modulepart == 'product') { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $object_instance=new Product($this->db); } - else if ($modulepart == 'tax') + elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance=new ChargeSociales($this->db); } - else if ($modulepart == 'project') + elseif ($modulepart == 'project') { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object_instance=new Project($this->db); } - else if ($modulepart == 'fichinter') + elseif ($modulepart == 'fichinter') { include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $object_instance=new Fichinter($this->db); } - else if ($modulepart == 'user') + elseif ($modulepart == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $object_instance=new User($this->db); } - else if ($modulepart == 'expensereport') + elseif ($modulepart == 'expensereport') { include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object_instance=new ExpenseReport($this->db); } - else if ($modulepart == 'holiday') + elseif ($modulepart == 'holiday') { include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $object_instance=new Holiday($this->db); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2cb10056cc3..4c0f4bd2953 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -614,7 +614,7 @@ class FormMail extends Form $soc->fetch($this->toid); $out.= $soc->getNomUrl(1); } - else if ($this->totype == 'contact') + elseif ($this->totype == 'contact') { $contact=new Contact($this->db); $contact->fetch($this->toid); @@ -841,7 +841,7 @@ class FormMail extends Form $out.= '
'; } } - else if (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox + elseif (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox { $out.= $langs->trans("NoAttachedFiles").'
'; } @@ -924,7 +924,7 @@ class FormMail extends Form // Deal with format differences between message and signature (text / HTML) if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']); - } else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) { + } elseif(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $defaultmessage = dol_nl2br($defaultmessage); } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index dea04047405..299de827dca 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -171,7 +171,7 @@ class FormProjets if ($socid > 0) { if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)"; - else if ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. + elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. { $sql.= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)"; } @@ -233,12 +233,12 @@ class FormProjets $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - else if ($obj->fk_statut == 2) + elseif ($obj->fk_statut == 2) { if ($discard_closed == 2) $disabled=1; $labeltoshow.=' - '.$langs->trans("Closed"); } - else if ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + elseif ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany"); @@ -416,12 +416,12 @@ class FormProjets $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - else if ($obj->fk_statut == Project::STATUS_CLOSED) + elseif ($obj->fk_statut == Project::STATUS_CLOSED) { if ($discard_closed == 2) $disabled=1; $labeltoshow.=' - '.$langs->trans("Closed"); } - else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + elseif ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany"); diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 4ef6208723d..cde7d0b61d2 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -208,7 +208,7 @@ function limitChars(textarea, limit, infodiv) dol_print_error('','Error to get list of senders: '.$e->getMessage()); } } - else if (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp=explode('@',$conf->global->MAIN_SMS_SENDMODE); $classfile=$tmp[0]; $module=(empty($tmp[1])?$tmp[0]:$tmp[1]); diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 6f43643eeb7..7a19546dfb3 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -212,7 +212,7 @@ class Interfaces $nbtotal++; $nbko++; if (! empty($objMod->errors)) $this->errors=array_merge($this->errors,$objMod->errors); - else if (! empty($objMod->error)) $this->errors[]=$objMod->error; + elseif (! empty($objMod->error)) $this->errors[]=$objMod->error; //dol_syslog("Error in trigger ".$action." - Nb of error string returned = ".count($this->errors), LOG_ERR); } } @@ -338,7 +338,7 @@ class Interfaces $module=preg_replace('/^mod/i','',$reg[2]); $constparam='MAIN_MODULE_'.strtoupper($module); if (strtolower($module) == 'all') $disabledbymodule=0; - else if (empty($conf->global->$constparam)) $disabledbymodule=2; + elseif (empty($conf->global->$constparam)) $disabledbymodule=2; $triggers[$j]['module']=strtolower($module); } diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 86b27948389..15c22116d46 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -634,7 +634,7 @@ class Menubase $tab_titre = explode("/",$menu['titre']); $title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]); } - else if (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle) + elseif (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle) { $tab_title = explode("||",$menu['titre']); $alt_title = explode("@",$tab_title[1]); diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index fd37476a26e..454d8281770 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -342,7 +342,7 @@ class RssParser else $items=$rss->items; // With xmlparse //var_dump($items);exit; } - else if ($rss->_format == 'atom') + elseif ($rss->_format == 'atom') { //var_dump($rss); if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) @@ -410,7 +410,7 @@ class RssParser } } } - else if ($rss->_format == 'atom') + elseif ($rss->_format == 'atom') { if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) { diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 1ade95098fa..780be1ba441 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1413,7 +1413,7 @@ class SMTPs die ("Sorry, no content"); // If we have ONE, we can use the simple format - else if( $keyCount === 1 && empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) + elseif( $keyCount === 1 && empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) { $_msgData = $this->_msgContent; $_msgData = $_msgData[$_types[0]]; @@ -1431,7 +1431,7 @@ class SMTPs } // If we have more than ONE, we use the multi-part format - else if( $keyCount >= 1 || ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) + elseif( $keyCount >= 1 || ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) { // Since this is an actual multi-part message // We need to define a content message Boundary @@ -1479,7 +1479,7 @@ class SMTPs } } // @CHANGE LDR - else if ( $type == 'image' ) + elseif ( $type == 'image' ) { // loop through all images foreach ( $_content as $_image => $_data ) @@ -1751,8 +1751,8 @@ class SMTPs function _getBoundary($type='mixed') { if ($type == 'mixed') return $this->_smtpsBoundary; - else if ($type == 'related') return $this->_smtpsRelatedBoundary; - else if ($type == 'alternative') return $this->_smtpsAlternativeBoundary; + elseif ($type == 'related') return $this->_smtpsRelatedBoundary; + elseif ($type == 'alternative') return $this->_smtpsAlternativeBoundary; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index a8d22b61257..2c1683fd68c 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -105,7 +105,7 @@ class Translate $longforshort=array('ar'=>'ar_SA'); $longforshortexcep=array('ar_EG'); if (isset($longforshort[strtolower($langpart[0])]) && ! in_array($codetouse, $longforshortexcep)) $srclang=$longforshort[strtolower($langpart[0])]; - else if (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser + elseif (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser $srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]); $longforlong=array('no_nb'=>'nb_NO'); if (isset($longforlong[strtolower($srclang)])) $srclang=$longforlong[strtolower($srclang)]; @@ -116,7 +116,7 @@ class Translate // Array to convert short lang code into long code. $longforshort=array('ar'=>'ar_SA', 'el'=>'el_GR', 'ca'=>'ca_ES', 'en'=>'en_US', 'nb'=>'nb_NO', 'no'=>'nb_NO'); if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])]; - else if (! empty($langpart[0])) $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]); + elseif (! empty($langpart[0])) $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]); else $srclang='en_US'; } @@ -247,7 +247,7 @@ class Translate $usecachekey=$newdomain.'_'.$langofdir.'_'.md5($file_lang); // Should not contains special chars } // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $usecachekey=$newdomain; } @@ -441,7 +441,7 @@ class Translate $usecachekey=$newdomain.'_'.$langofdir; // Should not contains special chars } // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $usecachekey=$newdomain; } diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index f9e982961c9..0f2ca55c0e8 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -832,19 +832,19 @@ class DoliDBMssql extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 185ebe1a56f..07d915f8c0d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -509,7 +509,7 @@ class DoliDBMysqli extends DoliDB { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -542,7 +542,7 @@ class DoliDBMysqli extends DoliDB { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 85abdf2b004..c5cac435b08 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -173,8 +173,8 @@ class DoliDBPgsql extends DoliDB if ($type == 'auto') { if (preg_match('/ALTER TABLE/i',$line)) $type='dml'; - else if (preg_match('/CREATE TABLE/i',$line)) $type='dml'; - else if (preg_match('/DROP TABLE/i',$line)) $type='dml'; + elseif (preg_match('/CREATE TABLE/i',$line)) $type='dml'; + elseif (preg_match('/DROP TABLE/i',$line)) $type='dml'; } $line=preg_replace('/ as signed\)/i',' as integer)',$line); @@ -973,19 +973,19 @@ class DoliDBPgsql extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index bbd5853f95f..6a4b11317e5 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -150,8 +150,8 @@ class DoliDBSqlite3 extends DoliDB if ($type == 'auto') { if (preg_match('/ALTER TABLE/i',$line)) $type='dml'; - else if (preg_match('/CREATE TABLE/i',$line)) $type='dml'; - else if (preg_match('/DROP TABLE/i',$line)) $type='dml'; + elseif (preg_match('/CREATE TABLE/i',$line)) $type='dml'; + elseif (preg_match('/DROP TABLE/i',$line)) $type='dml'; } if ($type == 'dml') @@ -742,7 +742,7 @@ class DoliDBSqlite3 extends DoliDB { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -775,7 +775,7 @@ class DoliDBSqlite3 extends DoliDB { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } @@ -915,19 +915,19 @@ class DoliDBSqlite3 extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 34e32fa5f99..e35d8d328ab 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -290,7 +290,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') @unlink($sFilePath); $sErrorNumber = '202' ; } - else if ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) + elseif ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) { @unlink($sFilePath); $sErrorNumber = '202' ; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 28845122f0d..c03cd09ff16 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -292,7 +292,7 @@ function checkBanForAccount($account) if ($country_code == 'AU') { // Australian if (strlen($account->code_banque) > 7) return false; // Sould be 6 but can be 123-456 - else if (strlen($account->code_banque) < 6) + elseif (strlen($account->code_banque) < 6) return false; // Sould be 6 else return true; diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index efd245209d2..ebd87e5bcde 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -128,7 +128,7 @@ function barcode_encode($code,$encoding) dol_syslog("barcode.lib.php::barcode_encode Use barcode_encode_ean"); $bars=barcode_encode_ean($code, $encoding); } - else if (file_exists($genbarcode_loc)) // For example C39 + elseif (file_exists($genbarcode_loc)) // For example C39 { /* use genbarcode */ dol_syslog("barcode.lib.php::barcode_encode Use genbarcode ".$genbarcode_loc." code=".$code." encoding=".$encoding); @@ -219,7 +219,7 @@ function barcode_encode_ean($ean, $encoding = "EAN-13") if ($a>0) $text.=" "; $text.="$pos:12:{$ean[$a]}"; if ($a==0) $pos+=12; - else if ($a==6) $pos+=12; + elseif ($a==6) $pos+=12; else $pos+=7; } @@ -397,12 +397,12 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, header("Content-Type: image/jpeg; name=\"barcode.jpg\""); imagejpeg($im); } - else if ($mode=='gif') + elseif ($mode=='gif') { header("Content-Type: image/gif; name=\"barcode.gif\""); imagegif($im); } - else if (! empty($filebarcode)) // To wxrite into afile onto disk + elseif (! empty($filebarcode)) // To wxrite into afile onto disk { imagepng($im,$filebarcode); } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 41b0f1af3ef..f05a8a3f58b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -459,9 +459,9 @@ function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entc else $label=($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code))?$outputlangs->transnoentitiesnoconv("Country".$obj->code):$label; } if ($withcode == 1) $result=$label?"$obj->code - $label":"$obj->code"; - else if ($withcode == 2) $result=$obj->code; - else if ($withcode == 3) $result=$obj->rowid; - else if ($withcode === 'all') $result=array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label); + elseif ($withcode == 2) $result=$obj->code; + elseif ($withcode == 3) $result=$obj->rowid; + elseif ($withcode === 'all') $result=array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label); else $result=$label; } else @@ -525,7 +525,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent return $label = $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } } - else if ($withcode == 2) { + elseif ($withcode == 2) { if ($withregion == 1) { return $label = $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } @@ -533,7 +533,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent return $label = ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } } - else if ($withcode === 'all') { + elseif ($withcode === 'all') { if ($withregion == 1) { return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label,'region_code'=>$obj->region_code,'region'=>$obj->region_name); } diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 0f84f46497e..19d3b3fb7ae 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -246,11 +246,11 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt return sprintf("%02d",($sWeek*$lengthOfWeek*24 + $sDay*24 + (int) floor($iSecond/3600))); } } - else if ($format == 'hour') // only hour part + elseif ($format == 'hour') // only hour part { $sTime=dol_print_date($iSecond,'%H',true); } - else if ($format == 'fullhour') + elseif ($format == 'fullhour') { if (!empty($iSecond)) { $iSecond=$iSecond/3600; @@ -260,19 +260,19 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt } $sTime=$iSecond; } - else if ($format == 'min') // only min part + elseif ($format == 'min') // only min part { $sTime=dol_print_date($iSecond,'%M',true); } - else if ($format == 'sec') // only sec part + elseif ($format == 'sec') // only sec part { $sTime=dol_print_date($iSecond,'%S',true); } - else if ($format == 'month') // only month part + elseif ($format == 'month') // only month part { $sTime=dol_print_date($iSecond,'%m',true); } - else if ($format == 'year') // only year part + elseif ($format == 'year') // only year part { $sTime=dol_print_date($iSecond,'%Y',true); } @@ -297,12 +297,12 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date) if ($year_date > 0 && empty($day_date)) { $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, $month_date, false)); $sqldate.= "' AND '".$db->idate(dol_get_last_day($year_date, $month_date, false))."'"; - } else if ($year_date > 0 && ! empty($day_date)) { + } elseif ($year_date > 0 && ! empty($day_date)) { $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date)); $sqldate.= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'"; } else $sqldate.= " AND date_format( ".$datefield.", '%m') = '".$db->escape($month_date)."'"; - } else if ($year_date > 0){ + } elseif ($year_date > 0){ $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false)); $sqldate.= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'"; } @@ -345,7 +345,7 @@ function dol_stringtotime($string, $gm=1) if ($syear >= 50 && $syear < 100) $syear+=2000; $string=sprintf("%04d%02d%02d%02d%02d%02d",$syear,$smonth,$sday,$shour,$smin,$ssec); } - else if ( + elseif ( preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYY-MM-DDTHH:MM:SSZ (RFC3339) || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i',$string,$reg) // Convert date with format YYYY-MM-DD HH:MM:SS || preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYYMMDDTHHMMSSZ diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index ae80d371e33..9985c537809 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -118,7 +118,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil { $excludefilterarray=array_merge($excludefilterarray,$excludefilter); } - else if ($excludefilter) $excludefilterarray[]=$excludefilter; + elseif ($excludefilter) $excludefilterarray[]=$excludefilter; // Check if file is qualified foreach($excludefilterarray as $filt) { @@ -167,7 +167,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil } } } - else if (! $isdir && (($types == "files") || ($types == "all"))) + elseif (! $isdir && (($types == "files") || ($types == "all"))) { // Add file into file_list array if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file); @@ -1608,7 +1608,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } @@ -2358,7 +2358,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for users - else if ($modulepart == 'user' && !empty($conf->user->dir_output)) + elseif ($modulepart == 'user' && !empty($conf->user->dir_output)) { $canreaduser=(! empty($fuser->admin) || $fuser->rights->user->user->{$lire}); if ($fuser->id == (int) $refname) { $canreaduser=1; } // A user can always read its own card @@ -2370,7 +2370,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for third parties - else if (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) + elseif (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i',$original_file)) @@ -2382,7 +2382,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for contact - else if ($modulepart == 'contact' && !empty($conf->societe->dir_output)) + elseif ($modulepart == 'contact' && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire}) @@ -2393,7 +2393,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for invoices - else if (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) + elseif (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2403,7 +2403,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping for mass actions - else if ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) + elseif ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2411,7 +2411,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->propal->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_orders') + elseif ($modulepart == 'massfilesarea_orders') { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2419,7 +2419,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_invoices') + elseif ($modulepart == 'massfilesarea_invoices') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2427,7 +2427,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_expensereport') + elseif ($modulepart == 'massfilesarea_expensereport') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2435,7 +2435,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->expensereport->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_interventions') + elseif ($modulepart == 'massfilesarea_interventions') { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2443,7 +2443,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) + elseif ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) { if ($fuser->rights->supplier_proposal->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2451,7 +2451,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->supplier_proposal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_order') + elseif ($modulepart == 'massfilesarea_supplier_order') { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2459,7 +2459,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_invoice') + elseif ($modulepart == 'massfilesarea_supplier_invoice') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2467,7 +2467,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->fournisseur->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) + elseif ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2477,7 +2477,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for interventions - else if (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) + elseif (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2488,7 +2488,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les deplacements et notes de frais - else if ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) + elseif ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) { if ($fuser->rights->deplacement->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2498,7 +2498,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les propales - else if (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) + elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2509,7 +2509,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes - else if (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) + elseif (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2520,7 +2520,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les projets - else if ($modulepart == 'project' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2529,7 +2529,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$conf->projet->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('project').")"; } - else if ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2540,7 +2540,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes fournisseurs - else if (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) + elseif (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2551,7 +2551,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les factures fournisseurs - else if (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) + elseif (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2561,7 +2561,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE facnumber='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les rapport de paiements - else if ($modulepart == 'supplier_payment') + elseif ($modulepart == 'supplier_payment') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2572,7 +2572,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les rapport de paiements - else if ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) + elseif ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2583,7 +2583,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for accounting exports - else if ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) + elseif ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) { if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file)) { @@ -2593,7 +2593,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les expedition - else if ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2602,7 +2602,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$conf->expedition->dir_output."/sending/".$original_file; } // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2612,7 +2612,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) + elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2622,7 +2622,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) + elseif ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) { if ($fuser->rights->agenda->allactions->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2632,7 +2632,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les produits et services - else if ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') + elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') { if (empty($entity) || (empty($conf->product->multidir_output[$entity]) && empty($conf->service->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if (($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) || preg_match('/^specimen/i',$original_file)) @@ -2644,7 +2644,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les lots produits - else if ($modulepart == 'product_batch' || $modulepart == 'produitlot') + elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') { if (empty($entity) || (empty($conf->productbatch->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if (($fuser->rights->produit->{$lire} ) || preg_match('/^specimen/i',$original_file)) @@ -2655,7 +2655,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les contrats - else if ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) + elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2666,7 +2666,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'donation' && !empty($conf->don->dir_output)) + elseif ($modulepart == 'donation' && !empty($conf->don->dir_output)) { if ($fuser->rights->don->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2676,7 +2676,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) + elseif ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) { if ($fuser->rights->resource->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2686,7 +2686,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les remises de cheques - else if ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output)) + elseif ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output)) { if ($fuser->rights->banque->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2697,7 +2697,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for bank - else if ($modulepart == 'bank' && !empty($conf->bank->dir_output)) + elseif ($modulepart == 'bank' && !empty($conf->bank->dir_output)) { if ($fuser->rights->banque->{$lire}) { @@ -2707,7 +2707,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for export module - else if ($modulepart == 'export' && !empty($conf->export->dir_temp)) + elseif ($modulepart == 'export' && !empty($conf->export->dir_temp)) { // Aucun test necessaire car on force le rep de download sur // le rep export qui est propre a l'utilisateur @@ -2716,35 +2716,35 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for import module - else if ($modulepart == 'import' && !empty($conf->import->dir_temp)) + elseif ($modulepart == 'import' && !empty($conf->import->dir_temp)) { $accessallowed=1; $original_file=$conf->import->dir_temp.'/'.$original_file; } // Wrapping pour l'editeur wysiwyg - else if ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) + elseif ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) { $accessallowed=1; $original_file=$conf->fckeditor->dir_output.'/'.$original_file; } // Wrapping for backups - else if ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) + elseif ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_output.'/'.$original_file; } // Wrapping for upload file test - else if ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) + elseif ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_temp.'/'.$original_file; } // Wrapping pour BitTorrent - else if ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) + elseif ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) { $accessallowed=1; $dir='files'; @@ -2753,7 +2753,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour Foundation module - else if ($modulepart == 'member' && !empty($conf->adherent->dir_output)) + elseif ($modulepart == 'member' && !empty($conf->adherent->dir_output)) { if ($fuser->rights->adherent->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2763,7 +2763,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for Scanner - else if ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) + elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) { $accessallowed=1; $original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; @@ -2790,7 +2790,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) { if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported { @@ -2800,7 +2800,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { @@ -2810,7 +2810,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file; } - else if (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) + elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 690a3ff5152..a68e83f09cd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -496,7 +496,7 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals if (preg_match('/"/',$out)) $out=''; - else if (preg_match('/\.\.\//',$out)) $out=''; + elseif (preg_match('/\.\.\//',$out)) $out=''; } break; case 'san_alpha': @@ -536,7 +536,7 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals if (preg_match('/"/',$out)) $out=''; - else if (preg_match('/\.\.\//',$out)) $out=''; + elseif (preg_match('/\.\.\//',$out)) $out=''; $out=dol_string_nohtmltag($out); } break; @@ -590,7 +590,7 @@ if (! function_exists('dol_getprefix')) if (! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID)) // If MAIL_PREFIX_FOR_EMAIL_ID is set (a value initialized with a random value is recommended) { if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID; - else if (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; + elseif (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; } return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT, '3'); } @@ -911,9 +911,9 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) //$substitjs[''.$_SERVER['REMOTE_ADDR']); // This is when server run normally on a server - else if (! empty($_SERVER["REMOTE_ADDR"])) $data['ip'] = $_SERVER['REMOTE_ADDR']; + elseif (! empty($_SERVER["REMOTE_ADDR"])) $data['ip'] = $_SERVER['REMOTE_ADDR']; // This is when PHP session is ran inside a web server but not inside a client request (example: init code of apache) - else if (! empty($_SERVER['SERVER_ADDR'])) $data['ip'] = $_SERVER['SERVER_ADDR']; + elseif (! empty($_SERVER['SERVER_ADDR'])) $data['ip'] = $_SERVER['SERVER_ADDR']; // This is when PHP session is ran outside a web server, like from Windows command line (Not always defined, but useful if OS defined it). - else if (! empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME'])?'':'@'.$_SERVER['USERNAME']); + elseif (! empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME'])?'':'@'.$_SERVER['USERNAME']); // This is when PHP session is ran outside a web server, like from Linux command line (Not always defined, but usefull if OS defined it). - else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME']; + elseif (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME']; // Loop on each log handler and send output foreach ($conf->loghandlers as $loghandlerinstance) { @@ -1162,7 +1162,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi $out.=''.$links[$i][1].''."\n"; } } - else if (! empty($links[$i][1])) + elseif (! empty($links[$i][1])) { //print "x $i $active ".$links[$i][2]." z"; if ($isactive) @@ -1196,7 +1196,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi else $outmore.=''.$links[$i][1].''."\n"; } - else if (! empty($links[$i][1])) + elseif (! empty($links[$i][1])) { $outmore.=''; $outmore.=preg_replace('/([a-z])\/([a-z])/i', '\\1 / \\2', $links[$i][1]); // Replace x/y with x / y to allow wrap on long composed texts. @@ -1425,7 +1425,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } } } - else if (! $phototoshow) + elseif (! $phototoshow) { $phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos); } @@ -1627,7 +1627,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', } if ($object->zip) $ret .= ($ret?", ":'').$object->zip; } - else if (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country + elseif (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country { $ret .= ($ret ? $sep : '' ).$object->town; if ($object->state) @@ -1636,7 +1636,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', } if ($object->zip) $ret .= ($ret ? $sep : '' ).$object->zip; } - else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country + elseif (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country { $ret .= ($ret ? $sep : '' ).$object->zip; $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); @@ -1645,7 +1645,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', $ret.="\n".$object->state; } } - else if (in_array($object->country_code,array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country + elseif (in_array($object->country_code,array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country { $ret .= ($ret ? $sep : '' ).$object->zip; $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); @@ -1746,22 +1746,22 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. // TODO Add format daysmallyear and dayhoursmallyear if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); - else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); - else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); - else if ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text); - else if ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short); - else if ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short); - else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); - else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); - else if ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short); + elseif ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); + elseif ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); + elseif ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text); + elseif ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short); + elseif ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short); + elseif ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); + elseif ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); + elseif ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short); // Format not sensitive to language - else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; - else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; - else if ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ'; - else if ($format == 'dayxcard') $format='%Y%m%d'; - else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 - else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 - else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S'; + elseif ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; + elseif ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; + elseif ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ'; + elseif ($format == 'dayxcard') $format='%Y%m%d'; + elseif ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 + elseif ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 + elseif ($format == 'standard') $format='%Y-%m-%d %H:%M:%S'; if ($reduceformat) { @@ -1953,7 +1953,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) $default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin' $localtz = new DateTimeZone($default_timezone); } - else if ($gm === 'user') + elseif ($gm === 'user') { // We use dol_tz_string first because it is more reliable. $default_timezone=(empty($_SESSION["dol_tz_string"])?@date_default_timezone_get():$_SESSION["dol_tz_string"]); // Example 'Europe/Berlin' @@ -1966,7 +1966,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) $default_timezone=@date_default_timezone_get(); } } - else if (strrpos($gm, "tz,") !== false) + elseif (strrpos($gm, "tz,") !== false) { $timezone=str_replace("tz,", "", $gm); // Example 'tz,Europe/Berlin' try @@ -2015,7 +2015,7 @@ function dol_now($mode='gmt') // Note that gmmktime and mktime return same value (GMT) when used without parameters //if ($mode == 'gmt') $ret=gmmktime(); // Strict Standards: gmmktime(): You should be using the time() function instead if ($mode == 'gmt') $ret=time(); // Time for now at greenwich. - else if ($mode == 'tzserver') // Time for now with PHP server timezone added + elseif ($mode == 'tzserver') // Time for now with PHP server timezone added { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $tzsecond=getServerTimeZoneInt('now'); // Contains tz+dayling saving time @@ -2027,7 +2027,7 @@ function dol_now($mode='gmt') $tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time $ret=dol_now('gmt')+($tzsecond*3600); }*/ - else if ($mode == 'tzuser') // Time for now with user timezone added + elseif ($mode == 'tzuser') // Time for now with user timezone added { //print 'time: '.time().'-'.mktime().'-'.gmmktime(); $offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60; @@ -2527,7 +2527,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep $newphone =''; } - else if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url + elseif (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url { if (empty($user->clicktodial_loaded)) $user->fetch_clicktodial(); @@ -3101,10 +3101,10 @@ function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $sr if (! empty($conf->global->MAIN_OVERWRITE_THEME_PATH)) { $path = $conf->global->MAIN_OVERWRITE_THEME_PATH.'/theme/'.$theme; // If the theme does not have the same name as the module } - else if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { + elseif (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path = $conf->global->MAIN_OVERWRITE_THEME_RES.'/theme/'.$conf->global->MAIN_OVERWRITE_THEME_RES; // To allow an external module to overwrite image resources whatever is activated theme } - else if (! empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { + elseif (! empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { $path = $theme.'/theme/'.$theme; // If the theme have the same name as the module } @@ -4137,7 +4137,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so { $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>1'; if ($cpt > 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>dol_use_jmobile != 4)?'class="inactive"':'').'>...'; - else if ($cpt == 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>2'; + elseif ($cpt == 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>2'; } do @@ -4157,7 +4157,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so if ($cpt<$nbpages) { if ($cpt<$nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>dol_use_jmobile != 4)?'class="inactive"':'').'>...'; - else if ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.($nbpages - 1).''; + elseif ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.($nbpages - 1).''; $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.$nbpages.''; } } @@ -4341,7 +4341,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou if ($outlangs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->transnoentitiesnoconv("SeparatorDecimal"); if ($outlangs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->transnoentitiesnoconv("SeparatorThousand"); if ($thousand == 'None') $thousand=''; - else if ($thousand == 'Space') $thousand=' '; + elseif ($thousand == 'Space') $thousand=' '; //print "outlangs=".$outlangs->defaultlang." amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'
"; //print "amount=".$amount."-"; @@ -6294,7 +6294,7 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) if ($firstname && $lastname) $ret.=' '; $ret.=$lastname; } - else if ($nameorder == 2 || $nameorder == 3) + elseif ($nameorder == 2 || $nameorder == 3) { $ret.=$firstname; if (empty($ret) && $nameorder == 3) @@ -6518,8 +6518,8 @@ function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok if ($val && preg_match('/class="warning"/i',$val)) { $iswarning++; break; } } } - else if ($mesgstring && preg_match('/class="error"/i',$mesgstring)) $iserror++; - else if ($mesgstring && preg_match('/class="warning"/i',$mesgstring)) $iswarning++; + elseif ($mesgstring && preg_match('/class="error"/i',$mesgstring)) $iserror++; + elseif ($mesgstring && preg_match('/class="warning"/i',$mesgstring)) $iswarning++; if ($style=='error') $iserror++; if ($style=='warning') $iswarning++; @@ -7082,7 +7082,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= $h++; } } - else if (count($values) == 5) // deprecated + elseif (count($values) == 5) // deprecated { dol_syslog('Passing 5 values in tabs module_parts is deprecated. Please update to 6 with permissions.', LOG_WARNING); @@ -7102,7 +7102,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= $h++; } } - else if ($mode == 'remove' && preg_match('/^\-/',$values[1])) + elseif ($mode == 'remove' && preg_match('/^\-/',$values[1])) { if ($values[0] != $type) continue; $tabname=str_replace('-','',$values[1]); @@ -7459,12 +7459,12 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) $i2++; // a criteria was added to string } } - else if ($mode == 2) + elseif ($mode == 2) { $newres .= ($i2 > 0 ? ' OR ' : '') . $field . " IN (" . $db->escape(trim($crit)) . ")"; $i2++; // a criteria was added to string } - else if ($mode == 3) + elseif ($mode == 3) { $tmparray=explode(',',trim($crit)); if (count($tmparray)) @@ -7482,7 +7482,7 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) $i2++; // a criteria was added to string } } - else if ($mode == 4) + elseif ($mode == 4) { $tmparray=explode(',',trim($crit)); if (count($tmparray)) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aae70adfb62..d94477579dc 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -717,7 +717,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m global $conf,$user; if (! is_object($objsoc)) $valueforccc=$objsoc; - else if ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur; + elseif ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur; else $valueforccc=$objsoc->code_client; $sharetable = $table; @@ -859,7 +859,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m //print "yearoffset=".$yearoffset." yearoffsettype=".$yearoffsettype; if (is_numeric($yearoffsettype) && $yearoffsettype >= 1) $maskraz=$yearoffsettype; // For backward compatibility - else if ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) + elseif ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) $maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START; //print "maskraz=".$maskraz; // -1=no reset @@ -882,8 +882,8 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m else // if reset is for a specific month in year, we need year { if (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; } - else if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; } - else if (preg_match('/^(.*)\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=0; } + elseif (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; } + elseif (preg_match('/^(.*)\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=0; } else return 'ErrorCantUseRazIfNoYearInMask'; } // Define length @@ -917,10 +917,10 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($date < $nextnewyeardate && $yearoffsettype == '+') $yearoffset=1; } // If after or equal of current new year date - else if ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset=-1; + elseif ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset=-1; } // For backward compatibility - else if (date("m",$date) < $maskraz && empty($resetEveryMonth)) { $yearoffset=-1; } // If current month lower that month of return to zero, year is previous year + elseif (date("m",$date) < $maskraz && empty($resetEveryMonth)) { $yearoffset=-1; } // If current month lower that month of return to zero, year is previous year if ($yearlen == 4) $yearcomp=sprintf("%04d",date("Y",$date)+$yearoffset); elseif ($yearlen == 2) $yearcomp=sprintf("%02d",date("y",$date)+$yearoffset); @@ -938,7 +938,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sqlwhere.=" AND SUBSTRING(".$field.", ".$monthpos.", ".$monthlen.") < '".str_pad($monthcomp, $monthlen, '0', STR_PAD_LEFT)."') "; $sqlwhere.=')'; } - else if ($resetEveryMonth) + elseif ($resetEveryMonth) { $sqlwhere.="(SUBSTRING(".$field.", ".$yearpos.", ".$yearlen.") = '".$yearcomp."'"; $sqlwhere.=" AND SUBSTRING(".$field.", ".$monthpos.", ".$monthlen.") = '".str_pad($monthcomp, $monthlen, '0', STR_PAD_LEFT)."')"; @@ -989,7 +989,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sql.= " AND ".$field." NOT LIKE '(PROV%)'"; if ($bentityon) // only if entity enable $sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $sql.=$where; if ($sqlwhere) $sql.=' AND '.$sqlwhere; @@ -1006,12 +1006,12 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m // Check if we must force counter to maskoffset if (empty($counter)) $counter=$maskoffset; - else if (preg_match('/[^0-9]/i',$counter)) + elseif (preg_match('/[^0-9]/i',$counter)) { $counter=0; dol_syslog("Error, the last counter found is '".$counter."' so is not a numeric value. We will restart to 1.", LOG_ERR); } - else if ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) $counter=$maskoffset; + elseif ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) $counter=$maskoffset; if ($mode == 'last') // We found value for counter = last counter value. Now need to get corresponding ref of invoice. { @@ -1038,7 +1038,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sql.= " AND ".$field." NOT LIKE '%PROV%'"; if ($bentityon) // only if entity enable $sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $sql.=$where; if ($sqlwhere) $sql.=' AND '.$sqlwhere; @@ -1054,7 +1054,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $numFinal=$ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $counter++; @@ -1094,7 +1094,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $maskrefclient_sql.= " WHERE ".$field." LIKE '".$maskrefclient_maskLike."'"; if ($bentityon) // only if entity enable $maskrefclient_sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $maskrefclient_sql.=$where; //use the same optional where as general mask if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask @@ -1357,9 +1357,9 @@ function numero_semaine($time) // Definition du Jeudi de la semaine if (date("w",mktime(12,0,0,$mois,$jour,$annee))==0) // Dimanche $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)-3*24*60*60; - else if (date("w",mktime(12,0,0,$mois,$jour,$annee))<4) // du Lundi au Mercredi + elseif (date("w",mktime(12,0,0,$mois,$jour,$annee))<4) // du Lundi au Mercredi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)+(4-date("w",mktime(12,0,0,$mois,$jour,$annee)))*24*60*60; - else if (date("w",mktime(12,0,0,$mois,$jour,$annee))>4) // du Vendredi au Samedi + elseif (date("w",mktime(12,0,0,$mois,$jour,$annee))>4) // du Vendredi au Samedi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)-(date("w",mktime(12,0,0,$mois,$jour,$annee))-4)*24*60*60; else // Jeudi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee); @@ -1369,11 +1369,11 @@ function numero_semaine($time) { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+4*24*60*60; } - else if (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))<4) // du Lundi au Mercredi + elseif (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))<4) // du Lundi au Mercredi { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+(4-date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine))))*24*60*60; } - else if (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))>4) // du Vendredi au Samedi + elseif (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))>4) // du Vendredi au Samedi { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+(7-(date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))-4))*24*60*60; } diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 418cc1418b5..cbbfaaf89ef 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -78,7 +78,7 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea curl_setopt($ch, CURLOPT_POST, 1); // POST curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // Setting param x=a&y=z as POST fields } - else if ($postorget == 'PUT') + elseif ($postorget == 'PUT') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' if (! is_array($param)) parse_str($param, $array_param); @@ -89,17 +89,17 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea } curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($array_param)); // Setting param x=a&y=z as PUT fields } - else if ($postorget == 'PUTALREADYFORMATED') + elseif ($postorget == 'PUTALREADYFORMATED') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // param = content of post, like a xml string } - else if ($postorget == 'HEAD') + elseif ($postorget == 'HEAD') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD' curl_setopt($ch, CURLOPT_NOBODY, true); } - else if ($postorget == 'DELETE') + elseif ($postorget == 'DELETE') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); // POST } diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 9f2e55153d0..d54bdd6ac0f 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -113,11 +113,11 @@ function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) { print ''.$butlabel.''; } - else if (empty($conf->global->LDAP_SERVER_HOST)) + elseif (empty($conf->global->LDAP_SERVER_HOST)) { print ''.$butlabel.''; } - else if (empty($key) || empty($dn) || empty($objectclass)) + elseif (empty($key) || empty($dn) || empty($objectclass)) { $langs->load("errors"); print ''.$butlabel.''; @@ -172,7 +172,7 @@ function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) } show_ldap_content($val,$level+1,$count,$var,$hide,$val["count"]); } - else if ($subcount) + elseif ($subcount) { $subcount--; $newstring=dol_htmlentitiesbr($val); diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 69c127f915c..ca21ed606f3 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -69,7 +69,7 @@ function dol_setcache($memoryid,$data) return -$rescode; } } - else if (! empty($conf->memcached->enabled) && class_exists('Memcache')) + elseif (! empty($conf->memcached->enabled) && class_exists('Memcache')) { global $dolmemcache; if (empty($dolmemcache) || ! is_object($dolmemcache)) @@ -93,7 +93,7 @@ function dol_setcache($memoryid,$data) } } // Using shmop - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $result=dol_setshmop($memoryid,$data); } @@ -139,7 +139,7 @@ function dol_getcache($memoryid) return -$rescode; } } - else if (! empty($conf->memcached->enabled) && class_exists('Memcache')) + elseif (! empty($conf->memcached->enabled) && class_exists('Memcache')) { global $m; if (empty($m) || ! is_object($m)) @@ -165,7 +165,7 @@ function dol_getcache($memoryid) } } // Using shmop - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $data=dol_getshmop($memoryid); return $data; diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 4981e0fffd0..34cccd6bb91 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -263,8 +263,8 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', $type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php' if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database - else if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database - else if ($type == 'link' || $type == 'sellist') $type = 'integer'; + elseif ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database + elseif ($type == 'link' || $type == 'sellist') $type = 'integer'; $texttoinsert.= "\t".$key." ".$type; if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY'; if ($key == 'entity') $texttoinsert.= ' DEFAULT 1'; @@ -273,7 +273,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', if ($val['default'] != '') { if (preg_match('/^null$/i', $val['default'])) $texttoinsert.= " DEFAULT NULL"; - else if (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; + elseif (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; else $texttoinsert.= (($val['default'] > 0)?' DEFAULT '.$val['default']:''); } } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 056796032d4..f2e82bb066a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -461,7 +461,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) { $stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code)); } - else if (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { + elseif (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { $stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); } @@ -820,7 +820,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default $cur+=1; } - else if (! $usedetailedbban) $cury+=1; + elseif (! $usedetailedbban) $cury+=1; // Use correct name of bank id according to country $ibankey = FormBank::getIBANLabel($account); @@ -2030,7 +2030,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) { $total += $object->lines[$i]->qty; } - else if ($type==9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line))) + elseif ($type==9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line))) { $special_code = $object->lines[$i]->special_code; if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); @@ -2039,11 +2039,11 @@ function pdf_getTotalQty($object,$type,$outputlangs) $reshook = $hookmanager->executeHooks('pdf_getTotalQty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks return $hookmanager->resPrint; } - else if ($type==0 && $object->lines[$i]->product_type == 0) + elseif ($type==0 && $object->lines[$i]->product_type == 0) { $total += $object->lines[$i]->qty; } - else if ($type==1 && $object->lines[$i]->product_type == 1) + elseif ($type==1 && $object->lines[$i]->product_type == 1) { $total += $object->lines[$i]->qty; } @@ -2087,7 +2087,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date,'day','',$outputlangs); } } - else if ($objecttype == 'commande' || $objecttype == 'supplier_order') + elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') { $outputlangs->load('orders'); foreach($objects as $elementobject) @@ -2098,7 +2098,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date,'day','',$outputlangs); } } - else if ($objecttype == 'contrat') + elseif ($objecttype == 'contrat') { $outputlangs->load('contracts'); foreach($objects as $elementobject) @@ -2109,7 +2109,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date_contrat,'day','',$outputlangs); } } - else if ($objecttype == 'shipping') + elseif ($objecttype == 'shipping') { $outputlangs->loadLangs(array("orders", "sendings")); diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 68e78a29d76..0e702e89e39 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -484,7 +484,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("WeightUnitounce"); $measuring_units[99] = $langs->transnoentitiesnoconv("WeightUnitpound"); } - else if ($measuring_style == 'size') + elseif ($measuring_style == 'size') { $measuring_units[0] = $langs->transnoentitiesnoconv("SizeUnitm"); $measuring_units[-1] = $langs->transnoentitiesnoconv("SizeUnitdm"); @@ -493,7 +493,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("SizeUnitfoot"); $measuring_units[99] = $langs->transnoentitiesnoconv("SizeUnitinch"); } - else if ($measuring_style == 'surface') + elseif ($measuring_style == 'surface') { $measuring_units[0] = $langs->transnoentitiesnoconv("SurfaceUnitm2"); $measuring_units[-2] = $langs->transnoentitiesnoconv("SurfaceUnitdm2"); @@ -502,7 +502,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("SurfaceUnitfoot2"); $measuring_units[99] = $langs->transnoentitiesnoconv("SurfaceUnitinch2"); } - else if ($measuring_style == 'volume') + elseif ($measuring_style == 'volume') { $measuring_units[0] = $langs->transnoentitiesnoconv("VolumeUnitm3"); $measuring_units[-3] = $langs->transnoentitiesnoconv("VolumeUnitdm3"); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 8b6ca6a5ca3..837c8bc2cca 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1105,7 +1105,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr // Warning print '
'; } - else if ($don->modepaymentcode=='LIQ'){ + elseif ($don->modepaymentcode=='LIQ'){ $ModePaiement = ''; } - else if ($don->modepaymentcode=='VIR' || $don->modepaymentcode=='PRE' || $don->modepaymentcode=='CB'){ + elseif ($don->modepaymentcode=='VIR' || $don->modepaymentcode=='PRE' || $don->modepaymentcode=='CB'){ $ModePaiement = ''; } else @@ -316,11 +316,11 @@ class html_cerfafr extends ModeleDon $secon[$i]=''; $prim[$i]=$chif[$unite[$i]]; } - else if($dix[$i]==1){ + elseif($dix[$i]==1){ $secon[$i]=''; $prim[$i]=$chif[($unite[$i]+10)]; } - else if($dix[$i]==2){ + elseif($dix[$i]==2){ if($unite[$i]==1){ $secon[$i]='vingt et'; $prim[$i]=$chif[$unite[$i]]; @@ -330,7 +330,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==3){ + elseif($dix[$i]==3){ if($unite[$i]==1){ $secon[$i]='trente et'; $prim[$i]=$chif[$unite[$i]]; @@ -340,7 +340,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==4){ + elseif($dix[$i]==4){ if($unite[$i]==1){ $secon[$i]='quarante et'; $prim[$i]=$chif[$unite[$i]]; @@ -350,7 +350,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==5){ + elseif($dix[$i]==5){ if($unite[$i]==1){ $secon[$i]='cinquante et'; $prim[$i]=$chif[$unite[$i]]; @@ -360,7 +360,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==6){ + elseif($dix[$i]==6){ if($unite[$i]==1){ $secon[$i]='soixante et'; $prim[$i]=$chif[$unite[$i]]; @@ -370,7 +370,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==7){ + elseif($dix[$i]==7){ if($unite[$i]==1){ $secon[$i]='soixante et'; $prim[$i]=$chif[$unite[$i]+10]; @@ -380,7 +380,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]+10]; } } - else if($dix[$i]==8){ + elseif($dix[$i]==8){ if($unite[$i]==1){ $secon[$i]='quatre-vingts et'; $prim[$i]=$chif[$unite[$i]]; @@ -390,7 +390,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==9){ + elseif($dix[$i]==9){ if($unite[$i]==1){ $secon[$i]='quatre-vingts et'; $prim[$i]=$chif[$unite[$i]+10]; @@ -401,25 +401,25 @@ class html_cerfafr extends ModeleDon } } if($cent[$i]==1) $trio[$i]='cent'; - else if($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents'; + elseif($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents'; } $chif2=array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix'); $secon_c=$chif2[$dix_c]; if($cent_c==1) $trio_c='cent'; - else if($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents'; + elseif($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents'; if(($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1)) $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' million '; - else if(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!='')) + elseif(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!='')) $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' millions '; else $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]; if(($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1)) $somme = $somme.' mille '; - else if(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!='')) + elseif(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!='')) $somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]. ' milles '; else $somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]; diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 9851e1781e2..99980e081fe 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -780,7 +780,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->MultiCell(96,4,$outputlangs->transnoentities("DATE_REFUS")." : ".dol_print_date($object->date_refuse,"day",false,$outputlangs),0,'L'); } } - else if($object->fk_statut==4) + elseif($object->fk_statut==4) { if ($object->fk_user_cancel > 0) { $userfee=new User($this->db); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ab2ffb3bd2a..ee0e2adfb4c 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -572,7 +572,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R'); } - else if($conf->global->PRODUCT_USE_UNITS) + elseif($conf->global->PRODUCT_USE_UNITS) { $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); } @@ -590,7 +590,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxunit-$this->posxprogress-1, 3, $progress, 0, 'R'); } - else if ($this->atleastonediscount) + elseif ($this->atleastonediscount) { $pdf->MultiCell($this->posxdiscount-$this->posxprogress-1, 3, $progress, 0, 'R'); } @@ -1486,7 +1486,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxprogress-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } - else if($conf->global->PRODUCT_USE_UNITS) + elseif($conf->global->PRODUCT_USE_UNITS) { $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } @@ -1507,7 +1507,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); } - else if ($this->atleastonediscount) + elseif ($this->atleastonediscount) { $pdf->MultiCell($this->posxdiscount-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); } diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 7057fda20ee..eaab6d1b40e 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -155,8 +155,8 @@ class mod_facture_mars extends ModeleNumRefFactures $prefix=$this->prefixinvoice; if ($invoice->type == 1) $prefix=$this->prefixreplacement; - else if ($invoice->type == 2) $prefix=$this->prefixcreditnote; - else if ($invoice->type == 3) $prefix=$this->prefixdeposit; + elseif ($invoice->type == 2) $prefix=$this->prefixcreditnote; + elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max @@ -201,7 +201,7 @@ class mod_facture_mars extends ModeleNumRefFactures return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index c454b200004..5b5e01a7c71 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -151,8 +151,8 @@ class mod_facture_mercure extends ModeleNumRefFactures $mask=$conf->global->FACTURE_MERCURE_MASK_INVOICE; } } - else if (is_object($invoice) && $invoice->type == 2) $mask=$conf->global->FACTURE_MERCURE_MASK_CREDIT; - else if (is_object($invoice) && $invoice->type == 3) $mask=$conf->global->FACTURE_MERCURE_MASK_DEPOSIT; + elseif (is_object($invoice) && $invoice->type == 2) $mask=$conf->global->FACTURE_MERCURE_MASK_CREDIT; + elseif (is_object($invoice) && $invoice->type == 3) $mask=$conf->global->FACTURE_MERCURE_MASK_DEPOSIT; else $mask=$conf->global->FACTURE_MERCURE_MASK_INVOICE; if (! $mask) { diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 454a1588f27..a8e2a2c15bc 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -172,7 +172,7 @@ class mod_facture_terre extends ModeleNumRefFactures global $db; if ($invoice->type == 2) $prefix=$this->prefixcreditnote; - else if ($invoice->type == 3) $prefix=$this->prefixdeposit; + elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max $posindice=8; @@ -216,7 +216,7 @@ class mod_facture_terre extends ModeleNumRefFactures return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 6db495e9f04..19b11fd1d83 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -458,7 +458,7 @@ class ImportCsv extends ModeleImports else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,'code',$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else if (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); else $this->errors[$error]['lib']='ErrorFieldValueNotIn'; $this->errors[$error]['type']='FOREIGNKEY'; $errorforthistable++; @@ -577,7 +577,7 @@ class ImportCsv extends ModeleImports } } // If test is just a static regex - else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) + elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) { //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
"; $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); @@ -664,7 +664,7 @@ class ImportCsv extends ModeleImports if($resql->num_rows == 1) { $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; - } else if($resql->num_rows > 1) { + } elseif($resql->num_rows > 1) { $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); $this->errors[$error]['type']='SQL'; $error++; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d96dc18104f..fe8808e95ac 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -485,7 +485,7 @@ class ImportXlsx extends ModeleImports else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,'code',$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else if (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); else $this->errors[$error]['lib']='ErrorFieldValueNotIn'; $this->errors[$error]['type']='FOREIGNKEY'; $errorforthistable++; @@ -604,7 +604,7 @@ class ImportXlsx extends ModeleImports } } // If test is just a static regex - else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) + elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) { //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
"; $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); @@ -686,7 +686,7 @@ class ImportXlsx extends ModeleImports if($resql->num_rows == 1) { $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; - } else if($resql->num_rows > 1) { + } elseif($resql->num_rows > 1) { $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); $this->errors[$error]['type']='SQL'; $error++; diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index a4caef12af8..bd05f90198b 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -206,7 +206,7 @@ class mailing_xinputfile extends MailingTargets { $this->error = '
'.$langs->trans("ErrorFileNotUploaded").'
'; } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { $this->error = '
'.$langs->trans("ErrorFileIsInfectedWithAVirus").'
'; } diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 524d1446427..5a9da91e9c5 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -165,26 +165,26 @@ class pdf_standard extends CommonStickerGenerator { // Output left area if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // + elseif ($textleft!='' && $textright!='') // { if ($textleft == '__LOGO__' || $textleft == '__PHOTO__') { if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } - else if ($textright == '__LOGO__' || $textright == '__PHOTO__') + elseif ($textright == '__LOGO__' || $textright == '__PHOTO__') { if ($textright == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } @@ -200,7 +200,7 @@ class pdf_standard extends CommonStickerGenerator { // Output right area if ($textright == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 0047dda7669..28ed3f344a6 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -152,26 +152,26 @@ class pdf_standardlabel extends CommonStickerGenerator { // Output left area if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // + elseif ($textleft!='' && $textright!='') // { if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') { if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } - else if ($textright == '%LOGO%' || $textright == '%PHOTO%') + elseif ($textright == '%LOGO%' || $textright == '%PHOTO%') { if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } @@ -187,7 +187,7 @@ class pdf_standardlabel extends CommonStickerGenerator { // Output right area if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index de1aa1b5d5e..5826a1f2a49 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -163,7 +163,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator { // Output left area if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse, $heighttouse); } @@ -173,29 +173,29 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // left and right part + elseif ($textleft!='' && $textright!='') // left and right part { if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%') ) // left part logo/barcode right part text { if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, 0); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, $heighttouse); } $pdf->SetXY($_PosX+($widthtouse/2), $_PosY+$ytop); $pdf->MultiCell($widthtouse/2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } - else if (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text + elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text { if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, 0); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, $heighttouse); } $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($widthtouse/2, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } - else if ($textleft == '%LOGO%') // left part logo right part text/barcode + elseif ($textleft == '%LOGO%') // left part logo right part text/barcode { if ($logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight); if ($code && !empty($encoding)) @@ -206,7 +206,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->MultiCell($widthtouse-$logoWidth1-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } } - else if ($textright == '%LOGO%') // right part logo left part text/barcode + elseif ($textright == '%LOGO%') // right part logo left part text/barcode { if ($logo) $pdf->Image($logo, $_PosX+$xleft+$widthtouse-$logoWidth+1, $_PosY+$ytop, 0, $logoHeight); if ($code && !empty($encoding)) @@ -229,7 +229,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator { // Output right area if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, 0, $logoHeight); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse); } diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 1b455743cb2..c1577efc837 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -189,7 +189,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $mask = ''; if ($type == 0 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)) $mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; - else if ($type == 1 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) + elseif ($type == 1 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) $mask = $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; if (empty($mask)) @@ -204,7 +204,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $field = 'ref'; //$where = ' AND client in (1,2)'; } - else if ($type == 1) + elseif ($type == 1) { $field = 'ref'; //$where = ' AND fournisseur = 1'; @@ -267,7 +267,7 @@ class mod_codeproduct_elephant extends ModeleProductCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 815e383d900..46cffd7aef6 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -131,7 +131,7 @@ class mod_codeproduct_leopard extends ModeleProductCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index e0d6a186879..b551b5c8476 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -222,7 +222,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $field = 'code_client'; //$where = ' AND client in (1,2)'; } - else if ($type == 1) + elseif ($type == 1) { $field = 'code_fournisseur'; //$where = ' AND fournisseur = 1'; @@ -285,7 +285,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 9bdd27d5bee..89be9bdb05d 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -130,7 +130,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 77bb7c54a64..c0ace6f074a 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -188,7 +188,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index b117c948d69..8af95273d40 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -147,7 +147,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $codetouse=(! empty($societe->code_client)?$societe->code_client:'CUSTCODE'); $prefix = $this->prefixcustomeraccountancycode; } - else if ($type == 'supplier') + elseif ($type == 'supplier') { $codetouse=(! empty($societe->code_fournisseur)?$societe->code_fournisseur:'SUPPCODE'); $prefix = $this->prefixsupplieraccountancycode; @@ -200,11 +200,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode { $sql = "SELECT "; if ($type == 'customer') $sql.= "code_compta"; - else if ($type == 'supplier') $sql.= "code_compta_fournisseur"; + elseif ($type == 'supplier') $sql.= "code_compta_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE "; if ($type == 'customer') $sql.= "code_compta"; - else if ($type == 'supplier') $sql.= "code_compta_fournisseur"; + elseif ($type == 'supplier') $sql.= "code_compta_fournisseur"; $sql.= " = '".$db->escape($code)."'"; if (! empty($societe->id)) $sql.= " AND rowid <> ".$societe->id; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 3ea7e184e35..f55ecc18bb3 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -287,7 +287,7 @@ class pdf_stdmovement extends ModelePDFMovement else $sql.= " AND date_format(m.datem, '%m') = '$month'"; } - else if ($year > 0) + elseif ($year > 0) { $sql.= " AND m.datem BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 908b3c8ba41..389b845d0a2 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -175,7 +175,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices global $db,$conf; if ($object->type == 2) $prefix=$this->prefixcreditnote; - else if ($facture->type == 3) $prefix=$this->prefixdeposit; + elseif ($facture->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max @@ -220,7 +220,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$object->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index a3cb291263a..208e2ac0908 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -169,8 +169,8 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK; } } - else if (is_object($object) && $object->type == 2) $mask=$conf->global->SUPPLIER_CREDIT_TULIP_MASK; - else if (is_object($object) && $object->type == 3) $mask=$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; + elseif (is_object($object) && $object->type == 2) $mask=$conf->global->SUPPLIER_CREDIT_TULIP_MASK; + elseif (is_object($object) && $object->type == 3) $mask=$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; else $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK; if (! $mask) { diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index c8e6d984539..a863d839a0c 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -212,14 +212,14 @@ else { if (empty($backtourl)) { if (in_array($modulepart, array('product','produit','service','produit|service'))) $backtourl=DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('expensereport'))) $backtourl=DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('holiday'))) $backtourl=DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('member'))) $backtourl=DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('project'))) $backtourl=DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('societe'))) $backtourl=DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('tax'))) $backtourl=DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('ticket'))) $backtourl=DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('user'))) $backtourl=DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('expensereport'))) $backtourl=DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('holiday'))) $backtourl=DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('member'))) $backtourl=DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('project'))) $backtourl=DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('societe'))) $backtourl=DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('tax'))) $backtourl=DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('ticket'))) $backtourl=DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('user'))) $backtourl=DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]); } diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index db3514d7778..5eb2d629a66 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -81,7 +81,7 @@ if ($action == 'presend') $topicmail=''; if (empty($object->ref_client)) { $topicmail = $outputlangs->trans($defaulttopic, '__REF__'); - } else if (! empty($object->ref_client)) { + } elseif (! empty($object->ref_client)) { $topicmail = $outputlangs->trans($defaulttopic, '__REF__ (__REFCLIENT__)'); } diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 96510b85617..4f50f55b4ba 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -325,7 +325,7 @@ if (! empty($morelogincontent) && is_array($morelogincontent)) { } } } -else if (! empty($moreloginextracontent)) { +elseif (! empty($moreloginextracontent)) { echo ''; echo $moreloginextracontent; } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index ff29f6999a4..2cd38500d8d 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -186,7 +186,7 @@ else { if ($object->element == 'contrat') { if (empty($conf->product->enabled) && empty($conf->service->enabled) && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=-1; // With contract, by default, no choice at all, except if CONTRACT_SUPPORT_PRODUCTS is set - else if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; + elseif (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; } // Free line @@ -231,13 +231,13 @@ else { if (empty($senderissupplier)) { if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell'); - else if ((empty($conf->product->enabled) && ! empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell'); + elseif ((empty($conf->product->enabled) && ! empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell'); else echo $langs->trans('PredefinedProductsAndServicesToSell'); } else { if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase'); - else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase'); + elseif (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase'); else echo $langs->trans('PredefinedProductsAndServicesToPurchase'); } echo ''; diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 4d5e1ad948b..bf74231eb03 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -214,7 +214,7 @@ if (! empty($morelogincontent)) { } } } -else if (! empty($moreloginextracontent)) { +elseif (! empty($moreloginextracontent)) { echo ''; echo $moreloginextracontent; } diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 56a02ed5b14..9acdc897d78 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -738,7 +738,7 @@ else { print ''.$langs->trans("CronExecute").''; } - else if (empty($object->status)) + elseif (empty($object->status)) { print ''.$langs->trans("CronExecute").''; } diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 69736fdaca9..99a801e9e25 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -85,7 +85,7 @@ if ($action == 'specimen') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "DON_ADDON_MODEL",$value,'chaine',0,'',$conf->entity)) { @@ -103,12 +103,12 @@ else if ($action == 'setdoc') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 6a63074166c..95438b6bf75 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -239,7 +239,7 @@ if ($action == 'set_paid') setEventMessages($object->error, $object->errors, 'errors'); } } -else if ($action == 'classin' && $user->rights->don->creer) +elseif ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..9cacf5162fe 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -651,7 +651,7 @@ class Don extends CommonObject { $sql.= " AND d.rowid=".$id; } - else if (! empty($ref)) + elseif (! empty($ref)) { $sql.= " AND d.ref='".$this->db->escape($ref)."'"; } diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3d1ecac9088..05df1724438 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -306,8 +306,8 @@ class EcmDirectory // extends CommonObject else { if (preg_match('/[0-9]+/', $value)) $this->cachenbofdoc = (int) $value; - else if ($value == '+') $this->cachenbofdoc++; - else if ($value == '-') $this->cachenbofdoc--; + elseif ($value == '+') $this->cachenbofdoc++; + elseif ($value == '-') $this->cachenbofdoc--; } return 1; diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index c8e8d79046b..a2c0762321c 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -201,7 +201,7 @@ if ($action == 'add' && $permtoadd) } // Deleting file -else if ($action == 'confirm_deletesection' && $confirm == 'yes') +elseif ($action == 'confirm_deletesection' && $confirm == 'yes') { $result=$ecmdir->delete($user); setEventMessages($langs->trans("ECMSectionWasRemoved", $ecmdir->label), null, 'mesgs'); diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index ac744cc42e1..db6b6abf0f3 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -118,7 +118,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e99f04415b3..4f08da56365 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -281,7 +281,7 @@ if (empty($reshook)) } } } - else if (isset($_POST[$stockLocation])) + elseif (isset($_POST[$stockLocation])) { //shipment line from multiple stock locations $qty .= '_'.$j; @@ -416,7 +416,7 @@ if (empty($reshook)) /* * Build a receiving receipt */ - else if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) + elseif ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) { $result = $object->create_delivery($user); if ($result > 0) @@ -430,7 +430,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && + elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->shipping_advance->validate))) ) @@ -466,7 +466,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $result = $object->delete(); if ($result > 0) @@ -489,7 +489,7 @@ if (empty($reshook)) } }*/ - else if ($action == 'setdate_livraison' && $user->rights->expedition->creer) + elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'), GETPOST('liv_year','int')); @@ -503,7 +503,7 @@ if (empty($reshook)) } // Action update - else if ( + elseif ( ($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' @@ -614,7 +614,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) { // Clean parameters $qty=0; @@ -701,7 +701,7 @@ if (empty($reshook)) $lineIdToAddLot = $line_id; } } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -776,7 +776,7 @@ if (empty($reshook)) unset($_POST[$stockLocation]); unset($_POST[$qty]); } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -844,7 +844,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -940,7 +940,7 @@ if ($action == 'create') // Ref client print '
'; print ''; } - else if (! empty($conf->stock->enabled)) + elseif (! empty($conf->stock->enabled)) { if ($lines[$i]->fk_product > 0) { @@ -2269,7 +2269,7 @@ else if ($id || $ref) print ''; print ''; } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { print ''; foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -2320,7 +2320,7 @@ else if ($id || $ref) $entrepot->fetch($lines[$i]->entrepot_id); print $entrepot->getNomUrl(1); } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { $detail = ''; foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -2389,7 +2389,7 @@ else if ($id || $ref) print '
'; print '
'; } - else if ($object->statut == 0) + elseif ($object->statut == 0) { // edit-delete buttons print '
'; - }else if(!empty($conf->reception->enabled)){ + }elseif(!empty($conf->reception->enabled)){ print '"; } - else if ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
'; + elseif ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
'; } } } diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 48fdb15b655..7a1946bf495 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -546,11 +546,11 @@ if (! $error && $db->connected && $action == "set") { $databasefortest='mysql'; } - else if ($conf->db->type == 'pgsql') + elseif ($conf->db->type == 'pgsql') { $databasefortest='postgres'; } - else if ($conf->db->type == 'mssql') + elseif ($conf->db->type == 'mssql') { $databasefortest='master'; } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 14856d8b6b7..1b2e6e7e18d 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -347,7 +347,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 { $filelist[]=$file; } - else if (preg_match('/'.$to.'/i',$file)) // First test may be false if we migrate from x.y.* to x.y.* + elseif (preg_match('/'.$to.'/i',$file)) // First test may be false if we migrate from x.y.* to x.y.* { $filelist[]=$file; } diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cf6cbf28e45..2b6fe3f3e40 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4175,7 +4175,7 @@ function migrate_remise_except_entity($db,$langs,$conf) $sqlSelect2.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sqlSelect2.= " WHERE f.rowid = " . $fk_facture; } - else if (!empty($obj->fk_facture_line)) + elseif (!empty($obj->fk_facture_line)) { $sqlSelect2 = "SELECT f.entity"; $sqlSelect2.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd"; diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index b6e9c904f80..183810b7ab0 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -130,7 +130,7 @@ if ($action == 'add') } } -else if ($action == 'confirm_valid' && $confirm == 'yes' && +elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison_advance->validate))) ) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index cec094ef04d..3bab5474b08 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -162,7 +162,7 @@ if (empty($reshook)) } // Update record - else if ($action == 'update' && $user->rights->loan->write) + elseif ($action == 'update' && $user->rights->loan->write) { if (! $cancel) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e7bdbe07f67..6253fd86be2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1226,7 +1226,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''; $titletoshow=''; if ($title && ! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/',$conf->global->MAIN_HTML_TITLE)) $titletoshow = dol_htmlentities($title); - else if ($title) $titletoshow = dol_htmlentities($appli.' - '.$title); + elseif ($title) $titletoshow = dol_htmlentities($appli.' - '.$title); else $titletoshow = dol_htmlentities($appli); $parameters=array('title'=>$titletoshow); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 10ff15fbabf..80e9e8c4e2e 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -148,15 +148,15 @@ if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an open { $conf->entity = $_SESSION["dol_entity"]; } -else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script +elseif (! empty($_ENV["dol_entity"])) // Entity inside a CLI script { $conf->entity = $_ENV["dol_entity"]; } -else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page +elseif (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page { $conf->entity = GETPOST("entity",'int'); } -else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module +elseif (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module { $conf->entity = DOLENTITY; } diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index b36a5256059..787aaa3042b 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -109,7 +109,7 @@ if ($resql) $input.='OK;'; $somme[$k]++; } - else if ($car == "2") + elseif ($car == "2") { $input.='KO;'; $somme[$k]++; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 34945504943..8720accfe90 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -71,7 +71,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -136,7 +136,7 @@ if ($testmodifier) { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -821,7 +821,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -832,7 +832,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -886,7 +886,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -897,7 +897,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 334640e87d3..124b7af40ee 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -277,7 +277,7 @@ if (empty($conf->produit->enabled)) $title = $langs->trans('ServiceSetup'); $tab = $langs->trans('Services'); } -else if (empty($conf->service->enabled)) +elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $tab = $langs->trans('Products'); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 23780df895e..a71bfb9cf42 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -66,7 +66,7 @@ if (empty($conf->produit->enabled)) $title = $langs->trans('ServiceSetup'); $textobject = $langs->trans('Services'); } -else if (empty($conf->service->enabled)) +elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $textobject = $langs->trans('Products'); diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index cf9fcff98c8..11336d0417f 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -409,16 +409,16 @@ class ActionsCardProduct $this->entity = $obj->entity; $datas[$alias] = $this->getNomUrl(1,'',24); } - else if ($alias == 'stock') + elseif ($alias == 'stock') { $this->load_stock(); if ($this->stock_reel < $obj->seuil_stock_alerte) $datas[$alias] = $this->stock_reel.' '.img_warning($langs->trans("StockTooLow")); else $datas[$alias] = $this->stock_reel; } - else if ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias,40); - else if (preg_match('/price/i',$alias)) $datas[$alias] = price($obj->$alias); - else if ($alias == 'datem') $datas[$alias] = dol_print_date($this->db->jdate($obj->$alias),'day'); - else if ($alias == 'status') $datas[$alias] = $this->LibStatut($obj->$alias,5); + elseif ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias,40); + elseif (preg_match('/price/i',$alias)) $datas[$alias] = price($obj->$alias); + elseif ($alias == 'datem') $datas[$alias] = dol_print_date($this->db->jdate($obj->$alias),'day'); + elseif ($alias == 'status') $datas[$alias] = $this->LibStatut($obj->$alias,5); else $datas[$alias] = $obj->$alias; } } diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7ba746af06e..06ab6de21e0 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -206,7 +206,7 @@ class ActionsCardService { $dur=array("h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ($this->object->duration_value > 0) + elseif ($this->object->duration_value > 0) { $dur=array("h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 698d65795f1..d9fc881ce7b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -175,8 +175,8 @@ if (empty($reshook)) { $langs->load("errors"); if ($result == -1) $errors[] = 'ErrorBadBarCodeSyntax'; - else if ($result == -2) $errors[] = 'ErrorBarCodeRequired'; - else if ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; + elseif ($result == -2) $errors[] = 'ErrorBarCodeRequired'; + elseif ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; else $errors[] = 'FailedToValidateBarCode'; $error++; @@ -1248,7 +1248,7 @@ else * Product card */ - else if ($object->id > 0) + elseif ($object->id > 0) { // Fiche en mode edition if ($action == 'edit' && $usercancreate) @@ -1826,7 +1826,7 @@ else { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ($object->duration_value > 0) + elseif ($object->duration_value > 0) { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } @@ -1943,7 +1943,7 @@ else dol_fiche_end(); } } - else if ($action != 'create') + elseif ($action != 'create') { exit; } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 9a22c93d042..025317a288f 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -104,7 +104,7 @@ class FormProduct $sql.= ", ps.reel as stock"; } } - else if ($sumStock) + elseif ($sumStock) { $sql.= ", sum(ps.reel) as stock"; } @@ -318,9 +318,9 @@ class FormProduct $measuring_units=array(); if ($measuring_style == 'weight') $measuring_units=array(-6=>1,-3=>1,0=>1,3=>1,98=>1,99=>1); - else if ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,98=>1,99=>1); - else if ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1,98=>1,99=>1); - else if ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,88=>1,89=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3 + elseif ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,98=>1,99=>1); + elseif ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1,98=>1,99=>1); + elseif ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,88=>1,89=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3 $return.= '<select class="flat" name="'.$name.'">'; if ($adddefault) $return.= '<option value="0">'.$langs->trans("Default").'</option>'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e299921488b..583ce3acaa3 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1269,7 +1269,7 @@ class Product extends CommonObject return -1; } } - else if (isset($this->multilangs[$key])) { + elseif (isset($this->multilangs[$key])) { $sql = "SELECT rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql.= " WHERE fk_product=".$this->id; @@ -2009,8 +2009,8 @@ class Product extends CommonObject { $sql.= " WHERE entity IN (".getEntity($this->element).")"; if ($ref) { $sql.= " AND ref = '".$this->db->escape($ref)."'"; - } else if ($ref_ext) { $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; - } else if ($barcode) { $sql.= " AND barcode = '".$this->db->escape($barcode)."'"; + } elseif ($ref_ext) { $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; + } elseif ($barcode) { $sql.= " AND barcode = '".$this->db->escape($barcode)."'"; } } @@ -2178,7 +2178,7 @@ class Product extends CommonObject { // Nothing loaded by default. List may be very long. } - else if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) // prices per quantity + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) // prices per quantity { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql.= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid"; @@ -2229,7 +2229,7 @@ class Product extends CommonObject return -1; } } - else if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // prices per customer and quantity + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // prices per customer and quantity { for ($i=1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { @@ -3912,9 +3912,9 @@ class Product extends CommonObject if ($option == 'supplier' || $option == 'category') { $url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id; - } else if ($option == 'stock') { + } elseif ($option == 'stock') { $url = DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id; - } else if ($option == 'composition') { + } elseif ($option == 'composition') { $url = DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id; } else { $url = DOL_URL_ROOT.'/product/card.php?id='.$this->id; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 521b9dfeca7..001efe037f4 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -112,7 +112,7 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se exit; } } -else if($action==='save_composed_product') +elseif($action==='save_composed_product') { $TProduct = GETPOST('TProduct', 'array'); if (!empty($TProduct)) diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 3249671d173..dffb8ee0b2c 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -104,15 +104,15 @@ class PriceParser { return $langs->trans("ErrorPriceExpression".$code); } - else if (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg + elseif (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg { return $langs->trans("ErrorPriceExpression".$code, $info); } - else if (in_array($code, array(6, 23))) //Errors which have 2 args + elseif (in_array($code, array(6, 23))) //Errors which have 2 args { return $langs->trans("ErrorPriceExpression".$code, $info[0], $info[1]); } - else if (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors + elseif (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors { return $langs->trans("ErrorPriceExpressionInternal", $code); } diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 3e4a87fe9f9..84440a3595a 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -55,7 +55,7 @@ if (empty($eid)) //This also disables fetch when eid == 0 { $eid = 0; } -else if ($action != 'delete') +elseif ($action != 'delete') { $price_expression->fetch($eid); } @@ -94,7 +94,7 @@ if ($action == 'add') } } } - else if ($result < 0) + elseif ($result < 0) { setEventMessages("add find: ".$price_expression->error, $price_expression->errors, 'errors'); } @@ -134,7 +134,7 @@ if ($action == 'update') } } } - else if ($result < 0) + elseif ($result < 0) { setEventMessages("update find: ".$price_expression->error, $price_expression->errors, 'errors'); } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 8556160b767..e190e3a55d1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -235,7 +235,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink), null, 'errors'); } - else if ($ret < 0) + elseif ($ret < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 56519e6f46b..f3e8ce50037 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -36,7 +36,7 @@ if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page // Security check if ($type=='0') $result=restrictedArea($user,'produit'); -else if ($type=='1') $result=restrictedArea($user,'service'); +elseif ($type=='1') $result=restrictedArea($user,'service'); else $result=restrictedArea($user,'produit|service'); // Load translation files required by the page @@ -174,7 +174,7 @@ if ($type == '0') print $statProducts; $total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2]); } -else if ($type == '1') +elseif ($type == '1') { print $statServices; $total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2]); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index ca3691edd83..491a66f9562 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -115,7 +115,7 @@ if (! empty($canvas)) // Security check if ($search_type=='0') $result=restrictedArea($user,'produit','','','','','',$objcanvas); -else if ($search_type=='1') $result=restrictedArea($user,'service','','','','','',$objcanvas); +elseif ($search_type=='1') $result=restrictedArea($user,'service','','','','','',$objcanvas); else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); // Define virtualdiffersfromphysical @@ -381,7 +381,7 @@ if ($resql) { $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; } - else if ($search_type == 1) + elseif ($search_type == 1) { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; } @@ -787,7 +787,7 @@ if ($resql) { $dur=array("i"=>$langs->trans("Minutes"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ((float) $duration_value > 0) + elseif ((float) $duration_value > 0) { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 687054d1cde..1c064922783 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -63,7 +63,7 @@ if ($type == '0') { $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; } -else if ($type == '1') +elseif ($type == '1') { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 5c06bfee335..1c73758c5f2 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1958,7 +1958,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print $langs->trans('None'); } } - else if ($action != 'showlog_default_price' && $action != 'edit_price') + elseif ($action != 'showlog_default_price' && $action != 'edit_price') { // List of all prices by customers print '<!-- list of all prices per customer -->'."\n"; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 40848e6bb81..af6d9336588 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -90,7 +90,7 @@ if (! $id && empty($ref)) //$title=$langs->trans("StatisticsOfProducts"); $title=$langs->trans("Statistics"); } - else if ($type == '1') + elseif ($type == '1') { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; //$title=$langs->trans("StatisticsOfServices"); diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e19df0aaa1a..674d859a0e3 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -433,7 +433,7 @@ class MouvementStock extends CommonObject //print "qty=".$qty." newpmp=".$newpmp; //exit; } - else if ($type == 1 || $type == 2) + elseif ($type == 1 || $type == 2) { // After a stock decrease, we don't change value of PMP for product. $newpmp = $oldpmp; @@ -465,7 +465,7 @@ class MouvementStock extends CommonObject $this->errors[]=$this->db->lasterror(); $error = -3; } - else if (empty($fk_product_stock)) + elseif (empty($fk_product_stock)) { $fk_product_stock = $this->db->last_insert_id(MAIN_DB_PREFIX."product_stock"); } @@ -822,7 +822,7 @@ class MouvementStock extends CommonObject $result = -2; } } - else if (is_array($dluo)) + elseif (is_array($dluo)) { if (isset($dluo['fk_product_stock'])) { diff --git a/htdocs/product/stock/lib/replenishment.lib.php b/htdocs/product/stock/lib/replenishment.lib.php index 486e8373255..86cb1a3d7ba 100644 --- a/htdocs/product/stock/lib/replenishment.lib.php +++ b/htdocs/product/stock/lib/replenishment.lib.php @@ -122,7 +122,7 @@ function ordered($product_id) $sql .= ' ON cfd.fk_commande = cf.rowid WHERE'; if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { $sql .= ' cf.fk_statut < 3'; - } else if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { + } elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { $sql .= ' cf.fk_statut < 6 AND cf.rowid NOT IN ' . dispatchedOrders(); } else { $sql .= ' cf.fk_statut < 5'; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index f6a694c57fa..68ad4d96789 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -468,7 +468,7 @@ if ($month > 0) else $sql.= " AND date_format(m.datem, '%m') = '$month'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND m.datem BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index c0e2973b4f8..76616bf06bc 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -136,12 +136,12 @@ if ($search_datemonth > 0) { if ($search_dateyear > 0 && empty($search_dateday)) $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_get_first_day($search_dateyear,$search_datemonth,false))."' AND '".$db->idate(dol_get_last_day($search_dateyear,$search_datemonth,false))."'"; - else if ($search_dateyear > 0 && ! empty($search_dateday)) + elseif ($search_dateyear > 0 && ! empty($search_dateday)) $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_datemonth, $search_dateday, $search_dateyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_datemonth, $search_dateday, $search_dateyear))."'"; else $sql.= " AND date_format(cf.date_creation, '%m') = '".$search_datemonth."'"; } -else if ($search_dateyear > 0) +elseif ($search_dateyear > 0) { $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_get_first_day($search_dateyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dateyear,12,false))."'"; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 855675be956..b6c99d23374 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -277,7 +277,7 @@ if ($action == 'edit') print '</form>'; } -else if ($action != 'add') +elseif ($action != 'add') { if (! empty($object->multilangs)) { diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 5665a2fb505..e00d4ca6730 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -81,7 +81,7 @@ $yearofday=GETPOST('addtimeyear'); $daytoparse = $now; if ($yearofday && $monthofday && $dayofday) $daytoparse=dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday); // xxxofday is value of day after submit action 'addtime' -else if ($year && $month && $day) $daytoparse=dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' +elseif ($year && $month && $day) $daytoparse=dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 71755fbdca3..fd0d78b6a27 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -61,7 +61,7 @@ if ($action == 'setmainoptions') else dolibarr_set_const($db, "PROJECT_HIDE_TASKS",1,'chaine',0,'',$conf->entity); } -else if ($action == 'updateMask') +elseif ($action == 'updateMask') { $maskconstproject=GETPOST('maskconstproject','alpha'); $maskproject=GETPOST('maskproject','alpha'); @@ -99,7 +99,7 @@ if ($action == 'updateMaskTask') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -144,7 +144,7 @@ else if ($action == 'specimen') } } -else if ($action == 'specimentask') +elseif ($action == 'specimentask') { $modele=GETPOST('module','alpha'); @@ -190,17 +190,17 @@ else if ($action == 'specimentask') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } // Activate a model for task -else if ($action == 'settask') +elseif ($action == 'settask') { $ret = addDocumentModel($value,'project_task', $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -218,7 +218,7 @@ if ($action == 'deltask') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity); @@ -230,7 +230,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setdoctask') +elseif ($action == 'setdoctask') { if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -247,7 +247,7 @@ else if ($action == 'setdoctask') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -255,7 +255,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "PROJECT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'setmodtask') +elseif ($action == 'setmodtask') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6cb54cfb572..7dcafcff657 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -445,7 +445,7 @@ class Project extends CommonObject { $sql.= " WHERE rowid=".$id; } - else if (! empty($ref)) + elseif (! empty($ref)) { $sql.= " WHERE ref='".$this->db->escape($ref)."'"; $sql.= " AND entity IN (".getEntity('project').")"; @@ -1039,7 +1039,7 @@ class Project extends CommonObject if (preg_match('/\.php$/',$option)) { $url = dol_buildpath($option,1) . '?id=' . $this->id; } - else if ($option == 'task') + elseif ($option == 'task') { $url = DOL_URL_ROOT . '/projet/tasks.php?id=' . $this->id; } @@ -1155,7 +1155,7 @@ class Project extends CommonObject { $userAccess = 1; } - else if ($this->public && (($mode == 'read' && ! empty($user->rights->projet->lire)) || ($mode == 'write' && ! empty($user->rights->projet->creer)) || ($mode == 'delete' && ! empty($user->rights->projet->supprimer)))) + elseif ($this->public && (($mode == 'read' && ! empty($user->rights->projet->lire)) || ($mode == 'write' && ! empty($user->rights->projet->creer)) || ($mode == 'delete' && ! empty($user->rights->projet->supprimer)))) { $userAccess = 1; } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 96b21b09bf9..d4b0e4c8dae 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -604,7 +604,7 @@ foreach ($listofreferent as $key => $value) if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); if ($tablename == 'don' || $tablename == 'chargesociales') $total_ht_by_line=$element->amount; elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); - else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'projet_task') { if ($idofelementuser) @@ -633,7 +633,7 @@ foreach ($listofreferent as $key => $value) if ($qualifiedfortotal) $total_ht = $total_ht + $total_ht_by_line; if ($tablename == 'don' || $tablename == 'chargesociales') $total_ttc_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { @@ -911,7 +911,7 @@ foreach ($listofreferent as $key => $value) $element_doc='commande_fournisseur'; $filedir = $conf->fournisseur->commande->multidir_output[$element->entity].'/'.dol_sanitizeFileName($element->ref); } - else if ($element_doc === 'invoice_supplier') { + elseif ($element_doc === 'invoice_supplier') { $element_doc='facture_fournisseur'; $filename = get_exdir($element->id,2,0,0,$element,'product').dol_sanitizeFileName($element->ref); $filedir = $conf->fournisseur->facture->multidir_output[$element->entity].'/'.get_exdir($element->id,2,0,0,$element,'invoice_supplier').dol_sanitizeFileName($element->ref); @@ -956,7 +956,7 @@ foreach ($listofreferent as $key => $value) print dol_print_date($element->datep,'dayhour'); if ($element->datef && $element->datef > $element->datep) print " - ".dol_print_date($element->datef,'dayhour'); } - else if (in_array($tablename, array('projet_task'))) + elseif (in_array($tablename, array('projet_task'))) { $tmpprojtime = $element->getSumOfAmount($elementuser, $dates, $datee); // $element is a task. $elementuser may be empty print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$idofelement.'&withproject=1">'; @@ -970,19 +970,19 @@ foreach ($listofreferent as $key => $value) // Third party or user print '<td class="left">'; if (is_object($element->thirdparty)) print $element->thirdparty->getNomUrl(1,'',48); - else if ($tablename == 'expensereport_det') + elseif ($tablename == 'expensereport_det') { $tmpuser=new User($db); $tmpuser->fetch($expensereport->fk_user_author); print $tmpuser->getNomUrl(1,'',48); } - else if ($tablename == 'payment_salary') + elseif ($tablename == 'payment_salary') { $tmpuser=new User($db); $tmpuser->fetch($element->fk_user); print $tmpuser->getNomUrl(1,'',48); } - else if ($tablename == 'don' || $tablename == 'stock_mouvement') + elseif ($tablename == 'don' || $tablename == 'stock_mouvement') { if ($element->fk_user_author > 0) { @@ -991,7 +991,7 @@ foreach ($listofreferent as $key => $value) print $tmpuser2->getNomUrl(1,'',48); } } - else if ($tablename == 'projet_task' && $key == 'project_task_time') // if $key == 'project_task', we don't want details per user + elseif ($tablename == 'projet_task' && $key == 'project_task_time') // if $key == 'project_task', we don't want details per user { print $elementuser->getNomUrl(1); } @@ -1004,7 +1004,7 @@ foreach ($listofreferent as $key => $value) $total_ht_by_line=null; $othermessage=''; if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); elseif (in_array($tablename, array('projet_task'))) { @@ -1045,7 +1045,7 @@ foreach ($listofreferent as $key => $value) { $total_ttc_by_line=null; if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { @@ -1083,19 +1083,19 @@ foreach ($listofreferent as $key => $value) { print $expensereport->getLibStatut(5); } - else if ($element instanceof CommonInvoice) + elseif ($element instanceof CommonInvoice) { //This applies for Facture and FactureFournisseur print $element->getLibStatut(5, $element->getSommePaiement()); } - else if ($element instanceof Task) + elseif ($element instanceof Task) { if ($element->progress != '') { print $element->progress.' %'; } } - else if ($tablename == 'stock_mouvement') + elseif ($tablename == 'stock_mouvement') { print $element->getLibStatut(3); } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 252942ced6c..0d944099de3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -320,12 +320,12 @@ if ($search_smonth > 0) { if ($search_syear > 0 && empty($search_sday)) $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,$search_smonth,false))."' AND '".$db->idate(dol_get_last_day($search_syear,$search_smonth,false))."'"; - else if ($search_syear > 0 && ! empty($search_sday)) + elseif ($search_syear > 0 && ! empty($search_sday)) $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_smonth, $search_sday, $search_syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_smonth, $search_sday, $search_syear))."'"; else $sql.= " AND date_format(p.dateo, '%m') = '".$search_smonth."'"; } -else if ($search_syear > 0) +elseif ($search_syear > 0) { $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,1,false))."' AND '".$db->idate(dol_get_last_day($search_syear,12,false))."'"; } @@ -333,12 +333,12 @@ if ($search_emonth > 0) { if ($search_eyear > 0 && empty($search_eday)) $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,$search_emonth,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,$search_emonth,false))."'"; - else if ($search_eyear > 0 && ! empty($search_eday)) + elseif ($search_eyear > 0 && ! empty($search_eday)) $sql.= " AND p.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_emonth, $search_eday, $search_eyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_emonth, $search_eday, $search_eyear))."'"; else $sql.= " AND date_format(p.datee, '%m') = '".$search_emonth."'"; } -else if ($search_eyear > 0) +elseif ($search_eyear > 0) { $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,12,false))."'"; } @@ -760,7 +760,7 @@ while ($i < min($num,$limit)) print $nbofsalesrepresentative; print '</a>'; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index fb2399175c2..a17c42a3691 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -133,13 +133,13 @@ if ($search_dtstartmonth > 0) { if ($search_dtstartyear > 0 && empty($search_dtstartday)) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_dtstartyear,$search_dtstartmonth,false))."' AND '".$db->idate(dol_get_last_day($search_dtstartyear,$search_dtstartmonth,false))."')"; - }else if ($search_dtstartyear > 0 && ! empty($search_dtstartday)) { + }elseif ($search_dtstartyear > 0 && ! empty($search_dtstartday)) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_dtstartmonth, $search_dtstartday, $search_dtstartyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_dtstartmonth, $search_dtstartday, $search_dtstartyear))."')"; }else { $morewherefilterarray[]= " date_format(t.dateo, '%m') = '".$search_dtstartmonth."'"; } } -else if ($search_dtstartyear > 0) +elseif ($search_dtstartyear > 0) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_dtstartyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dtstartyear,12,false))."')"; } @@ -148,13 +148,13 @@ if ($search_dtendmonth > 0) { if ($search_dtendyear > 0 && empty($search_dtendday)) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_get_first_day($search_dtendyear,$search_dtendmonth,false))."' AND '".$db->idate(dol_get_last_day($search_dtendyear,$search_dtendmonth,false))."')"; - }else if ($search_dtendyear > 0 && ! empty($search_dtendday)) { + }elseif ($search_dtendyear > 0 && ! empty($search_dtendday)) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_dtendmonth, $search_dtendday, $search_dtendyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_dtendmonth, $search_dtendday, $search_dtendyear))."')"; }else { $morewherefilterarray[]= " date_format(t.datee, '%m') = '".$search_dtendmonth."'"; } } -else if ($search_dtendyear > 0) +elseif ($search_dtendyear > 0) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_get_first_day($search_dtendyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dtendyear,12,false))."')"; } @@ -207,7 +207,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) $action='create'; $error++; } - else if (empty($_POST['task_parent'])) + elseif (empty($_POST['task_parent'])) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ChildOfProjectTask")), null, 'errors'); $action='create'; @@ -268,7 +268,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) header("Location: ".$backtopage); exit; } - else if (empty($projectid)) + elseif (empty($projectid)) { header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode)?'':'?mode='.$mode)); exit; @@ -283,7 +283,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) header("Location: ".$backtopage); exit; } - else if (empty($id)) + elseif (empty($id)) { // We go back on task list header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode)?'':'?mode='.$mode)); @@ -563,7 +563,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '</form>'; } } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Projet card in view mode diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 61ae1ce652e..a152000acaa 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -284,12 +284,12 @@ if ($search_smonth > 0) { if ($search_syear > 0 && empty($search_sday)) $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,$search_smonth,false))."' AND '".$db->idate(dol_get_last_day($search_syear,$search_smonth,false))."'"; - else if ($search_syear > 0 && ! empty($search_sday)) + elseif ($search_syear > 0 && ! empty($search_sday)) $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_smonth, $search_sday, $search_syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_smonth, $search_sday, $search_syear))."'"; else $sql.= " AND date_format(t.dateo, '%m') = '".$search_smonth."'"; } -else if ($search_syear > 0) +elseif ($search_syear > 0) { $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,1,false))."' AND '".$db->idate(dol_get_last_day($search_syear,12,false))."'"; } @@ -297,12 +297,12 @@ if ($search_emonth > 0) { if ($search_eyear > 0 && empty($search_eday)) $sql.= " AND t.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,$search_emonth,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,$search_emonth,false))."'"; - else if ($search_eyear > 0 && ! empty($search_eday)) + elseif ($search_eyear > 0 && ! empty($search_eday)) $sql.= " AND t.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_emonth, $search_eday, $search_eyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_emonth, $search_eday, $search_eyear))."'"; else $sql.= " AND date_format(t.datee, '%m') = '".$search_emonth."'"; } -else if ($search_eyear > 0) +elseif ($search_eyear > 0) { $sql.= " AND t.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,12,false))."'"; } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 9433925d933..e2025812e65 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -837,12 +837,12 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(t.task_datehour, '%m') = '".$db->escape($search_month)."'"; } - else if ($search_year > 0) + elseif ($search_year > 0) { $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } @@ -1273,7 +1273,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '<br>'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'; } - else if ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks + elseif ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks { if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer) { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 79485ee9820..c6fbef4c552 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -353,7 +353,7 @@ if ($action == 'add') } if (! empty($backtopage)) $urlback=$backtopage; - else if (! empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) + elseif (! empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) { $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; // TODO Make replacement of __AMOUNT__, etc... @@ -379,7 +379,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') { $urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); @@ -396,7 +396,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') { $urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); @@ -413,7 +413,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'stripe') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'stripe') { $urlback=DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref; if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index b580a508ed0..84ea1571cee 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -167,7 +167,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_SIGN_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall=$conf->global->ONLINE_SIGN_LOGO; +elseif (! empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall=$conf->global->ONLINE_SIGN_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index acf986bb226..dab212b663e 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -109,7 +109,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -211,7 +211,7 @@ if ($testmodifier) { $nouveauchoix.="1"; } - else if (isset($_POST["choix".$i]) && $_POST["choix".$i] == '2') + elseif (isset($_POST["choix".$i]) && $_POST["choix".$i] == '2') { $nouveauchoix.="2"; } @@ -462,7 +462,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -473,7 +473,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -527,7 +527,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -538,7 +538,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 2b5874005f3..910d63e0d0b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -255,7 +255,7 @@ $creditor=$mysoc->name; $paramcreditor='ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong='ONLINE_PAYMENT_CREDITOR_'.$suffix; if (! empty($conf->global->$paramcreditorlong)) $creditor=$conf->global->$paramcreditorlong; -else if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcreditor; +elseif (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcreditor; @@ -699,7 +699,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 783493f375c..f9e83b4a5d6 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -216,7 +216,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index e48fc014749..2831da07b13 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -151,7 +151,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; @@ -378,8 +378,8 @@ if ($ispaymentok) // Define default choice for complementary actions $option=''; if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='bankviainvoice'; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $option='bankdirect'; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='invoiceonly'; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $option='bankdirect'; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='invoiceonly'; if (empty($option)) $option='none'; $sendalsoemail = 1; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 90082d638c2..68edf809fea 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -79,7 +79,7 @@ else { $result=restrictedArea($user, 'reception'); if($origin == 'supplierorder'){ if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) accessforbidden(); - }else if (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); + }elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); } $action = GETPOST('action','alpha'); @@ -209,7 +209,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } else if ($reshook < 0) + } elseif ($reshook < 0) $error++; } @@ -388,7 +388,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && + elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->reception->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->reception->reception_advance->validate))) ) @@ -424,7 +424,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) { $result = $object->delete($user); if ($result > 0) @@ -447,7 +447,7 @@ if (empty($reshook)) } }*/ - else if ($action == 'setdate_livraison' && $user->rights->reception->creer) + elseif ($action == 'setdate_livraison' && $user->rights->reception->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'), GETPOST('liv_year','int')); @@ -461,7 +461,7 @@ if (empty($reshook)) } // Action update - else if ($action == 'settracking_number' || $action == 'settracking_url' + elseif ($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' || $action == 'settrueWidth' || $action == 'settrueHeight' @@ -498,7 +498,7 @@ if (empty($reshook)) } // Build document - else if ($action == 'builddoc') // En get ou en post + elseif ($action == 'builddoc') // En get ou en post { // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha')); @@ -590,7 +590,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) { // Clean parameters $qty = 0; @@ -689,7 +689,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -1218,7 +1218,7 @@ if ($action == 'create') } } } -else if ($id || $ref) +elseif ($id || $ref) /* *************************************************************************** */ /* */ /* Edit and view mode */ @@ -1979,7 +1979,7 @@ else if ($id || $ref) print '<input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '"><br>'; print '<input type="submit" class="button" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>'; } - else if ($object->statut == 0) + elseif ($object->statut == 0) { // edit-delete buttons print '<td class="linecoledit" align="center">'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 4cddbb1134e..f97e22c7cfd 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -297,7 +297,7 @@ class Reception extends CommonObject } } } - else if ($reshook < 0) $error++; + elseif ($reshook < 0) $error++; if (! $error && ! $notrigger) { diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 7fc1ed889f5..81379fa81ce 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -106,13 +106,13 @@ if ($action == 'addcontact' && $user->rights->reception->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->reception->creer) +elseif ($action == 'swapstatut' && $user->rights->reception->creer) { $result=$objectsrc->swapContactStatus(GETPOST('ligne')); } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->reception->creer) +elseif ($action == 'deletecontact' && $user->rights->reception->creer) { $result = $objectsrc->delete_contact(GETPOST("lineid")); diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index e4f588b7f0d..e4791a9970f 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -77,13 +77,13 @@ if ($action == 'addcontact' && $user->rights->resource->write) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->resource->write) +elseif ($action == 'swapstatut' && $user->rights->resource->write) { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Erase a contact -else if ($action == 'deletecontact' && $user->rights->resource->write) +elseif ($action == 'deletecontact' && $user->rights->resource->write) { $result = $object->delete_contact(GETPOST('lineid','int')); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 4628f241728..74f24c36399 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -545,7 +545,7 @@ foreach ($dirsociete as $dirroot) $modulequalified=1; if (! empty($module->version)) { if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; - else if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + elseif ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; } if ($modulequalified) diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index ffcd7c7a00f..2280c83635f 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -310,7 +310,7 @@ abstract class ActionsCardCommon $this->tpl['sales_representatives'].= $nbofsalesrepresentative; $this->tpl['sales_representatives'].= '</a>'; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($this->db); $i=0; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 617e9f9a1f7..dbb7fbcd91b 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -471,7 +471,7 @@ if (empty($reshook)) } if (GETPOST('deletephoto')) $object->logo = ''; - else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); + elseif (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); // Check parameters if (! GETPOST('cancel','alpha')) @@ -631,7 +631,7 @@ if (empty($reshook)) { $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/card.php?socid=".$object->id; - else if ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; + elseif ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; header("Location: ".$url); exit; @@ -1786,7 +1786,7 @@ else if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; } - else if ($object->codeclient_modifiable()) + elseif ($object->codeclient_modifiable()) { print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($object->code_client).'" maxlength="15">'; } @@ -1826,7 +1826,7 @@ else if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; } - else if ($object->codefournisseur_modifiable()) + elseif ($object->codefournisseur_modifiable()) { print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.$object->code_fournisseur.'" maxlength="15">'; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1e152331aff..34a8c0005da 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2332,7 +2332,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; - else if ($mode == 'mobile') $property=$obj->phone_mobile; + elseif ($mode == 'mobile') $property=$obj->phone_mobile; else $property=$obj->$mode; // Show all contact. If hidedisabled is 1, showonly contacts with status = 1 @@ -2341,7 +2341,7 @@ class Societe extends CommonObject if (empty($property)) { if ($mode == 'email') $property=$langs->transnoentitiesnoconv("NoEMail"); - else if ($mode == 'mobile') $property=$langs->transnoentitiesnoconv("NoMobilePhone"); + elseif ($mode == 'mobile') $property=$langs->transnoentitiesnoconv("NoMobilePhone"); } if (!empty($obj->poste)) @@ -2465,7 +2465,7 @@ class Societe extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $contact_property = dol_string_nospecial(dolGetFirstLastname($obj->firstname, $obj->lastname), ' ', array(","))." <".$obj->email.">"; - else if ($mode == 'mobile') $contact_property = $obj->phone_mobile; + elseif ($mode == 'mobile') $contact_property = $obj->phone_mobile; } return $contact_property; } @@ -2787,7 +2787,7 @@ class Societe extends CommonObject $result = $mod->get_code($this->db, $this, $type); if ($type == 'customer') $this->code_compta = $mod->code; - else if ($type == 'supplier') $this->code_compta_fournisseur = $mod->code; + elseif ($type == 'supplier') $this->code_compta_fournisseur = $mod->code; return $result; } @@ -2800,7 +2800,7 @@ class Societe extends CommonObject else { if ($type == 'customer') $this->code_compta = ''; - else if ($type == 'supplier') $this->code_compta_fournisseur = ''; + elseif ($type == 'supplier') $this->code_compta_fournisseur = ''; return 0; } @@ -3225,7 +3225,7 @@ class Societe extends CommonObject // Define if third party is treated as company (or not) when nature is unknown $isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default if (! empty($this->tva_intra)) $isacompany=1; - else if (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') + elseif (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') { // TODO Add a field is_a_company into dictionary if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany=0; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index dd4134bae86..61292d4f4fe 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -313,7 +313,7 @@ if (!empty($sql_select)) } else { $sql.= " AND date_format(".$dateprint.", '%m') = '".sprintf('%02d',$month)."'"; } - } else if ($year > 0) { + } elseif ($year > 0) { $start = dol_mktime(0, 0, 0, 1, 1, $year); $end = dol_time_plus_duree($start,1,'y') - 1; $sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'"; @@ -622,7 +622,7 @@ if ($sql_select) } $db->free($resql); } -else if (empty($type_element) || $type_element == -1) +elseif (empty($type_element) || $type_element == -1) { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 630b8fa4723..2144c11f3ed 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -82,7 +82,7 @@ if ($action == 'addcontact' && $user->rights->societe->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->societe->creer) +elseif ($action == 'swapstatut' && $user->rights->societe->creer) { if ($object->fetch($id)) { @@ -95,7 +95,7 @@ else if ($action == 'swapstatut' && $user->rights->societe->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->societe->creer) +elseif ($action == 'deletecontact' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 0affce21c93..ab08caa6d9f 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -151,7 +151,7 @@ if (empty($reshook)) } // Delete askprice - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->supplier_proposal->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->supplier_proposal->supprimer) { $result = $object->delete($user); if ($result > 0) { @@ -164,7 +164,7 @@ if (empty($reshook)) } // Remove line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->supplier_proposal->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->supplier_proposal->creer) { $result = $object->deleteline($lineid); // reorder lines @@ -188,7 +188,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'confirm_validate' && $confirm == 'yes' && + elseif ($action == 'confirm_validate' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->supplier_proposal->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->supplier_proposal->validate_advance))) ) @@ -222,7 +222,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate_livraison' && $user->rights->supplier_proposal->creer) + elseif ($action == 'setdate_livraison' && $user->rights->supplier_proposal->creer) { $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); if ($result < 0) @@ -230,7 +230,7 @@ if (empty($reshook)) } // Create askprice - else if ($action == 'add' && $user->rights->supplier_proposal->creer) + elseif ($action == 'add' && $user->rights->supplier_proposal->creer) { $object->socid = $socid; $object->fetch_thirdparty(); @@ -445,7 +445,7 @@ if (empty($reshook)) } // Reopen proposal - else if ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED || $object->statut == SupplierProposal::STATUS_NOTSIGNED || $object->statut == SupplierProposal::STATUS_CLOSE) { $object->reopen($user, SupplierProposal::STATUS_VALIDATED); @@ -453,7 +453,7 @@ if (empty($reshook)) } // Close proposal - else if ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED) { $object->setStatut(SupplierProposal::STATUS_CLOSE); @@ -461,7 +461,7 @@ if (empty($reshook)) } // Set accepted/refused - else if ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { if (! GETPOST('statut')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), null, 'errors'); $action = 'statut'; @@ -507,7 +507,7 @@ if (empty($reshook)) } } - else if ($action == "setabsolutediscount" && $user->rights->supplier_proposal->creer) { + elseif ($action == "setabsolutediscount" && $user->rights->supplier_proposal->creer) { if ($_POST["remise_id"]) { if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); @@ -688,7 +688,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error)) // Free product. // $price_ht is already set + elseif((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error)) // Free product. // $price_ht is already set { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -793,7 +793,7 @@ if (empty($reshook)) } // Mise a jour d'une ligne dans la demande de prix - else if ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('save') == $langs->trans("Save")) { + elseif ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('save') == $langs->trans("Save")) { // Define info_bits $info_bits = 0; @@ -919,50 +919,50 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } // Set project - else if ($action == 'classin' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'classin' && $user->rights->supplier_proposal->creer) { $object->setProject(GETPOST('projectid'),'int'); } // Delai de livraison - else if ($action == 'setavailability' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setavailability' && $user->rights->supplier_proposal->creer) { $result = $object->availability($_POST['availability_id']); } // Conditions de reglement - else if ($action == 'setconditions' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setconditions' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } - else if ($action == 'setremisepercent' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setremisepercent' && $user->rights->supplier_proposal->creer) { $result = $object->set_remise_percent($user, $_POST['remise_percent']); } - else if ($action == 'setremiseabsolue' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setremiseabsolue' && $user->rights->supplier_proposal->creer) { $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } // Mode de reglement - else if ($action == 'setmode' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmode' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->supplier_proposal->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } - else if ($action == 'update_extras') { + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form @@ -1329,22 +1329,22 @@ if ($action == 'create') } // Confirm delete - else if ($action == 'delete') { + elseif ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen - else if ($action == 'reopen') { + elseif ($action == 'reopen') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line - else if ($action == 'ask_deleteline') { + elseif ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate askprice - else if ($action == 'validate') { + elseif ($action == 'validate') { $error = 0; // on verifie si l'objet est en numerotation provisoire diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a32b973d00a..bf81aee86cb 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1953,7 +1953,7 @@ class SupplierProposal extends CommonObject { $ga[$obj->supplier_proposalid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->supplier_proposalid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index 7e862e7682d..819618530be 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $permissiontoedit) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $permissiontoedit) +elseif ($action == 'swapstatut' && $permissiontoedit) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $permissiontoedit) } // Deleting a contact -else if ($action == 'deletecontact' && $permissiontoedit) +elseif ($action == 'deletecontact' && $permissiontoedit) { $object->fetch($id); $result = $object->delete_contact(GETPOST("lineid",'int')); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 82f5ad56416..6a9710a4b37 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -360,7 +360,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos { print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>"; } - else if ($total>0) + elseif ($total>0) { print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>"; } diff --git a/htdocs/takepos/customers.php b/htdocs/takepos/customers.php index 41738861702..e17cce187be 100644 --- a/htdocs/takepos/customers.php +++ b/htdocs/takepos/customers.php @@ -353,7 +353,7 @@ if ($search_level_from != '' && $search_level_to != '') $sortwhere = '(sortorder BETWEEN '.$search_level_from.' AND '.$search_level_to.') AS is_in_range'; } // If only "from" parameter is set, search for everything GREATER THAN it -else if ($search_level_from != '') +elseif ($search_level_from != '') { // Ensure that this parameter is a number $search_level_from = (int) $search_level_from; @@ -362,7 +362,7 @@ else if ($search_level_from != '') $sortwhere = '(sortorder >= '.$search_level_from.') AS is_in_range'; } // If only "to" parameter is set, search for everything LOWER THAN it -else if ($search_level_to != '') +elseif ($search_level_to != '') { // Ensure that this parameter is a number $search_level_to = (int) $search_level_to; diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index ff1b368b743..c3e26345a09 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -83,7 +83,7 @@ if ($query=="cat") // Output imagejpeg($image_p, null, 100); } -else if ($query=="pro") +elseif ($query=="pro") { require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php"; diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 1701b82a770..789b2a1cc8a 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -66,8 +66,8 @@ if (!$placeid) { $placeid = 0; // not necesary if ($action == 'valid' && $user->rights->facture->creer) { if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH; - else if ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB; - else if ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; + elseif ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB; + elseif ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; $now=dol_now(); $invoice = new Facture($db); $invoice->fetch($placeid); @@ -80,8 +80,8 @@ if ($action == 'valid' && $user->rights->facture->creer) $payment->amounts[$invoice->id]=$invoice->total_ttc; if ($pay=="cash") $payment->paiementid=4; - else if ($pay=="card") $payment->paiementid=6; - else if ($pay=="cheque") $payment->paiementid=7; + elseif ($pay=="card") $payment->paiementid=6; + elseif ($pay=="cheque") $payment->paiementid=7; $payment->num_paiement=$invoice->ref; $payment->create($user); @@ -125,8 +125,7 @@ if ($action == "deleteline") { $invoice->deleteline($idline); $invoice->fetch($placeid); } - else - if ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line + elseif ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC"; $resql = $db->query($sql); $row = $db->fetch_array($resql); diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 83f21a506ea..40726265b01 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -430,7 +430,7 @@ foreach($menus as $menu) { echo '<button type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>'; echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; } - else if ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; + elseif ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; else echo '<button type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; } ?> @@ -442,7 +442,7 @@ foreach($menus as $menu) { while ($count<16) { ?> - <div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; else if ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'> + <div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'> <img class='imgwrapper' <?php if ($count==14) echo 'src="img/arrow-prev-top.png"'; if ($count==15) echo 'src="img/arrow-next-top.png"';?> width="98%" id='catimg<?php echo $count;?>'/> <div class='description'> <div class='description_content' id='catdesc<?php echo $count;?>'></div> diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c5c2e77a4b8..f4799e7b17f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -390,7 +390,7 @@ if (empty($reshook)) { { $object->entity = 0; } - else if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) + elseif (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->entity = 1; // all users in master entity } @@ -1404,11 +1404,11 @@ else { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').$langs->trans("LdapUacf_".$statutUACF); } - else if($userChangePassNextLogon) + elseif($userChangePassNextLogon) { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').'<span class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</span>'; } - else if($userDisabled) + elseif($userDisabled) { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').'<span class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</span>'; } @@ -1460,7 +1460,7 @@ else { print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); } - else if ($object->admin) + elseif ($object->admin) { print $form->textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin"); } @@ -1774,7 +1774,7 @@ else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>'; } - else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2c189ad07d1..f560e2413fa 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -279,7 +279,7 @@ class User extends CommonObject { $sql.= " AND (u.ldap_sid = '".$this->db->escape($sid)."' OR u.login = '".$this->db->escape($login)."') LIMIT 1"; } - else if ($login) + elseif ($login) { $sql.= " AND u.login = '".$this->db->escape($login)."'"; } @@ -538,7 +538,7 @@ class User extends CommonObject $whereforadd="id=".$this->db->escape($rid); // Ajout des droits induits if (! empty($subperms)) $whereforadd.=" OR (module='$module' AND perms='$perms' AND (subperms='lire' OR subperms='read'))"; - else if (! empty($perms)) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + elseif (! empty($perms)) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; } else { // On a pas demande un droit en particulier mais une liste de droits @@ -3187,7 +3187,7 @@ class User extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $user_property = dolGetFirstLastname($obj->firstname, $obj->lastname)." <".$obj->email.">"; - else if ($mode == 'mobile') $user_property = $obj->user_mobile; + elseif ($mode == 'mobile') $user_property = $obj->user_mobile; } return $user_property; } diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index f70f61e2ed6..c490aeddb3f 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -326,7 +326,7 @@ class UserGroup extends CommonObject $whereforadd="id=".$this->db->escape($rid); // Ajout des droits induits if ($subperms) $whereforadd.=" OR (module='$module' AND perms='$perms' AND (subperms='lire' OR subperms='read'))"; - else if ($perms) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + elseif ($perms) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; // Pour compatibilite, si lowid = 0, on est en mode ajout de tout // TODO A virer quand sera gere par l'appelant diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 61c817a4c72..b940e6befe6 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -473,7 +473,7 @@ else print '<td>'; print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar'); - else if ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star'); + elseif ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star'); print '</td>'; print '<td>'.$useringroup->lastname.'</td>'; print '<td>'.$useringroup->firstname.'</td>'; diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 65723b4d65d..f0673966f44 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -121,7 +121,7 @@ foreach($fulltree as $key => $val) { $li.=img_picto($langs->trans("SuperAdministrator"),'redstar'); } - else if ($userstatic->admin) + elseif ($userstatic->admin) { $li.=img_picto($langs->trans("Administrator"),'star'); } diff --git a/htdocs/user/home.php b/htdocs/user/home.php index fb97549e9a1..efb1ba33b78 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -156,7 +156,7 @@ if ($resql) { print img_picto($langs->trans("SuperAdministrator"),'redstar'); } - else if ($obj->admin) + elseif ($obj->admin) { print img_picto($langs->trans("Administrator"),'star'); } diff --git a/htdocs/user/list.php b/htdocs/user/list.php index dcede3a5576..ea8d340e0ae 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -504,7 +504,7 @@ while ($i < min($num,$limit)) { print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); } - else if ($obj->admin) + elseif ($obj->admin) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } @@ -553,7 +553,7 @@ while ($i < min($num,$limit)) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1); } - else if ($obj->ldap_sid) + elseif ($obj->ldap_sid) { print $langs->trans("DomainUser"); } @@ -604,7 +604,7 @@ while ($i < min($num,$limit)) { print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); } - else if ($obj->admin2) + elseif ($obj->admin2) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index c74178609aa..495cd3d913d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -350,7 +350,7 @@ if ($result) print img_picto($langs->trans("Active"),'tick'); print '</td>'; } - else if (in_array($obj->id, $permsuser)) // Permission granted by user + elseif (in_array($obj->id, $permsuser)) // Permission granted by user { if ($caneditperms) { @@ -361,7 +361,7 @@ if ($result) print '</td>'; } - else if (is_array($permsgroupbyentity[$entity])) + elseif (is_array($permsgroupbyentity[$entity])) { if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission granted by group { diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 1e301350063..188ebdf09d2 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -903,7 +903,7 @@ function deleteProductOrService($authentication,$listofidstring) //$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'listofid'=>$listofiddeleted); $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'nbdeleted'=>0); } - else if (count($listofiddeleted) == 0) + elseif (count($listofiddeleted) == 0) { //$objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'listofid'=>$listofiddeleted); $objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'nbdeleted'=>0); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 1433ae5324c..db253adafbf 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -677,7 +677,7 @@ if ($action == 'addcontainer') $error++; $action='createcontainer'; } - else if (! preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) + elseif (! preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) { $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities('WEBSITE_PAGENAME')), null, 'errors'); diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 4063d2f9321..d63f80f459e 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -197,7 +197,7 @@ if ($result >= 0) if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { $fuser->fetch('','',$userKey[0]); // Chargement du user concerné par le SID - } else if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { + } elseif($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { $fuser->fetch('',$userKey[0]); // Chargement du user concerné par le login } diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 320a1f495ad..6da28bc58f8 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -195,7 +195,7 @@ if ($result >= 0) if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { $fuser->fetch('','',$ldapuser[$conf->global->LDAP_KEY_USERS]); // Chargement du user concerné par le SID - } else if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { + } elseif($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { $fuser->fetch('',$ldapuser[$conf->global->LDAP_KEY_USERS]); // Chargement du user concerné par le login } From a6c40dc867562a7bc988ba27eae3d4ed36dd105d Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 11:37:57 +0100 Subject: [PATCH 29/39] fix translations --- .../expensereport/modules_expensereport.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 9ff7f671f9f..89df5dc4855 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -31,7 +31,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Return list of active generation modules + * Return list of active models generation * * @param DoliDB $db Database handler * @param integer $maxfilenamelength Max length of value to show @@ -43,12 +43,12 @@ abstract class ModeleExpenseReport extends CommonDocGenerator global $conf; $type='expensereport'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db,$type,$maxfilenamelength); + $list=getListOfModels($db,$type,$maxfilenamelength); - return $liste; + return $list; } } @@ -57,10 +57,10 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * expensereport_pdf_create * * @param DoliDB $db Database handler - * @param ExpenseReport $object Object order + * @param ExpenseReport $object Object ExpenseReport * @param string $message Message - * @param string $modele Force le modele a utiliser ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param string $modele Force the model to use ('' to not force) + * @param Translate $outputlangs lang object to use for translation * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref @@ -85,9 +85,9 @@ abstract class ModeleNumRefExpenseReport public $error=''; /** - * Return if a module can be used or not + * Return if a model can be used or not * - * @return boolean true if module can be used + * @return boolean true if model can be used */ function isEnabled() { @@ -95,9 +95,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie la description par defaut du modele de numerotation + * Returns the default description of the numbering model * - * @return string Texte descripif + * @return string Descriptive text */ function info() { @@ -107,7 +107,7 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie un exemple de numerotation + * Returns an example of numbering * * @return string Example */ @@ -119,9 +119,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner. + * Test whether the numbers already in force in the base do not cause conflicts that would prevent this numbering from working. * - * @return boolean false si conflit, true si ok + * @return boolean false if conflict, true if ok */ function canBeActivated() { @@ -129,10 +129,10 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie prochaine valeur attribuee + * Returns next assigned value * * @param Object $object Object we need next value for - * @return string Valeur + * @return string Value */ function getNextValue($object) { @@ -141,9 +141,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie version du module numerotation + * Returns the version of the numbering module * - * @return string Valeur + * @return string Value */ function getVersion() { From 95bbb46fdf761cce71ea09d5b7cc3cfab6f771d7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 12:20:24 +0100 Subject: [PATCH 30/39] fix translations --- .../expensereport/mod_expensereport_jade.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 385a7558c4c..4690b64e0b5 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -19,12 +19,12 @@ /** * \file htdocs/core/modules/expensereport/mod_expensereport_jade.php * \ingroup expensereport - * \brief File of class to manage customer order numbering rules Jade + * \brief File of class to manage expensereport numbering rules Jade */ require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php'; /** - * Class to manage customer order numbering rules Jade + * Class to manage expensereport numbering rules Jade */ class mod_expensereport_jade extends ModeleNumRefExpenseReport { @@ -55,7 +55,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Return description of numbering module + * Return description of numbering model * * @return string Text with description */ @@ -67,7 +67,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Renvoi un exemple de numerotation + * Returns an example of numbering * * @return string Example */ @@ -78,8 +78,8 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test si les numeros deje en vigueur dans la base ne provoquent pas de - * de conflits qui empechera cette numerotation de fonctionner. + * Test whether the numbers already in force in the base do not cause conflicts + * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok */ @@ -174,7 +174,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport return $newref; } - // D'abord on recupere la valeur max + // First we get the max value $posindice=8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport"; From 94d3f038eb6dbe5794d56a904cf85c8794f6ee79 Mon Sep 17 00:00:00 2001 From: Xebax <xebax@wanadoo.fr> Date: Sun, 27 Jan 2019 13:20:33 +0100 Subject: [PATCH 31/39] FIX 'statut' is ignored when updating a user with the REST API. --- htdocs/user/class/api_users.class.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index c30cacd72c0..6c5a15cc3cc 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -212,11 +212,22 @@ class Users extends DolibarrApi foreach ($request_data as $field => $value) { - if ($field == 'id') continue; - $this->useraccount->$field = $value; + if ($field == 'id') continue; + // The status must be updated using setstatus() because it + // is not handled by the update() method. + if ($field == 'statut') { + $result = $this->useraccount->setstatus($value); + if ($result < 0) { + throw new RestException(500, 'Error when updating status of user: '.$this->useraccount->error); + } + } else { + $this->useraccount->$field = $value; + } } - if ($this->useraccount->update(DolibarrApiAccess::$user) > 0) + // If there is no error, update() returns the number of affected + // rows so if the update is a no op, the return value is zezo. + if ($this->useraccount->update(DolibarrApiAccess::$user) >= 0) { return $this->get($id); } From 0aa98297f516f2c5d90a5e8439f92679589de4b0 Mon Sep 17 00:00:00 2001 From: Xebax <xebax@wanadoo.fr> Date: Sun, 27 Jan 2019 13:52:08 +0100 Subject: [PATCH 32/39] NEW Get the list of groups of a user with the REST API. --- htdocs/user/class/api_users.class.php | 38 ++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 3b7d7ee5b00..3dff0d02f15 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -17,7 +17,8 @@ use Luracast\Restler\RestException; -//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; /** * API class for users @@ -231,6 +232,41 @@ class Users extends DolibarrApi } } + + /** + * List the groups of a user + * + * @param int $id Id of user + * @return array Array of group objects + * + * @throws RestException + * + * @url GET {id}/groups + */ + function getGroups($id) + { + $obj_ret = array(); + + if (! DolibarrApiAccess::$user->rights->user->user->lire) { + throw new RestException(401); + } + + $user = new User($this->db); + $result = $user->fetch($id); + if( ! $result ) { + throw new RestException(404, 'user not found'); + } + + $usergroup = new UserGroup($this->db); + $groups = $usergroup->listGroupsForUser($id, false); + $obj_ret = array(); + foreach ($groups as $group) { + $obj_ret[] = $this->_cleanObjectDatas($group); + } + return $obj_ret; + } + + /** * Add a user into a group * From ac63a7b6b5ebbb699981fc350a1432900c848360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Sun, 27 Jan 2019 14:30:23 +0100 Subject: [PATCH 33/39] do not trim int, use cast --- htdocs/adherents/type.php | 46 ++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c1ce5c2c294..d24802a6a41 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -105,8 +105,8 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -159,8 +159,8 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -283,9 +283,12 @@ if (! $rowid && $action != 'create' && $action != 'edit') print '<td align="center">'.yn($objp->subscription).'</td>'; print '<td align="center">'.yn($objp->vote).'</td>'; print '<td align="center">'; -if ( !empty($objp->statut) ) print img_picto($langs->trans("InActivity"),'statut4'); -else print img_picto($langs->trans("ActivityCeased"),'statut5'); - print '</td>'; + if ( !empty($objp->statut) ) { + print img_picto($langs->trans("InActivity"),'statut4'); + } else { + print img_picto($langs->trans("ActivityCeased"),'statut5'); + } + print '</td>'; if ($user->rights->adherent->configurer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>'; else @@ -351,7 +354,7 @@ if ($action == 'create') // Other attributes $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + print $hookmanager->resPrint; if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); @@ -405,8 +408,11 @@ if ($rowid > 0) print '<table class="border" width="100%">'; print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>'; - if ( !empty($object->statut) ) print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity"); - else print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased"); + if ( !empty($object->statut) ) { + print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity"); + } else { + print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased"); + } print '</tr>'; print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>'; @@ -444,12 +450,12 @@ if ($rowid > 0) } // Add - if ( $user->rights->adherent->configurer && !empty($object->statut) ) + if ( $user->rights->adherent->configurer && !empty($object->statut) ) { - print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>'; - } else { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>'; - } + print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>'; + } // Delete if ($user->rights->adherent->configurer) @@ -598,8 +604,8 @@ if ($rowid > 0) print '<td align="right" colspan="2" class="liste_titre">'; print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; - print '  '; - print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; + print '  '; + print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; print '</td>'; print "</tr>\n"; @@ -746,10 +752,10 @@ if ($rowid > 0) print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="label" size="40" value="'.dol_escape_htmltag($object->label).'"></td></tr>'; print '<tr><td>'.$langs->trans("Status").'</td><td>'; - print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); - print '</td></tr>'; + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); + print '</td></tr>'; - print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; + print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; print $form->selectyesno("subscription",$object->subscription,1); print '</td></tr>'; From 0e3efadf59ca253740c44f6ef1372dcc54524edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Sun, 27 Jan 2019 14:37:37 +0100 Subject: [PATCH 34/39] typo in fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index d721a4a9254..9dfd7dcf264 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -329,11 +329,11 @@ class ProductFournisseur extends Product if ($resql) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE',$user); + $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE', $user); if ($result < 0) $error++; // End call triggers if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) { - $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code); + $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code); if ($result < 0) { $error++; } From f0cdf300d1299b107f70f089d15a5c3656c52dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic.france@free.fr> Date: Sun, 27 Jan 2019 15:20:16 +0100 Subject: [PATCH 35/39] Squiz.Functions.FunctionDeclarationArgumentSpacing --- dev/setup/codesniffer/ruleset.xml | 11 +- dev/translation/autotranslator.class.php | 8 +- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- .../class/accountancycategory.class.php | 14 +- .../class/accountingaccount.class.php | 6 +- .../class/accountingjournal.class.php | 6 +- .../accountancy/class/bookkeeping.class.php | 22 +- htdocs/adherents/class/adherent.class.php | 32 +-- .../adherents/class/adherent_type.class.php | 10 +- .../adherents/class/adherentstats.class.php | 6 +- htdocs/adherents/class/api_members.class.php | 2 +- htdocs/adherents/class/subscription.class.php | 8 +- htdocs/admin/dict.php | 2 +- .../admin/dolistore/class/dolistore.class.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/website.php | 2 +- htdocs/api/class/api.class.php | 4 +- htdocs/api/class/api_login.class.php | 2 +- htdocs/asset/class/asset.class.php | 6 +- htdocs/asset/class/asset_type.class.php | 8 +- htdocs/blockedlog/class/authority.class.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 12 +- htdocs/cashdesk/class/Facturation.class.php | 32 +-- htdocs/categories/class/categorie.class.php | 26 +-- htdocs/comm/action/class/actioncomm.class.php | 18 +- .../action/class/actioncommreminder.class.php | 4 +- .../comm/action/class/cactioncomm.class.php | 4 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- .../mailing/class/advtargetemailing.class.php | 14 +- .../html.formadvtargetemailing.class.php | 14 +- htdocs/comm/mailing/class/mailing.class.php | 10 +- .../comm/propal/class/api_proposals.class.php | 4 +- htdocs/comm/propal/class/propal.class.php | 68 +++--- .../comm/propal/class/propalestats.class.php | 4 +- htdocs/commande/class/api_orders.class.php | 6 +- htdocs/commande/class/commande.class.php | 62 ++--- htdocs/commande/class/commandestats.class.php | 6 +- htdocs/compta/bank/class/account.class.php | 30 +-- .../bank/class/api_bankaccounts.class.php | 2 +- .../bank/class/paymentvarious.class.php | 10 +- .../cashcontrol/class/cashcontrol.class.php | 6 +- .../deplacement/class/deplacement.class.php | 10 +- .../class/deplacementstats.class.php | 6 +- .../facture/class/api_invoices.class.php | 14 +- .../facture/class/facture-rec.class.php | 24 +- htdocs/compta/facture/class/facture.class.php | 56 ++--- .../facture/class/facturestats.class.php | 6 +- .../facture/class/paymentterm.class.php | 6 +- .../compta/localtax/class/localtax.class.php | 8 +- .../cheque/class/remisecheque.class.php | 14 +- .../compta/paiement/class/paiement.class.php | 26 +-- .../class/bonprelevement.class.php | 24 +- .../class/ligneprelevement.class.php | 4 +- .../class/rejetprelevement.class.php | 4 +- .../salaries/class/paymentsalary.class.php | 10 +- .../salaries/class/salariesstats.class.php | 6 +- .../sociales/class/cchargesociales.class.php | 6 +- .../sociales/class/chargesociales.class.php | 8 +- .../class/paymentsocialcontribution.class.php | 14 +- htdocs/compta/tva/class/tva.class.php | 10 +- htdocs/contact/class/contact.class.php | 14 +- htdocs/contrat/class/api_contracts.class.php | 4 +- htdocs/contrat/class/contrat.class.php | 44 ++-- htdocs/core/ajax/ajaxdirtree.php | 2 +- htdocs/core/boxes/box_actions.php | 6 +- htdocs/core/boxes/box_activity.php | 6 +- htdocs/core/boxes/box_bookmarks.php | 6 +- htdocs/core/boxes/box_clients.php | 6 +- htdocs/core/boxes/box_commandes.php | 6 +- htdocs/core/boxes/box_comptes.php | 6 +- htdocs/core/boxes/box_contacts.php | 6 +- htdocs/core/boxes/box_contracts.php | 6 +- htdocs/core/boxes/box_external_rss.php | 6 +- htdocs/core/boxes/box_factures.php | 6 +- htdocs/core/boxes/box_factures_fourn.php | 6 +- htdocs/core/boxes/box_factures_fourn_imp.php | 6 +- htdocs/core/boxes/box_factures_imp.php | 6 +- htdocs/core/boxes/box_ficheinter.php | 6 +- htdocs/core/boxes/box_fournisseurs.php | 6 +- htdocs/core/boxes/box_goodcustomers.php | 6 +- .../boxes/box_graph_invoices_permonth.php | 6 +- .../box_graph_invoices_supplier_permonth.php | 6 +- .../core/boxes/box_graph_orders_permonth.php | 6 +- .../box_graph_orders_supplier_permonth.php | 6 +- .../boxes/box_graph_product_distribution.php | 6 +- .../boxes/box_graph_propales_permonth.php | 6 +- .../core/boxes/box_last_modified_ticket.php | 2 +- htdocs/core/boxes/box_last_ticket.php | 2 +- htdocs/core/boxes/box_lastlogin.php | 6 +- htdocs/core/boxes/box_members.php | 6 +- htdocs/core/boxes/box_produits.php | 6 +- .../core/boxes/box_produits_alerte_stock.php | 6 +- htdocs/core/boxes/box_project.php | 6 +- htdocs/core/boxes/box_propales.php | 6 +- htdocs/core/boxes/box_prospect.php | 6 +- htdocs/core/boxes/box_services_contracts.php | 6 +- htdocs/core/boxes/box_services_expired.php | 6 +- htdocs/core/boxes/box_supplier_orders.php | 4 +- htdocs/core/boxes/box_task.php | 6 +- htdocs/core/boxes/modules_boxes.php | 6 +- htdocs/core/class/CMailFile.class.php | 8 +- htdocs/core/class/CSMSFile.class.php | 2 +- htdocs/core/class/canvas.class.php | 6 +- htdocs/core/class/ccountry.class.php | 8 +- htdocs/core/class/comment.class.php | 8 +- .../core/class/commondocgenerator.class.php | 18 +- htdocs/core/class/commoninvoice.class.php | 18 +- htdocs/core/class/commonobject.class.php | 108 ++++----- htdocs/core/class/commonobjectline.class.php | 2 +- .../class/commonstickergenerator.class.php | 10 +- htdocs/core/class/coreobject.class.php | 6 +- htdocs/core/class/cstate.class.php | 8 +- htdocs/core/class/ctypent.class.php | 8 +- htdocs/core/class/ctyperesource.class.php | 4 +- htdocs/core/class/discount.class.php | 12 +- htdocs/core/class/doleditor.class.php | 4 +- htdocs/core/class/dolgeoip.class.php | 2 +- htdocs/core/class/dolgraph.class.php | 10 +- htdocs/core/class/dolreceiptprinter.class.php | 4 +- .../core/class/emailsenderprofile.class.php | 8 +- htdocs/core/class/events.class.php | 4 +- htdocs/core/class/extrafields.class.php | 26 +-- htdocs/core/class/fileupload.class.php | 2 +- htdocs/core/class/fiscalyear.class.php | 4 +- htdocs/core/class/google.class.php | 2 +- htdocs/core/class/hookmanager.class.php | 2 +- htdocs/core/class/html.form.class.php | 156 ++++++------- .../core/class/html.formaccounting.class.php | 8 +- htdocs/core/class/html.formactions.class.php | 6 +- htdocs/core/class/html.formadmin.class.php | 8 +- htdocs/core/class/html.formbarcode.class.php | 10 +- htdocs/core/class/html.formcompany.class.php | 26 +-- htdocs/core/class/html.formcontract.class.php | 4 +- htdocs/core/class/html.formcron.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 16 +- .../class/html.formintervention.class.php | 2 +- htdocs/core/class/html.formmail.class.php | 12 +- htdocs/core/class/html.formmailing.class.php | 2 +- htdocs/core/class/html.formmargin.class.php | 4 +- htdocs/core/class/html.formorder.class.php | 4 +- htdocs/core/class/html.formother.class.php | 40 ++-- htdocs/core/class/html.formprojet.class.php | 10 +- htdocs/core/class/html.formpropal.class.php | 2 +- htdocs/core/class/html.formsms.class.php | 2 +- .../class/html.formsocialcontrib.class.php | 2 +- htdocs/core/class/html.formticket.class.php | 8 +- htdocs/core/class/html.formwebsite.class.php | 6 +- htdocs/core/class/infobox.class.php | 4 +- htdocs/core/class/interfaces.class.php | 4 +- htdocs/core/class/ldap.class.php | 20 +- htdocs/core/class/link.class.php | 8 +- htdocs/core/class/menu.class.php | 4 +- htdocs/core/class/menubase.class.php | 8 +- htdocs/core/class/notify.class.php | 6 +- htdocs/core/class/openid.class.php | 8 +- htdocs/core/class/rssparser.class.php | 4 +- htdocs/core/class/smtps.class.php | 12 +- htdocs/core/class/stats.class.php | 16 +- htdocs/core/class/translate.class.php | 24 +- htdocs/core/class/utils.class.php | 8 +- htdocs/core/class/vcard.class.php | 14 +- htdocs/core/datepicker.php | 2 +- htdocs/core/db/Database.interface.php | 2 +- htdocs/core/db/DoliDB.class.php | 12 +- htdocs/core/db/mssql.class.php | 40 ++-- htdocs/core/db/mysqli.class.php | 32 +-- htdocs/core/db/pgsql.class.php | 38 ++-- htdocs/core/db/sqlite3.class.php | 34 +-- .../filemanagerdol/connectors/php/basexml.php | 2 +- .../connectors/php/commands.php | 4 +- .../core/filemanagerdol/connectors/php/io.php | 10 +- .../filemanagerdol/connectors/php/util.php | 8 +- htdocs/core/lib/accounting.lib.php | 2 +- htdocs/core/lib/admin.lib.php | 20 +- htdocs/core/lib/agenda.lib.php | 6 +- htdocs/core/lib/ajax.lib.php | 12 +- htdocs/core/lib/barcode.lib.php | 6 +- htdocs/core/lib/categories.lib.php | 2 +- htdocs/core/lib/company.lib.php | 18 +- htdocs/core/lib/date.lib.php | 22 +- htdocs/core/lib/doc.lib.php | 2 +- htdocs/core/lib/doleditor.lib.php | 2 +- htdocs/core/lib/ecm.lib.php | 2 +- htdocs/core/lib/files.lib.php | 44 ++-- htdocs/core/lib/functions.lib.php | 214 +++++++++--------- htdocs/core/lib/functions2.lib.php | 42 ++-- htdocs/core/lib/functionsnumtoword.lib.php | 4 +- htdocs/core/lib/geturl.lib.php | 2 +- htdocs/core/lib/images.lib.php | 4 +- htdocs/core/lib/import.lib.php | 2 +- htdocs/core/lib/invoice2.lib.php | 2 +- htdocs/core/lib/ldap.lib.php | 4 +- htdocs/core/lib/memory.lib.php | 4 +- htdocs/core/lib/modulebuilder.lib.php | 4 +- htdocs/core/lib/parsemd.lib.php | 2 +- htdocs/core/lib/payments.lib.php | 8 +- htdocs/core/lib/pdf.lib.php | 50 ++-- htdocs/core/lib/price.lib.php | 2 +- htdocs/core/lib/product.lib.php | 4 +- htdocs/core/lib/project.lib.php | 12 +- htdocs/core/lib/report.lib.php | 2 +- htdocs/core/lib/security.lib.php | 14 +- htdocs/core/lib/security2.lib.php | 10 +- htdocs/core/lib/sendings.lib.php | 2 +- htdocs/core/lib/signature.lib.php | 4 +- htdocs/core/lib/tax.lib.php | 4 +- htdocs/core/lib/ticket.lib.php | 2 +- htdocs/core/lib/treeview.lib.php | 4 +- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/core/lib/website.lib.php | 8 +- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/lib/xcal.lib.php | 8 +- htdocs/core/login/functions_dolibarr.php | 2 +- htdocs/core/login/functions_empty.php | 2 +- htdocs/core/login/functions_forceuser.php | 2 +- htdocs/core/login/functions_http.php | 2 +- htdocs/core/login/functions_ldap.php | 2 +- htdocs/core/login/functions_openid.php | 2 +- htdocs/core/menus/standard/auguria.lib.php | 6 +- htdocs/core/menus/standard/auguria_menu.php | 4 +- htdocs/core/menus/standard/eldy.lib.php | 6 +- htdocs/core/menus/standard/eldy_menu.php | 4 +- htdocs/core/menus/standard/empty.php | 4 +- htdocs/core/modules/DolibarrModules.class.php | 12 +- htdocs/core/modules/action/modules_action.php | 4 +- htdocs/core/modules/action/rapport.pdf.php | 2 +- .../core/modules/bank/doc/pdf_ban.modules.php | 6 +- .../bank/doc/pdf_sepamandate.modules.php | 6 +- htdocs/core/modules/bank/modules_bank.php | 2 +- .../barcode/doc/phpbarcode.modules.php | 4 +- .../barcode/doc/tcpdfbarcode.modules.php | 4 +- .../barcode/mod_barcode_product_standard.php | 4 +- .../modules/barcode/modules_barcode.class.php | 4 +- .../modules/cheque/doc/pdf_blochet.class.php | 2 +- .../modules/cheque/mod_chequereceipt_mint.php | 4 +- .../cheque/mod_chequereceipt_thyme.php | 4 +- .../modules/cheque/modules_chequereceipts.php | 4 +- .../doc/doc_generic_order_odt.modules.php | 2 +- .../commande/doc/pdf_einstein.modules.php | 8 +- .../commande/doc/pdf_eratosthene.modules.php | 10 +- .../commande/doc/pdf_proforma.modules.php | 2 +- .../modules/commande/mod_commande_marbre.php | 4 +- .../modules/commande/mod_commande_saphir.php | 4 +- .../modules/commande/modules_commande.php | 4 +- .../doc/doc_generic_contract_odt.modules.php | 2 +- .../contract/doc/pdf_strato.modules.php | 6 +- .../modules/contract/mod_contract_magre.php | 4 +- .../modules/contract/mod_contract_olive.php | 2 +- .../modules/contract/mod_contract_serpis.php | 4 +- .../modules/contract/modules_contract.php | 2 +- .../modules/dons/html_cerfafr.modules.php | 4 +- htdocs/core/modules/dons/modules_don.php | 2 +- .../doc/doc_generic_shipment_odt.modules.php | 2 +- .../expedition/doc/pdf_merou.modules.php | 8 +- .../expedition/doc/pdf_rouget.modules.php | 8 +- .../expedition/mod_expedition_ribera.php | 4 +- .../expedition/mod_expedition_safor.php | 4 +- .../modules/expedition/modules_expedition.php | 2 +- .../doc/pdf_standard.modules.php | 6 +- .../expensereport/modules_expensereport.php | 4 +- .../modules/export/export_csv.modules.php | 6 +- .../modules/export/export_excel.modules.php | 6 +- .../export/export_excelnew.modules.php | 6 +- .../modules/export/export_tsv.modules.php | 6 +- htdocs/core/modules/export/modules_export.php | 2 +- .../doc/doc_generic_invoice_odt.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 6 +- .../facture/doc/pdf_sponge.modules.php | 8 +- .../core/modules/facture/mod_facture_mars.php | 4 +- .../modules/facture/mod_facture_mercure.php | 4 +- .../modules/facture/mod_facture_terre.php | 4 +- .../core/modules/facture/modules_facture.php | 4 +- .../fichinter/doc/pdf_soleil.modules.php | 6 +- htdocs/core/modules/fichinter/mod_arctic.php | 4 +- htdocs/core/modules/fichinter/mod_pacific.php | 4 +- .../modules/fichinter/modules_fichinter.php | 4 +- .../modules/holiday/mod_holiday_madonna.php | 2 +- .../core/modules/holiday/modules_holiday.php | 2 +- .../modules/import/import_csv.modules.php | 8 +- .../modules/import/import_xlsx.modules.php | 8 +- htdocs/core/modules/import/modules_import.php | 2 +- .../livraison/doc/pdf_typhon.modules.php | 6 +- .../modules/livraison/mod_livraison_jade.php | 4 +- .../livraison/mod_livraison_saphir.php | 6 +- .../modules/livraison/modules_livraison.php | 2 +- .../mailings/advthirdparties.modules.php | 6 +- .../modules/mailings/contacts1.modules.php | 2 +- .../core/modules/mailings/example.modules.php | 2 +- .../core/modules/mailings/fraise.modules.php | 2 +- .../core/modules/mailings/pomme.modules.php | 2 +- .../modules/mailings/thirdparties.modules.php | 2 +- .../thirdparties_services_expired.modules.php | 2 +- .../modules/mailings/xinputfile.modules.php | 2 +- .../modules/mailings/xinputuser.modules.php | 2 +- .../modules/member/doc/pdf_standard.class.php | 6 +- htdocs/core/modules/member/modules_cards.php | 4 +- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modApi.class.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modBanque.class.php | 2 +- htdocs/core/modules/modBarcode.class.php | 2 +- htdocs/core/modules/modBlockedLog.class.php | 2 +- htdocs/core/modules/modCashDesk.class.php | 2 +- htdocs/core/modules/modCategorie.class.php | 2 +- htdocs/core/modules/modCommande.class.php | 2 +- htdocs/core/modules/modComptabilite.class.php | 2 +- htdocs/core/modules/modContrat.class.php | 2 +- htdocs/core/modules/modDav.class.php | 2 +- htdocs/core/modules/modDeplacement.class.php | 2 +- .../modules/modDocumentGeneration.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- .../core/modules/modEmailCollector.class.php | 2 +- htdocs/core/modules/modExpedition.class.php | 2 +- .../core/modules/modExpenseReport.class.php | 2 +- htdocs/core/modules/modExternalRss.class.php | 4 +- htdocs/core/modules/modFicheinter.class.php | 2 +- htdocs/core/modules/modFournisseur.class.php | 2 +- htdocs/core/modules/modHRM.class.php | 2 +- htdocs/core/modules/modLabel.class.php | 2 +- htdocs/core/modules/modLoan.class.php | 2 +- htdocs/core/modules/modMailing.class.php | 2 +- htdocs/core/modules/modNotification.class.php | 2 +- htdocs/core/modules/modOauth.class.php | 2 +- htdocs/core/modules/modOpenSurvey.class.php | 2 +- htdocs/core/modules/modPrelevement.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modProductBatch.class.php | 2 +- htdocs/core/modules/modProjet.class.php | 2 +- htdocs/core/modules/modPropale.class.php | 2 +- .../core/modules/modReceiptPrinter.class.php | 2 +- htdocs/core/modules/modReception.class.php | 2 +- htdocs/core/modules/modSalaries.class.php | 2 +- htdocs/core/modules/modService.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/core/modules/modStock.class.php | 2 +- .../modules/modSupplierProposal.class.php | 2 +- htdocs/core/modules/modTakePos.class.php | 2 +- htdocs/core/modules/modTax.class.php | 2 +- htdocs/core/modules/modUser.class.php | 2 +- htdocs/core/modules/modWebsite.class.php | 2 +- htdocs/core/modules/modWorkflow.class.php | 2 +- .../core/modules/payment/mod_payment_ant.php | 4 +- .../modules/payment/mod_payment_cicada.php | 4 +- .../core/modules/payment/modules_payment.php | 2 +- .../modules/printing/modules_printing.php | 2 +- .../modules/printing/printgcp.modules.php | 2 +- .../modules/printing/printipp.modules.php | 2 +- .../doc/pdf_standardlabel.class.php | 6 +- .../printsheet/doc/pdf_tcpdflabel.class.php | 4 +- .../modules/printsheet/modules_labels.php | 4 +- .../doc/doc_generic_product_odt.modules.php | 2 +- .../product/doc/pdf_standard.modules.php | 8 +- .../product/mod_codeproduct_elephant.php | 4 +- .../product/mod_codeproduct_leopard.php | 2 +- .../modules/product/modules_product.class.php | 8 +- .../modules_product_batch.class.php | 2 +- .../doc/doc_generic_project_odt.modules.php | 18 +- .../project/doc/pdf_baleine.modules.php | 6 +- .../project/doc/pdf_beluga.modules.php | 6 +- .../project/doc/pdf_timespent.modules.php | 6 +- .../modules/project/mod_project_simple.php | 2 +- .../modules/project/mod_project_universal.php | 2 +- .../core/modules/project/modules_project.php | 2 +- .../task/doc/doc_generic_task_odt.modules.php | 18 +- .../modules/project/task/mod_task_simple.php | 4 +- .../project/task/mod_task_universal.php | 4 +- .../modules/project/task/modules_task.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 2 +- .../modules/propale/doc/pdf_azur.modules.php | 6 +- .../modules/propale/doc/pdf_cyan.modules.php | 8 +- .../modules/propale/mod_propale_marbre.php | 4 +- .../modules/propale/mod_propale_saphir.php | 2 +- .../core/modules/propale/modules_propale.php | 4 +- .../doc/doc_generic_reception_odt.modules.php | 2 +- .../reception/doc/pdf_squille.modules.php | 8 +- .../modules/reception/mod_reception_beryl.php | 4 +- .../reception/mod_reception_moonstone.php | 4 +- .../modules/reception/modules_reception.php | 2 +- .../societe/doc/doc_generic_odt.modules.php | 2 +- .../societe/mod_codeclient_elephant.php | 6 +- .../societe/mod_codeclient_leopard.php | 2 +- .../modules/societe/mod_codeclient_monkey.php | 6 +- .../societe/mod_codecompta_aquarium.php | 4 +- .../societe/mod_codecompta_panicum.php | 4 +- .../modules/societe/modules_societe.class.php | 16 +- .../doc/doc_generic_stock_odt.modules.php | 2 +- .../stock/doc/pdf_standard.modules.php | 8 +- .../stock/doc/pdf_stdmovement.modules.php | 8 +- .../core/modules/stock/modules_movement.php | 2 +- htdocs/core/modules/stock/modules_stock.php | 2 +- .../mod_facture_fournisseur_cactus.php | 4 +- .../mod_facture_fournisseur_tulip.php | 4 +- .../modules_facturefournisseur.php | 4 +- .../pdf/pdf_canelle.modules.php | 6 +- .../mod_commande_fournisseur_muguet.php | 4 +- .../mod_commande_fournisseur_orchidee.php | 4 +- .../modules_commandefournisseur.php | 2 +- .../pdf/pdf_muscadet.modules.php | 6 +- .../doc/pdf_standard.modules.php | 6 +- .../mod_supplier_payment_brodator.php | 4 +- .../mod_supplier_payment_bronan.php | 4 +- .../modules_supplier_payment.php | 4 +- ..._generic_supplier_proposal_odt.modules.php | 2 +- .../doc/pdf_aurore.modules.php | 6 +- .../mod_supplier_proposal_marbre.php | 4 +- .../mod_supplier_proposal_saphir.php | 2 +- .../modules_supplier_proposal.php | 4 +- .../core/modules/syslog/mod_syslog_file.php | 4 +- .../user/doc/doc_generic_user_odt.modules.php | 4 +- .../core/modules/user/modules_user.class.php | 2 +- .../doc/doc_generic_usergroup_odt.modules.php | 2 +- .../usergroup/modules_usergroup.class.php | 2 +- htdocs/cron/class/cronjob.class.php | 14 +- htdocs/dav/dav.class.php | 2 +- htdocs/don/class/api_donations.class.php | 2 +- htdocs/don/class/don.class.php | 24 +- htdocs/don/class/donstats.class.php | 4 +- htdocs/don/class/paymentdonation.class.php | 14 +- htdocs/ecm/class/ecmdirectory.class.php | 18 +- htdocs/ecm/class/ecmfiles.class.php | 10 +- htdocs/ecm/class/htmlecm.form.class.php | 2 +- .../class/emailcollector.class.php | 8 +- .../class/emailcollectoraction.class.php | 6 +- .../class/emailcollectorfilter.class.php | 6 +- .../expedition/class/api_shipments.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 32 +-- .../class/expeditionbatch.class.php | 4 +- .../class/expeditionstats.class.php | 4 +- .../class/expensereport.class.php | 50 ++-- .../class/expensereport_ik.class.php | 6 +- .../class/expensereport_rule.class.php | 2 +- .../class/expensereportstats.class.php | 6 +- .../class/paymentexpensereport.class.php | 12 +- htdocs/exports/class/export.class.php | 4 +- htdocs/exports/export.php | 2 +- .../class/api_interventions.class.php | 2 +- htdocs/fichinter/class/fichinter.class.php | 28 +-- .../fichinter/class/fichinterstats.class.php | 6 +- .../class/api_supplier_invoices.class.php | 4 +- .../fourn/class/api_supplier_orders.class.php | 4 +- .../class/fournisseur.commande.class.php | 46 ++-- .../fournisseur.commande.dispatch.class.php | 14 +- .../fourn/class/fournisseur.facture.class.php | 34 +-- .../fourn/class/fournisseur.product.class.php | 16 +- htdocs/fourn/class/paiementfourn.class.php | 22 +- htdocs/ftp/index.php | 4 +- htdocs/holiday/class/holiday.class.php | 44 ++-- htdocs/hrm/class/establishment.class.php | 6 +- htdocs/imports/class/import.class.php | 6 +- htdocs/imports/import.php | 4 +- htdocs/index.php | 2 +- htdocs/install/inc.php | 6 +- htdocs/install/step1.php | 4 +- htdocs/install/upgrade2.php | 86 +++---- htdocs/livraison/class/livraison.class.php | 10 +- htdocs/loan/class/loan.class.php | 6 +- htdocs/loan/class/loanschedule.class.php | 4 +- htdocs/loan/class/paymentloan.class.php | 6 +- .../mailmanspip/class/mailmanspip.class.php | 4 +- htdocs/main.inc.php | 18 +- .../template/class/actions_mymodule.class.php | 2 +- .../template/class/myobject.class.php | 8 +- .../mailinglist_mymodule_myobject.modules.php | 2 +- .../core/modules/modMyModule.class.php | 2 +- .../class/multicurrency.class.php | 6 +- .../class/opensurveysondage.class.php | 12 +- htdocs/opensurvey/fonctions.php | 2 +- htdocs/paybox/lib/paybox.lib.php | 2 +- htdocs/paypal/lib/paypal.lib.php | 10 +- .../product/actions_card_product.class.php | 2 +- .../service/actions_card_service.class.php | 4 +- htdocs/product/class/api_products.class.php | 2 +- .../product/class/html.formproduct.class.php | 14 +- htdocs/product/class/product.class.php | 80 +++---- htdocs/product/class/productbatch.class.php | 10 +- .../class/propalmergepdfproduct.class.php | 10 +- .../class/price_expression.class.php | 6 +- .../class/price_global_variable.class.php | 6 +- .../price_global_variable_updater.class.php | 10 +- .../inventory/class/inventory.class.php | 6 +- .../product/inventory/lib/inventory.lib.php | 2 +- htdocs/product/stock/class/entrepot.class.php | 14 +- .../stock/class/mouvementstock.class.php | 16 +- .../product/stock/class/productlot.class.php | 6 +- .../class/productstockentrepot.class.php | 10 +- htdocs/projet/class/api_projects.class.php | 6 +- htdocs/projet/class/api_tasks.class.php | 6 +- htdocs/projet/class/project.class.php | 30 +-- htdocs/projet/class/projectstats.class.php | 10 +- htdocs/projet/class/task.class.php | 36 +-- htdocs/projet/class/taskstats.class.php | 2 +- htdocs/projet/ganttchart.inc.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/reception/class/reception.class.php | 24 +- .../reception/class/receptionstats.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 26 +-- .../class/html.formresource.class.php | 4 +- .../canvas/actions_card_common.class.php | 4 +- .../company/actions_card_company.class.php | 4 +- .../actions_card_individual.class.php | 4 +- htdocs/societe/class/address.class.php | 12 +- .../societe/class/api_thirdparties.class.php | 12 +- htdocs/societe/class/client.class.php | 2 +- .../class/companybankaccount.class.php | 8 +- .../class/companypaymentmode.class.php | 8 +- htdocs/societe/class/societe.class.php | 52 ++--- htdocs/societe/class/societeaccount.class.php | 10 +- htdocs/stripe/class/stripe.class.php | 10 +- htdocs/stripe/lib/stripe.lib.php | 6 +- .../class/supplier_proposal.class.php | 36 +-- htdocs/support/inc.php | 4 +- htdocs/ticket/class/actions_ticket.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 2 +- htdocs/user/class/user.class.php | 50 ++-- htdocs/user/class/userbankaccount.class.php | 6 +- htdocs/user/class/usergroup.class.php | 24 +- htdocs/webservices/server_actioncomm.php | 6 +- htdocs/webservices/server_category.php | 2 +- htdocs/webservices/server_contact.php | 8 +- htdocs/webservices/server_invoice.php | 10 +- htdocs/webservices/server_order.php | 10 +- htdocs/webservices/server_other.php | 2 +- .../webservices/server_productorservice.php | 12 +- htdocs/webservices/server_project.php | 2 +- .../webservices/server_supplier_invoice.php | 4 +- htdocs/webservices/server_thirdparty.php | 10 +- htdocs/webservices/server_user.php | 6 +- htdocs/website/class/website.class.php | 12 +- htdocs/website/class/websitepage.class.php | 10 +- .../email_expire_services_to_customers.php | 2 +- ...ail_expire_services_to_representatives.php | 2 +- scripts/cron/cron_run_jobs.php | 2 +- .../email_unpaid_invoices_to_customers.php | 2 +- ...ail_unpaid_invoices_to_representatives.php | 2 +- test/phpunit/FactureRecTest.php | 2 +- test/phpunit/FactureTest.php | 2 +- test/phpunit/UserTest.php | 2 +- 541 files changed, 2338 insertions(+), 2329 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 879d791b8e9..2f1f0735a26 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -65,7 +65,7 @@ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"> <severity>0</severity> </rule> - + <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> <!-- @@ -191,6 +191,15 @@ <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" /> <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> + <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> + <properties> + <property name="equalsSpacing" value="1"/> + </properties> + </rule> + <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> + <severity>0</severity> + </rule> + <!-- Rules from PEAR Standard --> diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 123b7f6157d..cb70e9541dc 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -50,7 +50,7 @@ class autoTranslator * @param string $_apikey Api key * @return void */ - function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey) + function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey) { // Set enviorment variables @@ -156,7 +156,7 @@ class autoTranslator * @param string $my_destlang Target language code * @return void */ - private function updateTranslationFile($destPath,$file,$my_destlang) + private function updateTranslationFile($destPath, $file, $my_destlang) { $this->_time_end = date('Y-m-d H:i:s'); @@ -183,7 +183,7 @@ class autoTranslator * @param string $my_destlang Target language code * @return void */ - private function createTranslationFile($path,$my_destlang) + private function createTranslationFile($path, $my_destlang) { $fp = fopen($path, 'w+'); fwrite($fp, "/*\n"); @@ -205,7 +205,7 @@ class autoTranslator * @param string $my_destlang Language code (ie: fr_FR) * @return int 0=Nothing translated, 1=Record translated */ - private function translateFileLine($content,$file,$key,$value,$my_destlang) + private function translateFileLine($content, $file, $key, $value, $my_destlang) { //print "key =".$key."\n"; diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e5f1d211f3b..a5b39744e06 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -811,7 +811,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') +function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1f10403f798..80880c7bbb3 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -813,7 +813,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='') +function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form, $mysoc; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 49745676eb3..4611a0ba906 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -696,7 +696,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListJournal($fieldlist, $obj='', $tabname='', $context='') +function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form, $mysoc; diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 5b3282a3b29..70752f6d268 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -142,7 +142,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -239,7 +239,7 @@ class AccountancyCategory // extends CommonObject * @param string $label Label * @return int <0 if KO, >0 if OK */ - function fetch($id, $code='', $label='') + function fetch($id, $code = '', $label = '') { $sql = "SELECT"; $sql.= " t.rowid,"; @@ -299,7 +299,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -726,7 +726,7 @@ class AccountancyCategory // extends CommonObject * @param int $year Specifig year - Can be empty * @return integer <0 if KO, >= 0 if OK */ - public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code='nofilter', $month=0, $year=0) + public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code = 'nofilter', $month = 0, $year = 0) { global $conf; @@ -796,7 +796,7 @@ class AccountancyCategory // extends CommonObject * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @return array|int Array of groups or -1 if error */ - public function getCats($categorytype=-1) + public function getCats($categorytype = -1) { global $conf, $mysoc; @@ -853,7 +853,7 @@ class AccountancyCategory // extends CommonObject * @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts * @return array|int Array of accounting accounts or -1 if error */ - public function getCptsCat($cat_id, $predefinedgroupwhere='') + public function getCptsCat($cat_id, $predefinedgroupwhere = '') { global $conf, $mysoc; $sql = ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 886e19577fb..38f4e49f2a6 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -632,7 +632,7 @@ class AccountingAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -645,7 +645,7 @@ class AccountingAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 9bd21a4a5c4..94cfbf3bd66 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -213,7 +213,7 @@ class AccountingJournal extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0) { global $langs, $conf, $user; @@ -270,7 +270,7 @@ class AccountingJournal extends CommonObject * @param int $mode 0=libelle long, 1=libelle court * @return string Label of type */ - function getLibType($mode=0) + function getLibType($mode = 0) { return $this->LibType($this->nature,$mode); } @@ -283,7 +283,7 @@ class AccountingJournal extends CommonObject * @param int $mode 0=libelle long, 1=libelle court * @return string Label of type */ - function LibType($nature,$mode=0) + function LibType($nature, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 297fe0e3e9c..047628a7b96 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -411,7 +411,7 @@ class BookKeeping extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -470,7 +470,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, Id of created object if OK */ - public function createStd(User $user, $notrigger = false, $mode='') + public function createStd(User $user, $notrigger = false, $mode = '') { global $conf; @@ -641,7 +641,7 @@ class BookKeeping extends CommonObject * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref = null, $mode='') + public function fetch($id, $ref = null, $mode = '') { global $conf; @@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = false, $mode='') + public function update(User $user, $notrigger = false, $mode = '') { $error = 0; @@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return number <0 if KO, >0 if OK */ - public function updateByMvt($piece_num='', $field='', $value='', $mode='') + public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '') { $error=0; @@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger = false, $mode='') + public function delete(User $user, $notrigger = false, $mode = '') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - function deleteByYearAndJournal($delyear='', $journal='', $mode='') + function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '') { global $conf; @@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function fetchPerMvt($piecenum, $mode='') + public function fetchPerMvt($piecenum, $mode = '') { global $conf; @@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return string Next numero to use */ - public function getNextNumMvt($mode='') + public function getNextNumMvt($mode = '') { global $conf; @@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - function fetchAllPerMvt($piecenum, $mode='') + function fetchAllPerMvt($piecenum, $mode = '') { global $conf; @@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject * @param string $piece_num Piece num * @return int int <0 if KO, >0 if OK */ - public function transformTransaction($direction=0,$piece_num='') + public function transformTransaction($direction = 0, $piece_num = '') { $error = 0; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3a698c6b042..ab8fbe8ca06 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -246,7 +246,7 @@ class Adherent extends CommonObject * @param string $moreinheader Add more html headers * @return int <0 if KO, >0 if OK */ - function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='', $moreinheader='') + function send_an_email($text, $subject, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = -1, $errors_to = '', $moreinheader = '') { // phpcs:enable global $conf,$langs; @@ -358,7 +358,7 @@ class Adherent extends CommonObject * @param string $morphy Nature of the adherent (physical or moral) * @return string Label */ - function getmorphylib($morphy='') + function getmorphylib($morphy = '') { global $langs; if (! $morphy) { $morphy=$this->morphy; } @@ -374,7 +374,7 @@ class Adherent extends CommonObject * @param int $notrigger 1 ne declenche pas les triggers, 0 sinon * @return int <0 if KO, >0 if OK */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; @@ -500,7 +500,7 @@ class Adherent extends CommonObject * @param string $action Current action for hookmanager * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update') + function update($user, $notrigger = 0, $nosyncuser = 0, $nosyncuserpass = 0, $nosyncthirdparty = 0, $action = 'update') { global $conf, $langs, $hookmanager; @@ -817,7 +817,7 @@ class Adherent extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, 0=nothing to do, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { global $conf, $langs; @@ -927,7 +927,7 @@ class Adherent extends CommonObject * @param int $nosyncuser Do not synchronize linked user * @return string If OK return clear password, 0 if no change, < 0 if error */ - function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0) + function setPassword($user, $password = '', $isencrypted = 0, $notrigger = 0, $nosyncuser = 0) { global $conf, $langs; @@ -1147,7 +1147,7 @@ class Adherent extends CommonObject * @param string $lastname Lastname * @return void */ - function fetch_name($firstname,$lastname) + function fetch_name($firstname, $lastname) { // phpcs:enable global $conf; @@ -1183,7 +1183,7 @@ class Adherent extends CommonObject * @param bool $fetch_subscriptions To load member subscriptions * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetch_subscriptions=true) + function fetch($rowid, $ref = '', $fk_soc = '', $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) { global $langs; @@ -1400,7 +1400,7 @@ class Adherent extends CommonObject * @param int $datesubend Date end subscription * @return int rowid of record added, <0 if KO */ - function subscription($date, $amount, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0) + function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0) { global $conf,$langs,$user; @@ -1486,7 +1486,7 @@ class Adherent extends CommonObject * @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice. * @return int <0 if KO, >0 if OK */ - function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0) + function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom = '', $emetteur_banque = '', $autocreatethirdparty = 0) { global $conf, $langs, $user, $mysoc; @@ -2018,7 +2018,7 @@ class Adherent extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -2109,7 +2109,7 @@ class Adherent extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode); } @@ -2124,7 +2124,7 @@ class Adherent extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) + function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0) { // phpcs:enable global $langs; @@ -2307,7 +2307,7 @@ class Adherent extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2400,7 +2400,7 @@ class Adherent extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -2694,7 +2694,7 @@ class Adherent extends CommonObject * @param string $daysbeforeendlist Nb of days before end of subscription (negative number = after subscription). Can be a list of delay, separated by a semicolon, for example '10;5;0;-5' * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - public function sendReminderForExpiredSubscription($daysbeforeendlist='10') + public function sendReminderForExpiredSubscription($daysbeforeendlist = '10') { global $conf, $langs, $mysoc, $user; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 984cf49d44d..263012df782 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -103,7 +103,7 @@ class AdherentType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -170,7 +170,7 @@ class AdherentType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $conf, $hookmanager; @@ -356,7 +356,7 @@ class AdherentType extends CommonObject * 2=Return array of members id only * @return mixed Array of members or -1 on error */ - function listMembersForMemberType($excludefilter='', $mode=0) + function listMembersForMemberType($excludefilter = '', $mode = 0) { global $conf, $user; @@ -411,7 +411,7 @@ class AdherentType extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0) { global $langs; @@ -449,7 +449,7 @@ class AdherentType extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 310a40c52b3..f5ef24fb465 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -52,7 +52,7 @@ class AdherentStats extends Stats * @param int $socid Id third party * @param int $userid Id user for filter */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $user, $conf; @@ -85,7 +85,7 @@ class AdherentStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of nb each month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -126,7 +126,7 @@ class AdherentStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of amount each month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 2da35df7e2c..a728ffe78d3 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -361,7 +361,7 @@ class Members extends DolibarrApi * * @url POST {id}/subscriptions */ - function createSubscription($id, $start_date, $end_date, $amount, $label='') + function createSubscription($id, $start_date, $end_date, $amount, $label = '') { if(! DolibarrApiAccess::$user->rights->adherent->cotisation->creer) { throw new RestException(401); diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 96876eb82b6..319dbb1f75b 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -207,7 +207,7 @@ $type=$this->fk_type; * @param int $notrigger 0=Disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { $error = 0; @@ -263,7 +263,7 @@ $type=$this->fk_type; * @param bool $notrigger false=launch triggers after, true=disable triggers * @return int <0 if KO, 0 if not found, >0 if OK */ - function delete($user, $notrigger=false) + function delete($user, $notrigger = false) { $error = 0; @@ -356,7 +356,7 @@ $type=$this->fk_type; * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1) { global $langs; @@ -395,7 +395,7 @@ $type=$this->fk_type; * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fc3b8f15f39..df61d33092a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1755,7 +1755,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return string '' or value of entity into table */ -function fieldList($fieldlist, $obj='', $tabname='', $context='') +function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db,$mysoc; global $form; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 553ce2e54e0..e676423e6b0 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -54,7 +54,7 @@ class Dolistore * * @param boolean $debug Enable debug of request on screen */ - function __construct($debug=false) + function __construct($debug = false) { global $conf, $langs; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index da31a794374..a6b2e89cc1a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -947,7 +947,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldList($fieldlist, $obj='', $tabname='', $context='') +function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf, $langs, $user, $db; global $form; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index e36b8d59df3..e4cc568ea03 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -659,7 +659,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='') +function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6d6ef4578cd..10341ce170c 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -46,7 +46,7 @@ class DolibarrApi * @param string $cachedir Cache dir * @param boolean $refreshCache Update cache */ - function __construct($db, $cachedir='', $refreshCache=false) + function __construct($db, $cachedir = '', $refreshCache = false) { global $conf, $dolibarr_main_url_root; @@ -222,7 +222,7 @@ class DolibarrApi * @return bool * @throws RestException */ - static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + static function _checkAccessToResource($resource, $resource_id = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { // Features/modules to check diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 86d1cfff87c..01b0fdd56da 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -55,7 +55,7 @@ class Login * @url GET / * @url POST / */ - public function index($login, $password, $entity='', $reset=0) + public function index($login, $password, $entity = '', $reset = 0) { global $conf, $dolibarr_main_authentication, $dolibarr_auto_user; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 335a9f6e9d1..93f2e88f725 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -312,7 +312,7 @@ class Asset extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -369,7 +369,7 @@ class Asset extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -382,7 +382,7 @@ class Asset extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 51d76d75155..54421b8910f 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -89,7 +89,7 @@ class AssetType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -166,7 +166,7 @@ class AssetType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $conf, $hookmanager; @@ -350,7 +350,7 @@ class AssetType extends CommonObject * 2=Return array of asset id only * @return mixed Array of asset or -1 on error */ - function listAssetForAssetType($excludefilter='', $mode=0) + function listAssetForAssetType($excludefilter = '', $mode = 0) { global $conf, $user; @@ -405,7 +405,7 @@ class AssetType extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0) { global $langs; diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 0d0fc183b6c..c200bd4d9e5 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -142,7 +142,7 @@ class BlockedLogAuthority * @param string $signature Signature of object to load * @return int >0 if OK, <0 if KO, 0 if not found */ - public function fetch($id, $signature='') + public function fetch($id, $signature = '') { global $langs; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index bc65c72260d..25c95e2346c 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -725,7 +725,7 @@ class BlockedLog * @param string $mode 0=unserialize, 1=json_decode * @return string Value unserialized */ - public function dolDecodeBlockedData($data, $mode=0) + public function dolDecodeBlockedData($data, $mode = 0) { try { @@ -763,7 +763,7 @@ class BlockedLog * @param int $forcesignature Force signature (for example '0000000000' when we disabled the module) * @return int <0 if KO, >0 if OK */ - public function create($user, $forcesignature='') + public function create($user, $forcesignature = '') { global $conf,$langs,$hookmanager; @@ -878,7 +878,7 @@ class BlockedLog * @param string $previoushash If previous signature hash is known, we can provide it to avoid to make a search of it in database. * @return boolean True if OK, False if KO */ - public function checkSignature($previoushash='') + public function checkSignature($previoushash = '') { if (empty($previoushash)) { @@ -921,7 +921,7 @@ class BlockedLog * @param int $beforeid ID of a record * @return string Hash of previous record (if beforeid is defined) or hash of last record (if beforeid is 0) */ - public function getPreviousHash($withlock=0, $beforeid=0) + public function getPreviousHash($withlock = 0, $beforeid = 0) { global $conf; @@ -972,7 +972,7 @@ class BlockedLog * @param string $search_code search code * @return array|int Array of object log or <0 if error */ - public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref='', $search_amount='', $search_code='') + public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref = '', $search_amount = '', $search_code = '') { global $conf, $cachedlogs; @@ -1070,7 +1070,7 @@ class BlockedLog * @param int $ignoresystem Ignore system events for the test * @return bool */ - function alreadyUsed($ignoresystem=0) + function alreadyUsed($ignoresystem = 0) { global $conf; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index ea6ac7a47bd..dca01ea667e 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -283,7 +283,7 @@ class Facturation * @param int $aId Id * @return id */ - public function id($aId=null) + public function id($aId = null) { if ( !$aId ) @@ -308,7 +308,7 @@ class Facturation * @param string $aRef Ref * @return string Ref */ - public function ref($aRef=null) + public function ref($aRef = null) { if (is_null($aRef)) @@ -331,7 +331,7 @@ class Facturation * @param int $aQte Qty * @return int Qty */ - public function qte($aQte=null) + public function qte($aQte = null) { if (is_null($aQte)) { @@ -354,7 +354,7 @@ class Facturation * @param string $aStock Stock * @return string Stock */ - public function stock($aStock=null) + public function stock($aStock = null) { if (is_null($aStock)) @@ -377,7 +377,7 @@ class Facturation * @param string $aRemisePercent Discount * @return string Discount */ - public function remisePercent($aRemisePercent=null) + public function remisePercent($aRemisePercent = null) { if (is_null($aRemisePercent)) @@ -400,7 +400,7 @@ class Facturation * @param int $aMontantRemise Amount * @return string Amount */ - public function montantRemise($aMontantRemise=null) + public function montantRemise($aMontantRemise = null) { if (is_null($aMontantRemise)) { @@ -421,7 +421,7 @@ class Facturation * @param int $aPrix Price * @return string Stock */ - public function prix($aPrix=null) + public function prix($aPrix = null) { if (is_null($aPrix)) { @@ -442,7 +442,7 @@ class Facturation * @param int $aTva Vat * @return int Vat */ - public function tva($aTva=null) + public function tva($aTva = null) { if (is_null($aTva)) { @@ -462,7 +462,7 @@ class Facturation * @param string $aNumFacture Invoice ref * @return string Invoice ref */ - public function numInvoice($aNumFacture=null) + public function numInvoice($aNumFacture = null) { if (is_null($aNumFacture)) { @@ -482,7 +482,7 @@ class Facturation * @param int $aModeReglement Payment mode * @return int Payment mode */ - public function getSetPaymentMode($aModeReglement=null) + public function getSetPaymentMode($aModeReglement = null) { if (is_null($aModeReglement)) { @@ -503,7 +503,7 @@ class Facturation * @param int $aMontantEncaisse Amount * @return int Amount */ - public function montantEncaisse($aMontantEncaisse=null) + public function montantEncaisse($aMontantEncaisse = null) { if (is_null($aMontantEncaisse)) { @@ -524,7 +524,7 @@ class Facturation * @param int $aMontantRendu Amount * @return int Amount */ - public function montantRendu($aMontantRendu=null) + public function montantRendu($aMontantRendu = null) { if (is_null($aMontantRendu)) { @@ -545,7 +545,7 @@ class Facturation * @param date $aPaiementLe Date * @return date Date */ - public function paiementLe($aPaiementLe=null) + public function paiementLe($aPaiementLe = null) { if (is_null($aPaiementLe)) { @@ -565,7 +565,7 @@ class Facturation * @param int $aTotalHt Total amount * @return int Total amount */ - public function prixTotalHt($aTotalHt=null) + public function prixTotalHt($aTotalHt = null) { if (is_null($aTotalHt)) { @@ -585,7 +585,7 @@ class Facturation * @param int $aMontantTva Amount vat * @return int Amount vat */ - public function montantTva($aMontantTva=null) + public function montantTva($aMontantTva = null) { if (is_null($aMontantTva)) { @@ -605,7 +605,7 @@ class Facturation * @param int $aTotalTtc Amount ttc * @return int Amount ttc */ - public function prixTotalTtc($aTotalTtc=null) + public function prixTotalTtc($aTotalTtc = null) { if (is_null($aTotalTtc)) { diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index e4d95d490ed..138c5f154fa 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -234,7 +234,7 @@ class Categorie extends CommonObject * @param string $type Type of category ('product', '...') or (0, 1, ...) * @return int <0 if KO, >0 if OK */ - function fetch($id, $label='', $type=null) + function fetch($id, $label = '', $type = null) { global $conf; @@ -501,7 +501,7 @@ class Categorie extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 KO >0 OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; @@ -691,7 +691,7 @@ class Categorie extends CommonObject * * @return int 1 if OK, -1 if KO */ - function del_type($obj,$type) + function del_type($obj, $type) { // phpcs:enable global $user,$langs,$conf; @@ -749,7 +749,7 @@ class Categorie extends CommonObject * @return array|int -1 if KO, array of instance of object if OK * @see containsObject */ - function getObjectsInCateg($type, $onlyids=0) + function getObjectsInCateg($type, $onlyids = 0) { $objs = array(); @@ -821,7 +821,7 @@ class Categorie extends CommonObject * @param int $page Page number * @return array|int Array of categories, 0 if no cat, -1 on error */ - function getListForItem($id, $type='customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) + function getListForItem($id, $type = 'customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) { global $conf; @@ -990,7 +990,7 @@ class Categorie extends CommonObject * * @return array|int Array of categories. this->cats and this->motherof are set, -1 on error */ - function get_full_arbo($type, $markafterid=0) + function get_full_arbo($type, $markafterid = 0) { // phpcs:enable global $conf, $langs; @@ -1076,7 +1076,7 @@ class Categorie extends CommonObject * @param int $protection Deep counter to avoid infinite loop * @return void */ - function build_path_from_id_categ($id_categ,$protection=1000) + function build_path_from_id_categ($id_categ, $protection = 1000) { // phpcs:enable dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); @@ -1143,7 +1143,7 @@ class Categorie extends CommonObject * @param boolean $parent Just parent categories if true * @return array|int Table of Object Category, -1 on error */ - function get_all_categories($type=null, $parent=false) + function get_all_categories($type = null, $parent = false) { // phpcs:enable if (! is_numeric($type)) $type = $this->MAP_ID[$type]; @@ -1232,7 +1232,7 @@ class Categorie extends CommonObject * @param int $type Type of category (0, 1, ...) * @return array */ - function get_main_categories($type=null) + function get_main_categories($type = null) { // phpcs:enable return $this->get_all_categories($type, true); @@ -1248,7 +1248,7 @@ class Categorie extends CommonObject * @param int $nocolor 0 * @return array */ - function print_all_ways($sep = " >> ", $url='', $nocolor=0) + function print_all_ways($sep = " >> ", $url = '', $nocolor = 0) { // phpcs:enable $ways = array(); @@ -1376,7 +1376,7 @@ class Categorie extends CommonObject * labels, 'id'= Get array of category IDs * @return array|int Array of category objects or < 0 if KO */ - function containing($id, $type, $mode='object') + function containing($id, $type, $mode = 'object') { $cats = array(); @@ -1522,7 +1522,7 @@ class Categorie extends CommonObject * @param int $maxlength Max length of text * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='',$maxlength=0) + function getNomUrl($withpicto = 0, $option = '', $maxlength = 0) { global $langs; @@ -1608,7 +1608,7 @@ class Categorie extends CommonObject * @param int $nbmax Nombre maximum de photos (0=pas de max) * @return array Tableau de photos */ - function liste_photos($dir,$nbmax=0) + function liste_photos($dir, $nbmax = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 05d5fa43c86..949639341da 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -566,7 +566,7 @@ class ActionComm extends CommonObject * @param string $ref_ext Ref ext to get * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='',$ref_ext='') + function fetch($id, $ref = '', $ref_ext = '') { global $langs; @@ -761,7 +761,7 @@ class ActionComm extends CommonObject * @param int $notrigger 1 = disable triggers, 0 = enable triggers * @return int <0 if KO, >0 if OK */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $user,$langs,$conf; @@ -838,7 +838,7 @@ class ActionComm extends CommonObject * @param int $notrigger 1 = disable triggers, 0 = enable triggers * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $langs,$conf,$hookmanager; @@ -999,7 +999,7 @@ class ActionComm extends CommonObject * @param string $limit Limit number of answers * @return array or string Error string if KO, array with actions if OK */ - static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='a.datep', $sortorder='DESC', $limit=0) + static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) { global $conf, $langs; @@ -1051,7 +1051,7 @@ class ActionComm extends CommonObject * @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user, $load_state_board=0) + function load_board($user, $load_state_board = 0) { // phpcs:enable global $conf, $langs; @@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject * @param int $hidenastatus 1=Show nothing if status is "Not applicable" * @return string String with status */ - function getLibStatut($mode,$hidenastatus=0) + function getLibStatut($mode, $hidenastatus = 0) { return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep); } @@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject * @param int $datestart Date start of event * @return string Label */ - function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') + function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') { // phpcs:enable global $langs; @@ -1257,7 +1257,7 @@ class ActionComm extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user, $hookmanager, $action; @@ -1391,7 +1391,7 @@ class ActionComm extends CommonObject * @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) * @return int <0 if error, nb of events in new file if ok */ - function build_exportfile($format,$type,$cachedelay,$filename,$filters) + function build_exportfile($format, $type, $cachedelay, $filename, $filters) { // phpcs:enable global $conf,$langs,$dolibarr_main_url_root,$mysoc; diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 6631d0e375d..4d5536e50fc 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -178,7 +178,7 @@ class ActionCommReminder extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -191,7 +191,7 @@ class ActionCommReminder extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index d6c25f6d4c1..8efb6ab0515 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -130,7 +130,7 @@ class CActionComm * @param int $shortlabel 1=Get short label instead of long label * @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. */ - function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0) + function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0) { // phpcs:enable global $langs,$conf; @@ -223,7 +223,7 @@ class CActionComm * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Picto only * @return string Label of action type */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a73731699f2..3d062298f53 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1277,7 +1277,7 @@ $db->close(); * @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button" * @return void */ -function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0) +function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0) { global $user, $conf, $langs; global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 67a4534ca14..0c2f3f95c4f 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -757,7 +757,7 @@ $db->close(); * @param bool $var true or false for alternat style on tr/td * @return void */ -function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) +function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false) { global $db; global $user, $conf, $langs, $hookmanager, $action; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 9e2a7278a27..6271a9a3880 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -905,7 +905,7 @@ $db->close(); * @param bool $var true or false for alternat style on tr/td * @return void */ -function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) +function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false) { global $db; global $user, $conf, $langs, $hookmanager, $action; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 83833304d44..2f88cb2dd9c 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -108,7 +108,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -260,7 +260,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $id Id object * @return int <0 if KO, >0 if OK */ - function fetch_by_mailing($id=0) + function fetch_by_mailing($id = 0) { // phpcs:enable global $langs; @@ -327,7 +327,7 @@ class AdvanceTargetingMailing extends CommonObject * @param string $type_element Type target * @return int <0 if KO, >0 if OK */ - function fetch_by_element($id=0, $type_element='mailing') + function fetch_by_element($id = 0, $type_element = 'mailing') { // phpcs:enable global $langs; @@ -390,7 +390,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -466,7 +466,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -525,7 +525,7 @@ class AdvanceTargetingMailing extends CommonObject * @param array $arrayquery All element to Query * @return int <0 if KO, >0 if OK */ - function savequery($user,$arrayquery) + function savequery($user, $arrayquery) { global $langs,$conf; @@ -946,7 +946,7 @@ class AdvanceTargetingMailing extends CommonObject * For exemple jean;joe;jim%%;!jimo;!jima%> will target all jean, joe, start with jim but not jimo and not everythnig taht start by jima * @return string Sql to use for the where condition */ - public function transformToSQL($column_to_test,$criteria) + public function transformToSQL($column_to_test, $criteria) { $return_sql_criteria = '('; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 19b1ce3e9b4..369c0536a33 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -92,7 +92,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array or Code or Label of preselected country * @return string HTML string with select */ - function multiselectCountry($htmlname = 'country_id', $selected_array=array()) + function multiselectCountry($htmlname = 'country_id', $selected_array = array()) { global $conf, $langs; @@ -194,7 +194,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array selected array * @return string combo list code */ - function multiselectselectLanguage($htmlname='', $selected_array=array()) + function multiselectselectLanguage($htmlname = '', $selected_array = array()) { global $conf,$langs; @@ -290,7 +290,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array Array * @return string HTML combo */ - function multiselectCivility($htmlname='civilite_id',$selected_array = array()) + function multiselectCivility($htmlname = 'civilite_id', $selected_array = array()) { global $conf,$langs,$user; $langs->load("dict"); @@ -356,7 +356,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array value selected * @return string HTML combo */ - function multiselectCustomerCategories($htmlname='cust_cat',$selected_array = array()) + function multiselectCustomerCategories($htmlname = 'cust_cat', $selected_array = array()) { return $this->multiselectCategories($htmlname,$selected_array,2); } @@ -368,7 +368,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array value selected * @return string HTML combo */ - function multiselectContactCategories($htmlname='contact_cat',$selected_array = array()) + function multiselectContactCategories($htmlname = 'contact_cat', $selected_array = array()) { return $this->multiselectCategories($htmlname,$selected_array,4); } @@ -381,7 +381,7 @@ class FormAdvTargetEmailing extends Form * @param int $type Type * @return string HTML combo */ - public function multiselectCategories($htmlname='',$selected_array = array(), $type=0) + public function multiselectCategories($htmlname = '', $selected_array = array(), $type = 0) { global $conf,$langs,$user; $langs->load("dict"); @@ -427,7 +427,7 @@ class FormAdvTargetEmailing extends Form * @param string $type_element Type element. Example: 'mailing' * @return string HTML combo */ - public function selectAdvtargetemailingTemplate($htmlname='template_id', $selected=0, $showempty=0, $type_element='mailing') + public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing') { global $conf, $user, $langs; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index b807ea23334..7e1073a0f2a 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -271,7 +271,7 @@ class Mailing extends CommonObject * @param int $option2 Not used * @return int New id of clone */ - function createFromClone($fromid,$option1,$option2) + function createFromClone($fromid, $option1, $option2) { global $user,$langs; @@ -536,7 +536,7 @@ class Mailing extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -607,7 +607,7 @@ class Mailing extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -620,7 +620,7 @@ class Mailing extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -670,7 +670,7 @@ class Mailing extends CommonObject * @param strin $desc Desc error * @return string Label */ - public static function libStatutDest($statut,$mode=0,$desc='') + public static function libStatutDest($statut, $mode = 0, $desc = '') { global $langs; $langs->load('mails'); diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index a03624f3122..6ce38f8c432 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -559,7 +559,7 @@ class Proposals extends DolibarrApi * * @return array */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); @@ -607,7 +607,7 @@ class Proposals extends DolibarrApi * * @return array */ - function close($id, $status, $note_private='', $notrigger=0) + function close($id, $status, $note_private = '', $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 55dd950abf2..d1d3fb086bd 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -239,7 +239,7 @@ class Propal extends CommonObject * @param int $socid Id third party * @param int $propalid Id proposal */ - function __construct($db, $socid="", $propalid=0) + function __construct($db, $socid = "", $propalid = 0) { global $conf,$langs; @@ -267,7 +267,7 @@ class Propal extends CommonObject * TODO Replace calls to this function by generation objet Ligne * inserted into table $this->products */ - function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent = 0) { // phpcs:enable global $conf, $mysoc; @@ -434,7 +434,7 @@ class Propal extends CommonObject * @return int >0 if OK, <0 if KO * @see add_product */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise=0, $fk_remise_except=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $fk_remise_except = 0) { global $mysoc, $conf, $langs; @@ -663,7 +663,7 @@ class Propal extends CommonObject * @param int $notrigger disable line update trigger * @return int 0 if OK, <0 if KO */ - function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $mysoc; @@ -869,7 +869,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$hookmanager; $error=0; @@ -1216,7 +1216,7 @@ class Propal extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$conf,$hookmanager; @@ -1340,7 +1340,7 @@ class Propal extends CommonObject * @param string $ref Ref of proposal * @return int >0 if OK, <0 if KO */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; @@ -1504,7 +1504,7 @@ class Propal extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -1599,7 +1599,7 @@ class Propal extends CommonObject * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable $this->lines=array(); @@ -1718,7 +1718,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @return int <0 if KO, 0=Nothing done, >=0 if OK */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1842,7 +1842,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date($user, $date, $notrigger=0) + function set_date($user, $date, $notrigger = 0) { // phpcs:enable if (empty($date)) @@ -1911,7 +1911,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_echeance($user, $date_fin_validite, $notrigger=0) + function set_echeance($user, $date_fin_validite, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -1973,7 +1973,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -2035,7 +2035,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_availability($user, $id, $notrigger=0) + function set_availability($user, $id, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2106,7 +2106,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_demand_reason($user, $id, $notrigger=0) + function set_demand_reason($user, $id, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2179,7 +2179,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_ref_client($user, $ref_client, $notrigger=0) + function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -2244,7 +2244,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise_percent($user, $remise, $notrigger=0) + function set_remise_percent($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2311,7 +2311,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2380,7 +2380,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $statut, $note='', $notrigger=0) + function reopen($user, $statut, $note = '', $notrigger = 0) { $this->statut = $statut; @@ -2441,7 +2441,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function cloture($user, $statut, $note="", $notrigger=0) + function cloture($user, $statut, $note = "", $notrigger = 0) { global $langs,$conf; @@ -2544,7 +2544,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function classifyBilled(User $user, $notrigger=0) + function classifyBilled(User $user, $notrigger = 0) { $error=0; @@ -2600,7 +2600,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_draft($user, $notrigger=0) + function set_draft($user, $notrigger = 0) { // phpcs:enable $error=0; @@ -2665,7 +2665,7 @@ class Propal extends CommonObject * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datep', $sortorder = 'DESC') { // phpcs:enable global $user; @@ -2833,7 +2833,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2957,7 +2957,7 @@ class Propal extends CommonObject * @return int >0 if OK, <0 if KO * @deprecated use set_availability */ - function availability($availability_id, $notrigger=0) + function availability($availability_id, $notrigger = 0) { global $user; @@ -3028,7 +3028,7 @@ class Propal extends CommonObject * @return int >0 si ok, <0 si ko * @deprecated use set_demand_reason */ - function demand_reason($demand_reason_id, $notrigger=0) + function demand_reason($demand_reason_id, $notrigger = 0) { // phpcs:enable global $user; @@ -3153,7 +3153,7 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode); } @@ -3166,7 +3166,7 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=1) + function LibStatut($statut, $mode = 1) { // phpcs:enable global $conf; @@ -3213,7 +3213,7 @@ class Propal extends CommonObject * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $langs; @@ -3495,7 +3495,7 @@ class Propal extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; @@ -3585,7 +3585,7 @@ class Propal extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -3854,7 +3854,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0) + function insert($notrigger = 0) { global $conf,$user; @@ -3997,7 +3997,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { global $conf; @@ -4051,7 +4051,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function update($notrigger=0) + function update($notrigger = 0) { global $conf,$user; diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index bdd4a9dfba2..4286bb17448 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -56,7 +56,7 @@ class PropaleStats extends Stats * @param int $userid Id user for filter (creation user) * @param string $mode Option ('customer', 'supplier') */ - function __construct($db, $socid=0, $userid=0, $mode='customer') + function __construct($db, $socid = 0, $userid = 0, $mode = 'customer') { global $user, $conf; @@ -106,7 +106,7 @@ class PropaleStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 1135a5c2502..c531948f4cd 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -496,7 +496,7 @@ class Orders extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); @@ -629,7 +629,7 @@ class Orders extends DolibarrApi * * @return int */ - function close($id, $notrigger=0) + function close($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); @@ -675,7 +675,7 @@ class Orders extends DolibarrApi * * @return array */ - function settodraft($id, $idwarehouse=-1) + function settodraft($id, $idwarehouse = -1) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8934e293973..894f9c5c687 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -313,7 +313,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if OK, 0=Nothing done, >0 if KO */ - function valid($user, $idwarehouse=0, $notrigger=0) + function valid($user, $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -474,7 +474,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @return int <0 if KO, >0 if OK */ - function set_draft($user, $idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { //phpcs:enable global $conf,$langs; @@ -617,7 +617,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function cloture($user, $notrigger=0) + function cloture($user, $notrigger = 0) { global $conf; @@ -677,7 +677,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function cancel($idwarehouse=-1) + function cancel($idwarehouse = -1) { global $conf,$user,$langs; @@ -758,7 +758,7 @@ class Commande extends CommonOrder * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; $error=0; @@ -1060,7 +1060,7 @@ class Commande extends CommonOrder * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager; @@ -1302,7 +1302,7 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0) { global $mysoc, $conf, $langs, $user; @@ -1531,7 +1531,7 @@ class Commande extends CommonOrder * TODO Remplacer les appels a cette fonction par generation objet Ligne * insere dans tableau $this->products */ - function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='') + function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '') { // phpcs:enable global $conf, $mysoc; @@ -1616,7 +1616,7 @@ class Commande extends CommonOrder * @param string $ref_int Internal reference of other object * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { // Check parameters @@ -1845,7 +1845,7 @@ class Commande extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable $this->lines=array(); @@ -2027,7 +2027,7 @@ class Commande extends CommonOrder * @param int $filtre_statut Filter on shipment status * @return int <0 if KO, Nb of lines found if OK */ - function loadExpeditions($filtre_statut=-1) + function loadExpeditions($filtre_statut = -1) { $this->expeditions = array(); @@ -2103,7 +2103,7 @@ class Commande extends CommonOrder * * TODO FONCTION NON FINIE A FINIR */ - function stock_array($filtre_statut=self::STATUS_CANCELED) + function stock_array($filtre_statut = self::STATUS_CANCELED) { // phpcs:enable $this->stocks = array(); @@ -2143,7 +2143,7 @@ class Commande extends CommonOrder * @param int $lineid Id of line to delete * @return int >0 if OK, 0 if nothing to do, <0 if KO */ - function deleteline($user=null, $lineid=0) + function deleteline($user = null, $lineid = 0) { if ($this->statut == self::STATUS_DRAFT) { @@ -2221,7 +2221,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise($user, $remise, $notrigger=0) + function set_remise($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2289,7 +2289,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2357,7 +2357,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date($user, $date, $notrigger=0) + function set_date($user, $date, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2423,7 +2423,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2494,7 +2494,7 @@ class Commande extends CommonOrder * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') { // phpcs:enable global $user; @@ -2562,7 +2562,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if OK, <0 if KO */ - function availability($availability_id, $notrigger=0) + function availability($availability_id, $notrigger = 0) { global $user; @@ -2633,7 +2633,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if ok, <0 if ko */ - function demand_reason($demand_reason_id, $notrigger=0) + function demand_reason($demand_reason_id, $notrigger = 0) { // phpcs:enable global $user; @@ -2706,7 +2706,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_ref_client($user, $ref_client, $notrigger=0) + function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2769,7 +2769,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function classifyBilled(User $user, $notrigger=0) + function classifyBilled(User $user, $notrigger = 0) { $error = 0; @@ -2904,7 +2904,7 @@ class Commande extends CommonOrder * @param int $notrigger disable line update trigger * @return int < 0 if KO, > 0 if OK */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $conf, $mysoc, $langs, $user; @@ -3094,7 +3094,7 @@ class Commande extends CommonOrder * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -3189,7 +3189,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -3408,7 +3408,7 @@ class Commande extends CommonOrder * @param int $donotshowbilled Do not show billed status after order status * @return string Label of status */ - function LibStatut($statut,$billed,$mode,$donotshowbilled=0) + function LibStatut($statut, $billed, $mode, $donotshowbilled = 0) { // phpcs:enable global $langs, $conf; @@ -3501,7 +3501,7 @@ class Commande extends CommonOrder * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -3782,7 +3782,7 @@ class Commande extends CommonOrder * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -4022,7 +4022,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 si ko, >0 si ok */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { global $conf, $langs; @@ -4083,7 +4083,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, >0 if OK */ - function insert($user=null, $notrigger=0) + function insert($user = null, $notrigger = 0) { global $langs, $conf; @@ -4228,7 +4228,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 si ko, >0 si ok */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf,$langs; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 3c6ec07c6cb..edd072854d3 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -55,7 +55,7 @@ class CommandeStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -101,7 +101,7 @@ class CommandeStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -144,7 +144,7 @@ class CommandeStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 80a0c6f819b..cb00e201bc6 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -352,7 +352,7 @@ class Account extends CommonObject * @param string $type To search using type * @return array|int Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error */ - function get_url($fk_bank='', $url_id='', $type='') + function get_url($fk_bank = '', $url_id = '', $type = '') { // phpcs:enable $lines = array(); @@ -417,7 +417,7 @@ class Account extends CommonObject * @param int $datev Date value * @return int Rowid of added entry, <0 if KO */ - function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur='',$banque='', $accountancycode='', $datev=null) + function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur = '', $banque = '', $accountancycode = '', $datev = null) { // Deprecation warning if (is_numeric($oper)) { @@ -525,7 +525,7 @@ class Account extends CommonObject * @param int $notrigger 1=Disable triggers * @return int < 0 if KO, > 0 if OK */ - function create(User $user, $notrigger=0) + function create(User $user, $notrigger = 0) { global $langs,$conf, $hookmanager; @@ -860,7 +860,7 @@ class Account extends CommonObject * @param string $ref Ref of bank account to get * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -1076,7 +1076,7 @@ class Account extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->clos,$mode); } @@ -1163,7 +1163,7 @@ class Account extends CommonObject * @param int $option 1=Exclude future operation date (this is to exclude input made in advance and have real account sold) * @return int Current sold (value date <= today) */ - function solde($option=0) + function solde($option = 0) { $solde=0; @@ -1329,7 +1329,7 @@ class Account extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $user; @@ -1549,7 +1549,7 @@ class Account extends CommonObject * @return array * @see useDetailedBBAN */ - public function getFieldsToShow($includeibanbic=0) + public function getFieldsToShow($includeibanbic = 0) { //Get the required properties depending on the country $detailedBBAN = $this->useDetailedBBAN(); @@ -1765,7 +1765,7 @@ class AccountLine extends CommonObject * @param string $num External num to load (ex: num of transaction for paypal fee) * @return int <0 if KO, 0 if OK but not found, >0 if OK and found */ - function fetch($rowid,$ref='',$num='') + function fetch($rowid, $ref = '', $num = '') { global $conf; @@ -2011,7 +2011,7 @@ class AccountLine extends CommonObject * @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated * @return int <0 if KO, >0 if OK */ - function update_conciliation(User $user, $cat, $conciliated=1) + function update_conciliation(User $user, $cat, $conciliated = 1) { // phpcs:enable global $conf,$langs; @@ -2075,7 +2075,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ - function datev_change($rowid,$sign=1) + function datev_change($rowid, $sign = 1) { // phpcs:enable $sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2142,7 +2142,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ - function dateo_change($rowid,$sign=1) + function dateo_change($rowid, $sign = 1) { // phpcs:enable $sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2257,7 +2257,7 @@ class AccountLine extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0,$option='',$notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0) { global $langs; @@ -2298,7 +2298,7 @@ class AccountLine extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -2311,7 +2311,7 @@ class AccountLine extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index ffe01f41e7a..feaaccaa50f 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -325,7 +325,7 @@ class BankAccounts extends DolibarrApi * * @url POST {id}/lines */ - function addLine($id, $date, $type, $label, $amount, $category=0, $cheque_number='', $cheque_writer='', $cheque_bank='') + function addLine($id, $date, $type, $label, $amount, $category = 0, $cheque_number = '', $cheque_writer = '', $cheque_bank = '') { if (! DolibarrApiAccess::$user->rights->banque->modifier) { throw new RestException(401); diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 47edacb2410..cb8f21ecc5a 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -111,7 +111,7 @@ class PaymentVarious extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -181,7 +181,7 @@ class PaymentVarious extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -505,7 +505,7 @@ class PaymentVarious extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -518,7 +518,7 @@ class PaymentVarious extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -567,7 +567,7 @@ class PaymentVarious extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $save_lastsearch_value = -1, $notooltip = 0) { global $db, $conf, $langs, $hookmanager; global $langs; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index d0a10ec94da..946658208df 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -295,7 +295,7 @@ class CashControl extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -308,7 +308,7 @@ class CashControl extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) @@ -364,7 +364,7 @@ class CashControl extends CommonObject * @param int $notooltip No tooltip * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 2c21c2694ae..60108eed794 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -245,7 +245,7 @@ class Deplacement extends CommonObject * @param string $ref Ref of record * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; @@ -316,7 +316,7 @@ class Deplacement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -329,7 +329,7 @@ class Deplacement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -374,7 +374,7 @@ class Deplacement extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @return string Chaine avec URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; @@ -400,7 +400,7 @@ class Deplacement extends CommonObject * @param int $active Active or not * @return array */ - function listOfTypes($active=1) + function listOfTypes($active = 1) { global $langs; diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index ae93eb094d9..542fe49e503 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -50,7 +50,7 @@ class DeplacementStats extends Stats * @param mixed $userid Id user for filter or array of user ids * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf; @@ -96,7 +96,7 @@ class DeplacementStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(dated) as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -118,7 +118,7 @@ class DeplacementStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(dated,'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 04c2bedeb41..e145ed477aa 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -104,7 +104,7 @@ class Invoices extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -600,7 +600,7 @@ class Invoices extends DolibarrApi * @throws 500 * */ - function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger=0) + function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -650,7 +650,7 @@ class Invoices extends DolibarrApi * @throws 500 * */ - function settodraft($id, $idwarehouse=-1) + function settodraft($id, $idwarehouse = -1) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -702,7 +702,7 @@ class Invoices extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -753,7 +753,7 @@ class Invoices extends DolibarrApi * @throws 404 * @throws 500 */ - function settopaid($id, $close_code='', $close_note='') + function settopaid($id, $close_code = '', $close_note = '') { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -994,7 +994,7 @@ class Invoices extends DolibarrApi * @throws 401 * @throws 404 */ - function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') + function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; @@ -1114,7 +1114,7 @@ class Invoices extends DolibarrApi * @throws 403 * @throws 404 */ - function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') + function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5090132632e..39df40cc260 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -321,7 +321,7 @@ class FactureRec extends CommonInvoice * @param int $ref_int Internal reference of other object * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='') + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '') { $sql = 'SELECT f.rowid, f.entity, f.titre, f.suspended, f.fk_soc, f.amount, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc'; $sql.= ', f.remise_percent, f.remise_absolue, f.remise'; @@ -573,7 +573,7 @@ class FactureRec extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0, $idwarehouse=-1) + function delete(User $user, $notrigger = 0, $idwarehouse = -1) { $rowid=$this->id; @@ -644,7 +644,7 @@ class FactureRec extends CommonInvoice * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise=0, $date_start_fill=0, $date_end_fill=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $date_start_fill = 0, $date_end_fill = 0) { global $mysoc; @@ -826,7 +826,7 @@ class FactureRec extends CommonInvoice * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise = 0, $notrigger=0, $date_start_fill=0, $date_end_fill=0) + function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $date_start_fill = 0, $date_end_fill = 0) { global $mysoc; @@ -1002,7 +1002,7 @@ class FactureRec extends CommonInvoice * @param int $forcevalidation 1=Force validation of invoice whatever is template auto_validate flag. * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function createRecurringInvoices($restrictioninvoiceid=0, $forcevalidation=0) + function createRecurringInvoices($restrictioninvoiceid = 0, $forcevalidation = 0) { global $conf, $langs, $db, $user, $hookmanager; @@ -1159,7 +1159,7 @@ class FactureRec extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip='',$save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1) { global $langs; @@ -1210,7 +1210,7 @@ class FactureRec extends CommonInvoice * @param integer $alreadypaid Not used on recurring invoices * @return string Label of status */ - function getLibStatut($mode=0, $alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->frequency?1:0, $this->suspended, $mode, $alreadypaid, empty($this->type)?0:$this->type); @@ -1227,7 +1227,7 @@ class FactureRec extends CommonInvoice * @param int $type Type invoice * @return string Label of status */ - function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0) + function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0) { // phpcs:enable global $langs; @@ -1328,7 +1328,7 @@ class FactureRec extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1480,7 +1480,7 @@ class FactureRec extends CommonInvoice * @param string $unit unit of frequency (d, m, y) * @return int <0 if KO, >0 if OK */ - function setFrequencyAndUnit($frequency,$unit) + function setFrequencyAndUnit($frequency, $unit) { if (! $this->table_element) { @@ -1523,7 +1523,7 @@ class FactureRec extends CommonInvoice * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done * @return int <0 if KO, >0 if OK */ - function setNextDate($date, $increment_nb_gen_done=0) + function setNextDate($date, $increment_nb_gen_done = 0) { if (! $this->table_element) { @@ -1823,7 +1823,7 @@ class FactureLigneRec extends CommonInvoiceLine * @param int $notrigger No trigger * @return int <0 if KO, Id of line if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3e4335774c9..bc689118426 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -289,7 +289,7 @@ class Facture extends CommonInvoice * @param int $forceduedate 1=Do not recalculate due date from payment condition but force it with value * @return int <0 if KO, >0 if OK */ - function create(User $user, $notrigger=0, $forceduedate=0) + function create(User $user, $notrigger = 0, $forceduedate = 0) { global $langs,$conf,$mysoc,$hookmanager; $error=0; @@ -854,7 +854,7 @@ class Facture extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int <0 if KO, >0 if OK */ - function createFromCurrent(User $user, $invertdetail=0) + function createFromCurrent(User $user, $invertdetail = 0) { global $conf; @@ -945,7 +945,7 @@ class Facture extends CommonInvoice * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager, $conf; @@ -1162,7 +1162,7 @@ class Facture extends CommonInvoice * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { global $dolibarr_main_url_root; @@ -1193,7 +1193,7 @@ class Facture extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $moretitle='', $notooltip=0, $addlinktonotes=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user, $form; @@ -1301,7 +1301,7 @@ class Facture extends CommonInvoice * @param bool $fetch_situation Fetch the previous and next situation in $tab_previous_situation_invoice and $tab_next_situation_invoice * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $fetch_situation=false) + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $fetch_situation = false) { global $conf; @@ -1604,7 +1604,7 @@ class Facture extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -1819,7 +1819,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_ref_client($ref_client, $notrigger=0) + function set_ref_client($ref_client, $notrigger = 0) { // phpcs:enable global $user; @@ -1884,7 +1884,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, 0=Refused, >0 if OK */ - function delete($user, $notrigger=0, $idwarehouse=-1) + function delete($user, $notrigger = 0, $idwarehouse = -1) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2058,7 +2058,7 @@ class Facture extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @return int <0 if KO, >0 if OK */ - function set_paid($user, $close_code='', $close_note='') + function set_paid($user, $close_code = '', $close_note = '') { // phpcs:enable $error=0; @@ -2168,7 +2168,7 @@ class Facture extends CommonInvoice * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ - function set_canceled($user, $close_code='', $close_note='') + function set_canceled($user, $close_code = '', $close_note = '') { // phpcs:enable @@ -2231,7 +2231,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK */ - function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) + function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2529,7 +2529,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function set_draft($user,$idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; @@ -2649,7 +2649,7 @@ class Facture extends CommonInvoice * @param double $pu_ht_devise Unit price in currency * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id=0, $fk_unit = null, $pu_ht_devise = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = 0, $fk_remise_except = '', $price_base_type = 'HT', $pu_ttc = 0, $type = self::TYPE_STANDARD, $rang = -1, $special_code = 0, $origin = '', $origin_id = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $situation_percent = 100, $fk_prev_id = 0, $fk_unit = null, $pu_ht_devise = 0) { // Deprecation warning if ($label) { @@ -2879,7 +2879,7 @@ class Facture extends CommonInvoice * @param int $notrigger disable line update trigger * @return int < 0 if KO, > 0 if OK */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $conf,$user; // Deprecation warning @@ -3197,7 +3197,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise($user, $remise, $notrigger=0) + function set_remise($user, $remise, $notrigger = 0) { // phpcs:enable // Clean parameters @@ -3263,7 +3263,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable if (empty($remise)) $remise=0; @@ -3330,7 +3330,7 @@ class Facture extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $langs; $langs->load("bills"); @@ -3472,7 +3472,7 @@ class Facture extends CommonInvoice * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') { // phpcs:enable global $conf,$user; @@ -3543,7 +3543,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ - function list_replacable_invoices($socid=0) + function list_replacable_invoices($socid = 0) { // phpcs:enable global $conf; @@ -3593,7 +3593,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) */ - function list_qualified_avoir_invoices($socid=0) + function list_qualified_avoir_invoices($socid = 0) { // phpcs:enable global $conf; @@ -3668,7 +3668,7 @@ class Facture extends CommonInvoice * @param float $amount Amount we request direct debit for * @return int <0 if KO, >0 if OK */ - function demande_prelevement($fuser, $amount=0) + function demande_prelevement($fuser, $amount = 0) { // phpcs:enable @@ -3894,7 +3894,7 @@ class Facture extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $langs; @@ -4110,7 +4110,7 @@ class Facture extends CommonInvoice * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -4215,7 +4215,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setFinal(User $user, $notrigger=0) + function setFinal(User $user, $notrigger = 0) { $error=0; @@ -4512,7 +4512,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0, $noerrorifdiscountalreadylinked=0) + function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) { global $langs,$user,$conf; @@ -4729,7 +4729,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function update($user='',$notrigger=0) + function update($user = '', $notrigger = 0) { global $user,$conf; @@ -4945,7 +4945,7 @@ class FactureLigne extends CommonInvoiceLine * @param bool $include_credit_note Include credit note or not * @return int >= 0 */ - function get_prev_progress($invoiceid, $include_credit_note=true) + function get_prev_progress($invoiceid, $include_credit_note = true) { // phpcs:enable if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 4cf9477613e..ea065d81636 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -53,7 +53,7 @@ class FactureStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -100,7 +100,7 @@ class FactureStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -145,7 +145,7 @@ class FactureStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 55a3e40b55f..3d4f0881de2 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -82,7 +82,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -268,7 +268,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -345,7 +345,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 49c95c26c2e..d80b9cc4783 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -163,7 +163,7 @@ class Localtax extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; @@ -628,7 +628,7 @@ class Localtax extends CommonObject * @param string $option Sur quoi pointe le lien * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; @@ -652,7 +652,7 @@ class Localtax extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -665,7 +665,7 @@ class Localtax extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status, $mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 28973d3c4e2..34dd599f35a 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject * @param string $ref Ref record * @return int <0 if KO, > 0 if OK */ - function fetch($id,$ref='') + function fetch($id, $ref = '') { global $conf; @@ -299,7 +299,7 @@ class RemiseCheque extends CommonObject * @param User $user Utilisateur qui effectue l'operation * @return int */ - function delete($user='') + function delete($user = '') { global $conf; @@ -416,7 +416,7 @@ class RemiseCheque extends CommonObject * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($mode='next') + function getNextNumRef($mode = 'next') { global $conf, $db, $langs, $mysoc; $langs->load("bills"); @@ -988,7 +988,7 @@ class RemiseCheque extends CommonObject * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1013,7 +1013,7 @@ class RemiseCheque extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -1064,7 +1064,7 @@ class RemiseCheque extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1077,7 +1077,7 @@ class RemiseCheque extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c4cb529d895..4e729e9c37b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -157,7 +157,7 @@ class Paiement extends CommonObject * @param int $fk_bank Id of bank line associated to payment * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref='', $fk_bank='') + public function fetch($id, $ref = '', $fk_bank = '') { $sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank,'; $sql.= ' c.code as type_code, c.libelle as type_libelle,'; @@ -224,7 +224,7 @@ class Paiement extends CommonObject * @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more * @return int id of created payment, < 0 if error */ - function create($user, $closepaidinvoices=0) + function create($user, $closepaidinvoices = 0) { global $conf, $langs; @@ -488,7 +488,7 @@ class Paiement extends CommonObject * @param int $notrigger No trigger * @return int <0 si ko, >0 si ok */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $user, $langs; @@ -598,7 +598,7 @@ class Paiement extends CommonObject * @param int $notrigger No trigger * @return int <0 if KO, bank_line_id if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque,$notrigger=0) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque, $notrigger = 0) { global $conf,$langs,$user; @@ -897,7 +897,7 @@ class Paiement extends CommonObject * @param User $user User making validation * @return int <0 if KO, >0 if OK */ - function valide(User $user=null) + function valide(User $user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id; @@ -921,7 +921,7 @@ class Paiement extends CommonObject * @param User $user User making reject * @return int <0 if KO, >0 if OK */ - function reject(User $user=null) + function reject(User $user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 2 WHERE rowid = '.$this->id; @@ -989,7 +989,7 @@ class Paiement extends CommonObject * @param string $filter Critere de filtre * @return array Tableau des id de factures */ - function getBillsArray($filter='') + function getBillsArray($filter = '') { $sql = 'SELECT fk_facture'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'facture as f'; @@ -1027,7 +1027,7 @@ class Paiement extends CommonObject * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $db, $langs; $langs->load("bills"); @@ -1138,7 +1138,7 @@ class Paiement extends CommonObject * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1164,7 +1164,7 @@ class Paiement extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0) { global $conf, $langs; @@ -1222,7 +1222,7 @@ class Paiement extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1235,7 +1235,7 @@ class Paiement extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage @@ -1286,7 +1286,7 @@ class Paiement extends CommonObject * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3f7dd23059d..f39ed254df3 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -81,7 +81,7 @@ class BonPrelevement extends CommonObject * @param DoliDB $db Database handler * @param string $filename Filename of withdraw receipt */ - function __construct($db, $filename='') + function __construct($db, $filename = '') { global $conf,$langs; @@ -276,7 +276,7 @@ class BonPrelevement extends CommonObject * @param string $ref Ref of direct debit * @return int >0 if OK, <0 if KO */ - function fetch($rowid, $ref='') + function fetch($rowid, $ref = '') { global $conf; @@ -630,7 +630,7 @@ class BonPrelevement extends CommonObject * @param int $amounts If you want to get the amount of the order for each invoice * @return array Id of invoices */ - private function getListInvoices($amounts=0) + private function getListInvoices($amounts = 0) { global $conf; @@ -731,7 +731,7 @@ class BonPrelevement extends CommonObject * @param int $agence dolibarr mysoc agence * @return int <O if KO, number of invoices if OK */ - function NbFactureAPrelever($banque=0,$agence=0) + function NbFactureAPrelever($banque = 0, $agence = 0) { // phpcs:enable global $conf; @@ -777,7 +777,7 @@ class BonPrelevement extends CommonObject * @param string $executiondate Date to execute the transfer * @return int <0 if KO, nbre of invoice withdrawed if OK */ - function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='') + function Create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '') { // phpcs:enable global $conf,$langs; @@ -1138,7 +1138,7 @@ class BonPrelevement extends CommonObject * @param User $user Object user that delete * @return int >0 if OK, <0 if KO */ - function delete($user=null) + function delete($user = null) { $this->db->begin(); @@ -1178,7 +1178,7 @@ class BonPrelevement extends CommonObject * @param string $option link target * @return string URL of target */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; @@ -1299,7 +1299,7 @@ class BonPrelevement extends CommonObject * @param string $executiondate Date to execute transfer * @return int 0 if OK, <0 if KO */ - function generate($format='ALL',$executiondate='') + function generate($format = 'ALL', $executiondate = '') { global $conf,$langs,$mysoc; @@ -1493,7 +1493,7 @@ class BonPrelevement extends CommonObject * @param string $rib_dom rib domiciliation * @return void */ - function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom='') + function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '') { // phpcs:enable fputs($this->file, "06"); @@ -1726,7 +1726,7 @@ class BonPrelevement extends CommonObject * @param string $format FRST or RCUR or ALL * @return string String with SEPA Sender */ - function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST') + function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST') { // phpcs:enable // SEPA INITIALISATION @@ -1905,7 +1905,7 @@ class BonPrelevement extends CommonObject * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1918,7 +1918,7 @@ class BonPrelevement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable if (empty($this->labelstatut)) diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 7e100022c7a..d47eb32504a 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -123,7 +123,7 @@ class LignePrelevement * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -136,7 +136,7 @@ class LignePrelevement * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 4797121a24c..46b4242944b 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -82,7 +82,7 @@ class RejetPrelevement * @param int $facturation Facturation * @return void */ - function create($user, $id, $motif, $date_rejet, $bonid, $facturation=0) + function create($user, $id, $motif, $date_rejet, $bonid, $facturation = 0) { global $langs,$conf; @@ -282,7 +282,7 @@ class RejetPrelevement * @return array Array List of invoices related to the withdrawal line * @TODO A withdrawal line is today linked to one and only one invoice. So the function should return only one object ? */ - private function getListInvoices($amounts=0) + private function getListInvoices($amounts = 0) { global $conf; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 76a8284daff..8f55b5804cc 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -108,7 +108,7 @@ class PaymentSalary extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -189,7 +189,7 @@ class PaymentSalary extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -544,7 +544,7 @@ class PaymentSalary extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -652,7 +652,7 @@ class PaymentSalary extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -665,7 +665,7 @@ class PaymentSalary extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 82a8d094148..0c91ee29309 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -49,7 +49,7 @@ class SalariesStats extends Stats * @param mixed $userid Id user for filter or array of user ids * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf; @@ -94,7 +94,7 @@ class SalariesStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(datep) as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -116,7 +116,7 @@ class SalariesStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(datep,'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 9e13ffcd8a5..f7c829294f8 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -404,7 +404,7 @@ class Cchargesociales * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -438,7 +438,7 @@ class Cchargesociales * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -451,7 +451,7 @@ class Cchargesociales * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index cca5a4d7dd2..1828e750914 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -93,7 +93,7 @@ class ChargeSociales extends CommonObject * @param string $ref Ref * @return int <0 KO >0 OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { $sql = "SELECT cs.rowid, cs.date_ech"; $sql.= ", cs.libelle as lib, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key"; @@ -419,7 +419,7 @@ class ChargeSociales extends CommonObject * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function getLibStatut($mode=0,$alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paye,$mode,$alreadypaid); } @@ -433,7 +433,7 @@ class ChargeSociales extends CommonObject * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function LibStatut($statut,$mode=0,$alreadypaid=-1) + function LibStatut($statut, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -491,7 +491,7 @@ class ChargeSociales extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with link */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $short = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user, $form; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 74ddce68230..bd678904df6 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -104,7 +104,7 @@ class PaymentSocialContribution extends CommonObject * @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more * @return int <0 if KO, id of payment if OK */ - function create($user, $closepaidcontrib=0) + function create($user, $closepaidcontrib = 0) { global $conf, $langs; @@ -292,7 +292,7 @@ class PaymentSocialContribution extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class PaymentSocialContribution extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -540,7 +540,7 @@ class PaymentSocialContribution extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $conf; @@ -656,7 +656,7 @@ class PaymentSocialContribution extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -669,7 +669,7 @@ class PaymentSocialContribution extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage @@ -720,7 +720,7 @@ class PaymentSocialContribution extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 33d48de8bfc..5da7b0e144c 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -173,7 +173,7 @@ class Tva extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; @@ -241,7 +241,7 @@ class Tva extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -687,7 +687,7 @@ class Tva extends CommonObject * @param string $morecss More CSS * @return string Chaine with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '') { global $langs, $conf; @@ -813,7 +813,7 @@ class Tva extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -826,7 +826,7 @@ class Tva extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index a5297750386..d5b5afa4433 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -313,7 +313,7 @@ class Contact extends CommonObject * @param int $nosyncuser No sync linked user (external users and contacts are linked) * @return int <0 if KO, >0 if OK */ - function update($id, $user=null, $notrigger=0, $action='update', $nosyncuser=0) + function update($id, $user = null, $notrigger = 0, $action = 'update', $nosyncuser = 0) { global $conf, $langs, $hookmanager; @@ -501,7 +501,7 @@ class Contact extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -597,7 +597,7 @@ class Contact extends CommonObject * @param int $notrigger 0=no, 1=yes * @return int <0 if KO, >=0 if OK */ - function update_perso($id, $user=null, $notrigger=0) + function update_perso($id, $user = null, $notrigger = 0) { // phpcs:enable $error=0; @@ -686,7 +686,7 @@ class Contact extends CommonObject * @param string $email Email * @return int -1 if KO, 0 if OK but not found, 1 if OK */ - function fetch($id, $user=null, $ref_ext='', $email='') + function fetch($id, $user = null, $ref_ext = '', $email = '') { global $langs; @@ -931,7 +931,7 @@ class Contact extends CommonObject * @param int $notrigger Disable all trigger * @return int <0 if KO, >0 if OK */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $langs, $user; @@ -1124,7 +1124,7 @@ class Contact extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; @@ -1231,7 +1231,7 @@ class Contact extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 585d5399771..8631becc515 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -555,7 +555,7 @@ class Contracts extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if (! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); @@ -601,7 +601,7 @@ class Contracts extends DolibarrApi * "notrigger": 0 * } */ - function close($id, $notrigger=0) + function close($id, $notrigger = 0) { if (! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 5929ec034d1..5dce6cb4bd4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -261,7 +261,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ - function active_line($user, $line_id, $date, $date_end='', $comment='') + function active_line($user, $line_id, $date, $date_end = '', $comment = '') { // phpcs:enable $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); @@ -284,7 +284,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ - function close_line($user, $line_id, $date_end, $comment='') + function close_line($user, $line_id, $date_end, $comment = '') { // phpcs:enable $result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); @@ -307,7 +307,7 @@ class Contrat extends CommonObject * @return int <0 if KO, >0 if OK * @see closeAll */ - function activateAll($user, $date_start='', $notrigger=0, $comment='') + function activateAll($user, $date_start = '', $notrigger = 0, $comment = '') { if (empty($date_start)) $date_start = dol_now(); @@ -363,7 +363,7 @@ class Contrat extends CommonObject * @return int <0 if KO, >0 if OK * @see activateAll */ - function closeAll(User $user, $notrigger=0, $comment='') + function closeAll(User $user, $notrigger = 0, $comment = '') { $this->db->begin(); @@ -419,7 +419,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function validate(User $user, $force_number='', $notrigger=0) + function validate(User $user, $force_number = '', $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $langs, $conf; @@ -547,7 +547,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $notrigger=0) + function reopen($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $langs, $conf; @@ -614,7 +614,7 @@ class Contrat extends CommonObject * @param string $ref_supplier Supplier ref * @return int <0 if KO, 0 if not found, Id of contract if OK */ - function fetch($id, $ref='', $ref_customer='', $ref_supplier='') + function fetch($id, $ref = '', $ref_customer = '', $ref_supplier = '') { $sql = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,"; $sql.= " ref_supplier, ref_customer,"; @@ -1242,7 +1242,7 @@ class Contrat extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1360,7 +1360,7 @@ class Contrat extends CommonObject * @param string $rang Position * @return int <0 if KO, >0 if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null, $rang=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null, $rang = 0) { global $user, $langs, $conf, $mysoc; $error=0; @@ -1570,7 +1570,7 @@ class Contrat extends CommonObject * @param string $fk_unit Code of the unit to use. Null to use the default one * @return int < 0 si erreur, > 0 si ok */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx = 0.0, $localtax2tx = 0.0, $date_debut_reel = '', $date_fin_reel = '', $price_base_type = 'HT', $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null) { global $user, $conf, $langs, $mysoc; @@ -1840,7 +1840,7 @@ class Contrat extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @return string Label */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1909,7 +1909,7 @@ class Contrat extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $maxlength=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -2022,7 +2022,7 @@ class Contrat extends CommonObject * @param int $statut Status of lines to get * @return array Array of line's rowid */ - function array_detail($statut=-1) + function array_detail($statut = -1) { // phpcs:enable $tab=array(); @@ -2059,7 +2059,7 @@ class Contrat extends CommonObject * @param string $option 'all' or 'others' * @return array Array of contracts id */ - function getListOfContracts($option='all') + function getListOfContracts($option = 'all') { $tab=array(); @@ -2100,7 +2100,7 @@ class Contrat extends CommonObject * @param string $mode "inactive" pour services a activer, "expired" pour services expires * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $langs; @@ -2336,7 +2336,7 @@ class Contrat extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2382,7 +2382,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int New id of clone */ - function createFromClone($socid = 0, $notrigger=0) + function createFromClone($socid = 0, $notrigger = 0) { global $db, $user, $langs, $conf, $hookmanager, $extrafields; @@ -2658,7 +2658,7 @@ class ContratLigne extends CommonObjectLine * @param string $moreatt More attribute * @return string Libelle */ - static function LibStatut($statut,$mode,$expired=-1,$moreatt='') + static function LibStatut($statut, $mode, $expired = -1, $moreatt = '') { // phpcs:enable global $langs; @@ -2720,7 +2720,7 @@ class ContratLigne extends CommonObjectLine * @param int $maxlength Max length * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlength=0) + function getNomUrl($withpicto = 0, $maxlength = 0) { global $langs; @@ -2747,7 +2747,7 @@ class ContratLigne extends CommonObjectLine * @param string $ref Ref of contract * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { // Check parameters @@ -2879,7 +2879,7 @@ class ContratLigne extends CommonObjectLine * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs, $mysoc; @@ -3257,7 +3257,7 @@ class ContratLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function close_line($user, $date_end, $comment = '', $notrigger=0) + function close_line($user, $date_end, $comment = '', $notrigger = 0) { // phpcs:enable global $langs, $conf; diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index d90a3f5f316..1e4dde7e0a4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -337,7 +337,7 @@ if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close(); * @param int $depth Depth * @return void */ -function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth=0) +function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth = 0) { global $conf, $db, $langs, $form; global $dolibarr_main_data_root; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index aea85fd111e..55804430113 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -54,7 +54,7 @@ class box_actions extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user; @@ -69,7 +69,7 @@ class box_actions extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -189,7 +189,7 @@ class box_actions extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { global $langs, $conf; $out = parent::showBox($this->info_box_head, $this->info_box_contents); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 413dc43d8b2..e18114a5bc7 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -53,7 +53,7 @@ class box_activity extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf, $user; @@ -74,7 +74,7 @@ class box_activity extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -457,7 +457,7 @@ class box_activity extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index c3a29877104..ec091956701 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -50,7 +50,7 @@ class box_bookmarks extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -65,7 +65,7 @@ class box_bookmarks extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -157,7 +157,7 @@ class box_bookmarks extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 9b1e4e34261..c4e34a72e9b 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -54,7 +54,7 @@ class box_clients extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -72,7 +72,7 @@ class box_clients extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -173,7 +173,7 @@ class box_clients extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 3f86909f04a..795bf36bd0b 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -54,7 +54,7 @@ class box_commandes extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_commandes extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -198,7 +198,7 @@ class box_commandes extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 5a5c2f59986..0f0d0f83fed 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -56,7 +56,7 @@ class box_comptes extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -75,7 +75,7 @@ class box_comptes extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -184,7 +184,7 @@ class box_comptes extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2d9d7e9461b..2654607e2eb 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -56,7 +56,7 @@ class box_contacts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -71,7 +71,7 @@ class box_contacts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -185,7 +185,7 @@ class box_contacts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 7239fa78919..bd499855cc4 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -53,7 +53,7 @@ class box_contracts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_contracts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -189,7 +189,7 @@ class box_contracts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index fa7d35f6db0..d7165198201 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -56,7 +56,7 @@ class box_external_rss extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { $this->db=$db; $this->paramdef=$param; @@ -69,7 +69,7 @@ class box_external_rss extends ModeleBoxes * @param int $cachedelay Delay we accept for cache file * @return void */ - function loadBox($max=5, $cachedelay=3600) + function loadBox($max = 5, $cachedelay = 3600) { global $user, $langs, $conf; $langs->load("boxes"); @@ -195,7 +195,7 @@ class box_external_rss extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index ae4a32fad7c..b45c530a085 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -52,7 +52,7 @@ class box_factures extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_factures extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -209,7 +209,7 @@ class box_factures extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 617f041d7d2..cc8cd3bd1da 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -53,7 +53,7 @@ class box_factures_fourn extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_factures_fourn extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -214,7 +214,7 @@ class box_factures_fourn extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index bd8fde32aab..181994fc1e3 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -52,7 +52,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -201,7 +201,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 11331f7f3e7..6193924ebc7 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -55,7 +55,7 @@ class box_factures_imp extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -70,7 +70,7 @@ class box_factures_imp extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -207,7 +207,7 @@ class box_factures_imp extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 76d1414f53f..b4016bb3758 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -53,7 +53,7 @@ class box_ficheinter extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_ficheinter extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=10) + function loadBox($max = 10) { global $user, $langs, $db, $conf; @@ -166,7 +166,7 @@ class box_ficheinter extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index c66c7f674c2..aa04d312f54 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -53,7 +53,7 @@ class box_fournisseurs extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_fournisseurs extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; $langs->load("boxes"); @@ -160,7 +160,7 @@ class box_fournisseurs extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 138326d6c01..0cca908f5d8 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -55,7 +55,7 @@ class box_goodcustomers extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_goodcustomers extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -169,7 +169,7 @@ class box_goodcustomers extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index fd0b4e593c0..b288912915d 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -48,7 +48,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -275,7 +275,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index f13b19259c9..be4b8722cf2 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -48,7 +48,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -274,7 +274,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index fefa90c5fea..390499bd359 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -48,7 +48,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -273,7 +273,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index e388d226fd2..098cbb4d038 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -48,7 +48,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -272,7 +272,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 9dc4c162e0f..bc4a3130151 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -51,7 +51,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user, $conf; @@ -70,7 +70,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -412,7 +412,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index f28b0ec2c99..4abd3a8725a 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -48,7 +48,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -276,7 +276,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 9ce7dd91605..34281d13c82 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -187,7 +187,7 @@ class box_last_modified_ticket extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index a824a707168..a1a52c3070d 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -187,7 +187,7 @@ class box_last_ticket extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php index c8149c6384b..d1ae1e7abf4 100644 --- a/htdocs/core/boxes/box_lastlogin.php +++ b/htdocs/core/boxes/box_lastlogin.php @@ -53,7 +53,7 @@ class box_lastlogin extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf; @@ -66,7 +66,7 @@ class box_lastlogin extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -109,7 +109,7 @@ class box_lastlogin extends ModeleBoxes * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index b0f999f54f1..8ffa90de5a4 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -55,7 +55,7 @@ class box_members extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_members extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -178,7 +178,7 @@ class box_members extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 3dd66eb1da2..bb64e46ecc4 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -55,7 +55,7 @@ class box_produits extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf, $user; @@ -73,7 +73,7 @@ class box_produits extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf, $hookmanager; @@ -226,7 +226,7 @@ class box_produits extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 896ceb93df6..b14cc2e659f 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -57,7 +57,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf,$user; @@ -75,7 +75,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf, $hookmanager; @@ -238,7 +238,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index a48543a00f6..3784294298a 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -51,7 +51,7 @@ class box_project extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user, $langs; @@ -70,7 +70,7 @@ class box_project extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -195,7 +195,7 @@ class box_project extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 2b3426f21b8..aa3a9f8fb00 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -54,7 +54,7 @@ class box_propales extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_propales extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -188,7 +188,7 @@ class box_propales extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index a4382f86048..2c58bdbe1c3 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -56,7 +56,7 @@ class box_prospect extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_prospect extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -176,7 +176,7 @@ class box_prospect extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 708b781f092..264b95d5c65 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -54,7 +54,7 @@ class box_services_contracts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_services_contracts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -241,7 +241,7 @@ class box_services_contracts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index ed62e127816..0bae23fef95 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -52,7 +52,7 @@ class box_services_expired extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_services_expired extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -185,7 +185,7 @@ class box_services_expired extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 4621950843e..142fd2820be 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -52,7 +52,7 @@ class box_supplier_orders extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -184,7 +184,7 @@ class box_supplier_orders extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index cf1e799e486..bfcf5d2c301 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -54,7 +54,7 @@ class box_task extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user, $langs; @@ -73,7 +73,7 @@ class box_task extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -152,7 +152,7 @@ class box_task extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 9ae35403ec7..971c04848c7 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -115,7 +115,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { $this->db=$db; } @@ -204,7 +204,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { global $langs, $user, $conf; @@ -385,7 +385,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param array $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only. * @return array Array list of widget */ - static function getWidgetsList($forcedirwidget=null) + static function getWidgetsList($forcedirwidget = null) { global $conf, $langs, $db; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 52d98790dcc..499bd8deb29 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -119,7 +119,7 @@ class CMailFile * @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use) * @param string $replyto Reply-to email (will be set to same value than From by default if not provided) */ - function __construct($subject, $to, $from, $msg, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=0, $errors_to='', $css='', $trackid='', $moreinheader='', $sendcontext='standard', $replyto='') + function __construct($subject, $to, $from, $msg, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = 0, $errors_to = '', $css = '', $trackid = '', $moreinheader = '', $sendcontext = 'standard', $replyto = '') { global $conf, $dolibarr_main_data_root; @@ -1178,7 +1178,7 @@ class CMailFile * @param array $mimefilename_list Tableau * @return string Chaine fichiers encodes */ - function write_files($filename_list,$mimetype_list,$mimefilename_list) + function write_files($filename_list, $mimetype_list, $mimefilename_list) { // phpcs:enable $out = ''; @@ -1259,7 +1259,7 @@ class CMailFile * @param int $port Example: 25, 465 * @return int Socket id if ok, 0 if KO */ - function check_server_port($host,$port) + function check_server_port($host, $port) { // phpcs:enable global $conf; @@ -1457,7 +1457,7 @@ class CMailFile * If format 3: '<john@doe.com>' or '"John Doe" <john@doe.com>' or '"=?UTF-8?B?Sm9obiBEb2U=?=" <john@doe.com>' * If format 4: 'John Doe' or 'john@doe.com' if no label exists */ - static function getValidAddress($address,$format,$encode=0,$maxnumberofemail=0) + static function getValidAddress($address, $format, $encode = 0, $maxnumberofemail = 0) { global $conf; diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 86ffed48551..893c08b9257 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -59,7 +59,7 @@ class CSMSFile * @param int $priority Priority * @param int $class Class */ - function __construct($to,$from,$msg,$deliveryreceipt=0,$deferred=0,$priority=3,$class=1) + function __construct($to, $from, $msg, $deliveryreceipt = 0, $deferred = 0, $priority = 3, $class = 1) { global $conf; diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 4694a5e4652..f822b178536 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -60,7 +60,7 @@ class Canvas * @param DoliDB $db Database handler * @param string $actiontype Action type ('create', 'view', 'edit', 'list') */ - function __construct($db, $actiontype='view') + function __construct($db, $actiontype = 'view') { $this->db = $db; @@ -142,7 +142,7 @@ class Canvas * @param string $ref Object ref (if id not provided) * @return void */ - function assign_values(&$action='view', $id=0, $ref='') + function assign_values(&$action = 'view', $id = 0, $ref = '') { // phpcs:enable if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref); @@ -204,7 +204,7 @@ class Canvas * @return mixed Return return code of doActions of canvas * @see http://wiki.dolibarr.org/index.php/Canvas_development */ - function doActions(&$action='view', $id=0) + function doActions(&$action = 'view', $id = 0) { if (method_exists($this->control,'doActions')) { diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index f07916a7511..e93af622a27 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -86,7 +86,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -165,7 +165,7 @@ class Ccountry // extends CommonObject * @param string $code Code * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id,$code='') + function fetch($id, $code = '') { global $langs; $sql = "SELECT"; @@ -214,7 +214,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -285,7 +285,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 332f7e115ef..ddcce49cef4 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -82,7 +82,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -155,7 +155,7 @@ class Comment extends CommonObject * @param int $ref ref object * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; @@ -213,7 +213,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -278,7 +278,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 726e95214cb..d4007235295 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -69,7 +69,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_user($user,$outputlangs) + function get_substitutionarray_user($user, $outputlangs) { // phpcs:enable global $conf; @@ -107,7 +107,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_mysoc($mysoc,$outputlangs) + function get_substitutionarray_mysoc($mysoc, $outputlangs) { // phpcs:enable global $conf; @@ -167,7 +167,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_thirdparty($object,$outputlangs) + function get_substitutionarray_thirdparty($object, $outputlangs) { // phpcs:enable global $conf; @@ -361,7 +361,7 @@ abstract class CommonDocGenerator * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -604,7 +604,7 @@ abstract class CommonDocGenerator * @param array $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_shipment($object,$outputlangs,$array_key='object') + function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -716,7 +716,7 @@ abstract class CommonDocGenerator * @param boolean $recursive Want to fetch child array or child object * @return array Array of substitution key->code */ - function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) + function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = true) { // phpcs:enable $array_other = array(); @@ -747,7 +747,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ - function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs) + function fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs) { // phpcs:enable global $conf; @@ -834,7 +834,7 @@ abstract class CommonDocGenerator * @param int $hidebottom Hide bottom * @return void */ - function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0) + function printRect($pdf, $x, $y, $l, $h, $hidetop = 0, $hidebottom = 0) { if (empty($hidetop) || $hidetop==-1) $pdf->line($x, $y, $x+$l, $y); $pdf->line($x+$l, $y, $x+$l, $y+$h); @@ -870,7 +870,7 @@ abstract class CommonDocGenerator * @param int $hideref Do not show ref * @return null */ - function prepareArrayColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function prepareArrayColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index cd346dd95e2..5615ecf3b20 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -97,7 +97,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return double Remain of amount to pay */ - function getRemainToPay($multicurrency=0) + function getRemainToPay($multicurrency = 0) { $alreadypaid=0; $alreadypaid+=$this->getSommePaiement($multicurrency); @@ -112,7 +112,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int Amount of payment already done, <0 if KO */ - function getSommePaiement($multicurrency=0) + function getSommePaiement($multicurrency = 0) { $table='paiement_facture'; $field='fk_facture'; @@ -149,7 +149,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of deposits amount otherwise */ - function getSumDepositsUsed($multicurrency=0) + function getSumDepositsUsed($multicurrency = 0) { if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') { @@ -178,7 +178,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and deposits amount otherwise */ - function getSumCreditNotesUsed($multicurrency=0) + function getSumCreditNotesUsed($multicurrency = 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -233,7 +233,7 @@ abstract class CommonInvoice extends CommonObject * @param string $option filtre sur statut ('', 'validated', ...) * @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon */ - function getIdReplacingInvoice($option='') + function getIdReplacingInvoice($option = '') { $sql = 'SELECT rowid'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element; @@ -274,7 +274,7 @@ abstract class CommonInvoice extends CommonObject * @param string $filtertype 1 to filter on type of payment == 'PRE' * @return array Array with list of payments */ - function getListOfPayments($filtertype='') + function getListOfPayments($filtertype = '') { $retarray=array(); @@ -447,7 +447,7 @@ abstract class CommonInvoice extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label of status */ - function getLibStatut($mode=0, $alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paye, $this->statut, $mode, $alreadypaid, $this->type); } @@ -463,7 +463,7 @@ abstract class CommonInvoice extends CommonObject * @param int $type Type invoice * @return string Label of status */ - function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0) + function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = 0) { // phpcs:enable global $langs; @@ -593,7 +593,7 @@ abstract class CommonInvoice extends CommonObject * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @return date Date limite de reglement si ok, <0 si ko */ - function calculate_date_lim_reglement($cond_reglement=0) + function calculate_date_lim_reglement($cond_reglement = 0) { // phpcs:enable if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 945d257b8eb..d262bf87ac4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -417,7 +417,7 @@ abstract class CommonObject * @param string $ref_ext Ref ext of object to check * @return int <0 if KO, 0 if OK but not found, >0 if OK and exists */ - static function isExistingObject($element, $id, $ref='', $ref_ext='') + static function isExistingObject($element, $id, $ref = '', $ref_ext = '') { global $db,$conf; @@ -505,7 +505,7 @@ abstract class CommonObject * @param int $maxlen Maximum length * @return string String with full name */ - function getFullName($langs,$option=0,$nameorder=-1,$maxlen=0) + function getFullName($langs, $option = 0, $nameorder = -1, $maxlen = 0) { //print "lastname=".$this->lastname." name=".$this->name." nom=".$this->nom."<br>\n"; $lastname=$this->lastname; @@ -532,7 +532,7 @@ abstract class CommonObject * @param int $withregion 1=Add region into address string * @return string Full address string */ - function getFullAddress($withcountry=0, $sep="\n", $withregion=0) + function getFullAddress($withcountry = 0, $sep = "\n", $withregion = 0) { if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country))) { @@ -682,7 +682,7 @@ abstract class CommonObject * @param int $relativelink 0=Return full external link, 1=Return link relative to root of file * @return string Link or empty string if there is no download link */ - function getLastMainDocLink($modulepart, $initsharekey=0, $relativelink=0) + function getLastMainDocLink($modulepart, $initsharekey = 0, $relativelink = 0) { global $user, $dolibarr_main_url_root; @@ -779,7 +779,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0) + function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0) { // phpcs:enable global $user,$langs; @@ -901,7 +901,7 @@ abstract class CommonObject * @param string $source Nature of contact ('internal' or 'external') * @return int >0 if OK, <0 if KO */ - function copy_linked_contact($objFrom, $source='internal') + function copy_linked_contact($objFrom, $source = 'internal') { // phpcs:enable $contacts = $objFrom->liste_contact(-1, $source); @@ -926,7 +926,7 @@ abstract class CommonObject * @param int $fk_socpeople Id of soc_people to update (not modified if 0) * @return int <0 if KO, >= 0 if OK */ - function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0) + function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0) { // phpcs:enable // Insert into database @@ -955,7 +955,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete_contact($rowid, $notrigger=0) + function delete_contact($rowid, $notrigger = 0) { // phpcs:enable global $user; @@ -994,7 +994,7 @@ abstract class CommonObject * @param string $code Type of contact (code or id) * @return int >0 if OK, <0 if KO */ - function delete_linked_contact($source='',$code='') + function delete_linked_contact($source = '', $code = '') { // phpcs:enable $temp = array(); @@ -1033,7 +1033,7 @@ abstract class CommonObject * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array|int Array of contacts, -1 if error */ - function liste_contact($statut=-1,$source='external',$list=0,$code='') + function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '') { // phpcs:enable global $langs; @@ -1143,7 +1143,7 @@ abstract class CommonObject * @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE') * @return array Array list of type of contacts (id->label if option=0, code->label if option=1) */ - function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='') + function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '') { // phpcs:enable global $langs; @@ -1197,7 +1197,7 @@ abstract class CommonObject * @param int $status limited to a certain status * @return array List of id for such contacts */ - function getIdContact($source,$code,$status=0) + function getIdContact($source, $code, $status = 0) { global $conf; @@ -1257,7 +1257,7 @@ abstract class CommonObject * @param int $contactid Id du contact. Use this->contactid if empty. * @return int <0 if KO, >0 if OK */ - function fetch_contact($contactid=null) + function fetch_contact($contactid = null) { // phpcs:enable if (empty($contactid)) $contactid=$this->contactid; @@ -1278,7 +1278,7 @@ abstract class CommonObject * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable global $conf; @@ -1542,7 +1542,7 @@ abstract class CommonObject * @return int <0 if KO, >0 if OK * @see updateExtraField() */ - function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='', $fk_user_field='fk_user_modif') + function setValueFrom($field, $value, $table = '', $id = null, $format = '', $id_field = '', $fuser = null, $trigkey = '', $fk_user_field = 'fk_user_modif') { global $user,$langs,$conf; @@ -1621,7 +1621,7 @@ abstract class CommonObject * @param int $nodbprefix Do not include DB prefix to forge table name * @return int <0 if KO, >0 if OK */ - function load_previous_next_ref($filter, $fieldid, $nodbprefix=0) + function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0) { // phpcs:enable global $conf, $user; @@ -1745,7 +1745,7 @@ abstract class CommonObject * @return array Array of id of contacts (if source=external or internal) * Array of id of third parties with at least one contact on object (if source=thirdparty) */ - function getListContactId($source='external') + function getListContactId($source = 'external') { $contactAlreadySelected = array(); $tab = $this->liste_contact(-1,$source); @@ -1892,7 +1892,7 @@ abstract class CommonObject * @param int $mode mode 1 : amounts in company currency will be recalculated, mode 2 : amounts in foreign currency * @return int >0 if OK, <0 if KO */ - function setMulticurrencyRate($rate, $mode=1) + function setMulticurrencyRate($rate, $mode = 1) { dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')'); if ($this->statut >= 0 || $this->element == 'societe') @@ -2068,7 +2068,7 @@ abstract class CommonObject * * @return int 1 if OK, 0 if KO */ - function setShippingMethod($shipping_method_id, $notrigger=false, $userused=null) + function setShippingMethod($shipping_method_id, $notrigger = false, $userused = null) { global $user; @@ -2192,7 +2192,7 @@ abstract class CommonObject * @param User $userused Object user * @return int 1 if OK, 0 if KO */ - function setBankAccount($fk_account, $notrigger=false, $userused=null) + function setBankAccount($fk_account, $notrigger = false, $userused = null) { global $user; @@ -2257,7 +2257,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return int <0 if KO, >0 if OK */ - function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true) + function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true) { // phpcs:enable if (! $this->table_element_line) @@ -2376,7 +2376,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ - function line_up($rowid, $fk_parent_line=true) + function line_up($rowid, $fk_parent_line = true) { // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); @@ -2396,7 +2396,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ - function line_down($rowid, $fk_parent_line=true) + function line_down($rowid, $fk_parent_line = true) { // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); @@ -2418,7 +2418,7 @@ abstract class CommonObject * @param int $rang Position * @return void */ - function updateRangOfLine($rowid,$rang) + function updateRangOfLine($rowid, $rang) { $fieldposition = 'rang'; if (in_array($this->table_element_line, array('ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position'; @@ -2457,7 +2457,7 @@ abstract class CommonObject * @param int $rang Position * @return void */ - function updateLineUp($rowid,$rang) + function updateLineUp($rowid, $rang) { if ($rang > 1) { @@ -2491,7 +2491,7 @@ abstract class CommonObject * @param int $max Max * @return void */ - function updateLineDown($rowid,$rang,$max) + function updateLineDown($rowid, $rang, $max) { if ($rang < $max) { @@ -2563,7 +2563,7 @@ abstract class CommonObject * @param int $fk_parent_line Parent line id * @return int Max value of rang in table of lines */ - function line_max($fk_parent_line=0) + function line_max($fk_parent_line = 0) { // phpcs:enable // Search the last rang with fk_parent_line @@ -2645,7 +2645,7 @@ abstract class CommonObject * @param string $suffix '', '_public' or '_private' * @return int <0 if KO, >0 if OK */ - function update_note($note, $suffix='') + function update_note($note, $suffix = '') { // phpcs:enable global $user; @@ -2716,7 +2716,7 @@ abstract class CommonObject * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object. * @return int <0 if KO, >0 if OK */ - function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null) + function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null) { // phpcs:enable global $conf, $hookmanager, $action; @@ -2953,7 +2953,7 @@ abstract class CommonObject * @return int <=0 if KO, >0 if OK * @see fetchObjectLinked(), updateObjectLinked(), deleteObjectLinked() */ - function add_object_linked($origin=null, $origin_id=null) + function add_object_linked($origin = null, $origin_id = null) { // phpcs:enable $origin = (! empty($origin) ? $origin : $this->origin); @@ -3014,7 +3014,7 @@ abstract class CommonObject * @return int <0 if KO, >0 if OK * @see add_object_linked(), updateObjectLinked(), deleteObjectLinked() */ - function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1,$orderby='sourcetype',$loadalsoobjects=1) + function fetchObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $clause = 'OR', $alsosametype = 1, $orderby = 'sourcetype', $loadalsoobjects = 1) { global $conf; @@ -3218,7 +3218,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see add_object_linked(), fetObjectLinked(), deleteObjectLinked() */ - function updateObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='') + function updateObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '') { $updatesource=false; $updatetarget=false; @@ -3265,7 +3265,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see add_object_linked, updateObjectLinked, fetchObjectLinked */ - function deleteObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='', $rowid='') + function deleteObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $rowid = '') { $deletesource=false; $deletetarget=false; @@ -3326,7 +3326,7 @@ abstract class CommonObject * @param string $trigkey Trigger key to use for trigger * @return int <0 if KO, >0 if OK */ - function setStatut($status, $elementId=null, $elementType='', $trigkey='') + function setStatut($status, $elementId = null, $elementType = '', $trigkey = '') { global $user,$langs,$conf; @@ -3414,7 +3414,7 @@ abstract class CommonObject * @param string $ref Record ref * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function getCanvas($id=0,$ref='') + function getCanvas($id = 0, $ref = '') { global $conf; @@ -3474,7 +3474,7 @@ abstract class CommonObject * @param int $id Force id of object * @return int <0 if KO, 0 if not used, >0 if already used */ - function isObjectUsed($id=0) + function isObjectUsed($id = 0) { global $langs; @@ -3543,7 +3543,7 @@ abstract class CommonObject * @param int $predefined -1=All, 0=Count free product/service only, 1=Count predefined product/service only, 2=Count predefined product, 3=Count predefined service * @return int <0 if KO, 0 if no predefined products, nb of lines with predefined products if found */ - function hasProductsOrServices($predefined=-1) + function hasProductsOrServices($predefined = -1) { $nb=0; @@ -3881,7 +3881,7 @@ abstract class CommonObject * @param int $dateSelector 1=Show also date range input fields * @return void */ - function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) + function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0) { global $conf, $hookmanager, $langs, $user; // TODO We should not use global var for this ! @@ -4035,7 +4035,7 @@ abstract class CommonObject * @param int $extrafieldsline Object of extrafield line attribute * @return void */ - function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0) + function printObjectLine($action, $line, $var, $num, $i, $dateSelector, $seller, $buyer, $selected = 0, $extrafieldsline = 0) { global $conf,$langs,$user,$object,$hookmanager; global $form,$bc,$bcdd; @@ -4153,7 +4153,7 @@ abstract class CommonObject * @param string $restrictlist ''=All lines, 'services'=Restrict to services only * @return void */ - function printOriginLinesList($restrictlist='') + function printOriginLinesList($restrictlist = '') { global $langs, $hookmanager, $conf; @@ -4207,7 +4207,7 @@ abstract class CommonObject * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not) * @return void */ - function printOriginLine($line, $var, $restrictlist='') + function printOriginLine($line, $var, $restrictlist = '') { global $langs, $conf; @@ -4353,7 +4353,7 @@ abstract class CommonObject * @param int $mandatory Mandatory or not * @return int <=0 if KO, >0 if OK */ - function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0) + function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0) { // phpcs:enable $this->db->begin(); @@ -4397,7 +4397,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete_resource($rowid, $element, $notrigger=0) + function delete_resource($rowid, $element, $notrigger = 0) { // phpcs:enable global $user; @@ -4460,7 +4460,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see addFileIntoDatabaseIndex() */ - protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null) + protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { global $conf, $langs, $user; @@ -4742,7 +4742,7 @@ abstract class CommonObject * @param string $alternatevalue Alternate value to use * @return string|string[] Default value (can be an array if the GETPOST return an array) **/ - function getDefaultCreateValueFor($fieldname, $alternatevalue=null) + function getDefaultCreateValueFor($fieldname, $alternatevalue = null) { global $conf, $_POST; @@ -4818,7 +4818,7 @@ abstract class CommonObject * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters. * @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded */ - function fetch_optionals($rowid=null, $optionsArray=null) + function fetch_optionals($rowid = null, $optionsArray = null) { // phpcs:enable if (empty($rowid)) $rowid=$this->id; @@ -4962,7 +4962,7 @@ abstract class CommonObject * @return int -1=error, O=did nothing, 1=OK * @see updateExtraField(), setValueFrom() */ - function insertExtraFields($trigger='', $userused=null) + function insertExtraFields($trigger = '', $userused = null) { global $conf,$langs,$user; @@ -5208,7 +5208,7 @@ abstract class CommonObject * @return int -1=error, O=did nothing, 1=OK * @see setValueFrom(), insertExtraFields() */ - function updateExtraField($key, $trigger=null, $userused=null) + function updateExtraField($key, $trigger = null, $userused = null) { global $conf,$langs,$user; @@ -5342,7 +5342,7 @@ abstract class CommonObject * @param string|int $morecss Value for css to define style/length of field. May also be a numeric. * @return string */ - function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss=0) + function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0) { global $conf,$langs,$form; @@ -5953,7 +5953,7 @@ abstract class CommonObject * @param mixed $showsize Value for css to define size. May also be a numeric. * @return string */ - function showOutputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $showsize=0) + function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $showsize = 0) { global $conf,$langs,$form; @@ -6324,7 +6324,7 @@ abstract class CommonObject * @param string $onetrtd All fields in same tr td * @return string */ - function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0) + function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0) { global $db, $conf, $langs, $action, $form; @@ -6531,7 +6531,7 @@ abstract class CommonObject * @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old thirdparty may already exists on new one) * @return bool True if success, False if error */ - public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors=0) + public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0) { foreach ($tables as $table) { @@ -6647,7 +6647,7 @@ abstract class CommonObject * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto */ - function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0) + function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $notitle = 0, $usesharelink = 0) { // phpcs:enable global $conf,$user,$langs; @@ -7349,7 +7349,7 @@ abstract class CommonObject * @param int $forcechilddeletion 0=no, 1=Force deletion of children * @return int <=0 if KO, >0 if OK */ - public function deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0) + public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0) { $error=0; diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 91d4245ff88..891ea5e4bc6 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -57,7 +57,7 @@ abstract class CommonObjectLine extends CommonObject * @param string $type Label type (long or short) * @return string|int <0 if ko, label if ok */ - public function getLabelOfUnit($type='long') + public function getLabelOfUnit($type = 'long') { global $langs; diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index d5bf6f3317e..2cbf6a9ecb7 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -107,7 +107,7 @@ abstract class CommonStickerGenerator * @param string $outputdir Output directory for pdf file * @return int 1=OK, 0=KO */ - abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir=''); + abstract function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); // phpcs:enable /** @@ -118,7 +118,7 @@ abstract class CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - abstract function addSticker(&$pdf,$outputlangs,$param); + abstract function addSticker(&$pdf, $outputlangs, $param); // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** @@ -129,7 +129,7 @@ abstract class CommonStickerGenerator * @param int $pt point * @return void */ - function Set_Char_Size(&$pdf,$pt) + function Set_Char_Size(&$pdf, $pt) { // phpcs:enable if ($pt > 3) { @@ -152,7 +152,7 @@ abstract class CommonStickerGenerator * @param int $nbPointilles Nb pointilles * @return void */ - function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15) + function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15) { // phpcs:enable $pdf->SetLineWidth($epaisseur); @@ -195,7 +195,7 @@ abstract class CommonStickerGenerator * @param int $taille Size * @return void */ - function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4) + function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4) { // phpcs:enable $pdf->SetDrawColor(192,192,192); diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 5129ac54ece..b6cff34b0f3 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -123,7 +123,7 @@ class CoreObject extends CommonObject * @param bool $try_to_load Force the fetch if an id is given * @return int */ - public function addChild($tabName, $id=0, $key='id', $try_to_load = false) + public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) { if(!empty($id)) { @@ -154,7 +154,7 @@ class CoreObject extends CommonObject * @param string $key Attribute name of the object id * @return bool */ - public function removeChild($tabName, $id, $key='id') + public function removeChild($tabName, $id, $key = 'id') { foreach ($this->{$tabName} as &$object) { @@ -370,7 +370,7 @@ class CoreObject extends CommonObject * @param string $format Output date format * @return string */ - public function getDate($field, $format='') + public function getDate($field, $format = '') { if(empty($this->{$field})) return ''; else diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 4320446d7b5..6ad6523f199 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -92,7 +92,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -168,7 +168,7 @@ class Cstate // extends CommonObject * @param string $code Code * @return int <0 if KO, >0 if OK */ - function fetch($id,$code='') + function fetch($id, $code = '') { global $langs; $sql = "SELECT"; @@ -212,7 +212,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -281,7 +281,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index db8ed461727..ffaccbfe964 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -76,7 +76,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -166,7 +166,7 @@ class Ctypent // extends CommonObject * @param string $label Label * @return int <0 if KO, >0 if OK */ - function fetch($id,$code='',$label='') + function fetch($id, $code = '', $label = '') { global $langs; $sql = "SELECT"; @@ -214,7 +214,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -285,7 +285,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 95c642772e2..4ceb7ed37c8 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -159,7 +159,7 @@ class Ctyperesource * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id,$code='',$label='') + public function fetch($id, $code = '', $label = '') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -223,7 +223,7 @@ class Ctyperesource * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 48c426a830f..b47a324838a 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -109,7 +109,7 @@ class DiscountAbsolute * @param int $fk_invoice_supplier_source fk_invoice_supplier_source * @return int <0 if KO, =0 if not found, >0 if OK */ - function fetch($rowid, $fk_facture_source=0, $fk_invoice_supplier_source=0) + function fetch($rowid, $fk_facture_source = 0, $fk_invoice_supplier_source = 0) { global $conf; @@ -396,7 +396,7 @@ class DiscountAbsolute * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice) * @return int <0 if KO, >0 if OK */ - function link_to_invoice($rowidline,$rowidinvoice) + function link_to_invoice($rowidline, $rowidinvoice) { // phpcs:enable // Check parameters @@ -484,7 +484,7 @@ class DiscountAbsolute * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, amount otherwise */ - function getAvailableDiscounts($company='', $user='',$filter='', $maxvalue=0, $discount_type=0) + function getAvailableDiscounts($company = '', $user = '', $filter = '', $maxvalue = 0, $discount_type = 0) { global $conf; @@ -527,7 +527,7 @@ class DiscountAbsolute * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and deposits amount otherwise */ - function getSumDepositsUsed($invoice, $multicurrency=0) + function getSumDepositsUsed($invoice, $multicurrency = 0) { dol_syslog(get_class($this)."::getSumDepositsUsed", LOG_DEBUG); @@ -573,7 +573,7 @@ class DiscountAbsolute * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and excess received amount otherwise */ - function getSumCreditNotesUsed($invoice, $multicurrency=0) + function getSumCreditNotesUsed($invoice, $multicurrency = 0) { dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); @@ -619,7 +619,7 @@ class DiscountAbsolute * @param string $option Where to link to ('invoice' or 'discount') * @return string String with URL */ - function getNomUrl($withpicto,$option='invoice') + function getNomUrl($withpicto, $option = 'invoice') { global $langs; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 548721be05f..5d375e420f4 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -64,7 +64,7 @@ class DolEditor * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') * @param int $readonly 0=Read/Edit, 1=Read only */ - function __construct($htmlname, $content, $width='', $height=200, $toolbarname='Basic', $toolbarlocation='In', $toolbarstartexpanded=false, $uselocalbrowser=true, $okforextendededitor=true, $rows=0, $cols=0, $readonly=0) + function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $toolbarlocation = 'In', $toolbarstartexpanded = false, $uselocalbrowser = true, $okforextendededitor = true, $rows = 0, $cols = 0, $readonly = 0) { global $conf,$langs; @@ -149,7 +149,7 @@ class DolEditor * @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...) * @return void|string */ - function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='') + function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index a57e4e844ec..d5b486f3430 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -41,7 +41,7 @@ class DolGeoIP * @param string $type 'country' or 'city' * @param string $datfile Data file */ - function __construct($type,$datfile) + function __construct($type, $datfile) { if ($type == 'country') { diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 42386494a37..c7dc7991a4a 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -88,7 +88,7 @@ class DolGraph * * @param string $library 'jflot' (default) or 'artichow' (no more supported) */ - function __construct($library='jflot') + function __construct($library = 'jflot') { global $conf; global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; @@ -658,7 +658,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return integer|null */ - function draw($file, $fileurl='') + function draw($file, $fileurl = '') { if (empty($file)) { @@ -690,7 +690,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return void */ - private function draw_artichow($file,$fileurl) + private function draw_artichow($file, $fileurl) { // phpcs:enable global $artichow_defaultfont; @@ -1127,7 +1127,7 @@ class DolGraph * @param int $shownographyet Show graph to say there is not enough data * @return string HTML string to show graph */ - function show($shownographyet=0) + function show($shownographyet = 0) { global $langs; @@ -1149,7 +1149,7 @@ class DolGraph * @param string $defaultsize Value we want as default size * @return int Value of width or height to use by default */ - static function getDefaultGraphSizeForStats($direction,$defaultsize='') + static function getDefaultGraphSizeForStats($direction, $defaultsize = '') { global $conf; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index f38afc67807..19de8abb3f6 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -311,7 +311,7 @@ class dolReceiptPrinter extends Escpos * @param string $htmlname select html name * @return int 0 if OK; >0 if KO */ - function selectTypePrinter($selected='', $htmlname='printertypeid') + function selectTypePrinter($selected = '', $htmlname = 'printertypeid') { global $langs; @@ -335,7 +335,7 @@ class dolReceiptPrinter extends Escpos * @param string $htmlname select html name * @return int 0 if OK; >0 if KO */ - function selectProfilePrinter($selected='', $htmlname='printerprofileid') + function selectProfilePrinter($selected = '', $htmlname = 'printerprofileid') { global $langs; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 3a1fba460c4..3ce9623a05d 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -277,7 +277,7 @@ class EmailSenderProfile extends CommonObject * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) * @return string String with URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -309,7 +309,7 @@ class EmailSenderProfile extends CommonObject * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { return 'todo'; } @@ -320,7 +320,7 @@ class EmailSenderProfile extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -333,7 +333,7 @@ class EmailSenderProfile extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { global $langs; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 68e029dae4b..ecaaba8f4c7 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -183,7 +183,7 @@ class Events // extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -220,7 +220,7 @@ class Events // extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cc1fae502b3..6d26522bb97 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -171,7 +171,7 @@ class ExtraFields * @param string $enabled Condition to have the field enabled or not * @return int <=0 if KO, >0 if OK */ - function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique=0, $required=0, $default_value='', $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $computed='', $entity='', $langfile='', $enabled='1') + function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') { if (empty($attrname)) return -1; if (empty($label)) return -1; @@ -221,7 +221,7 @@ class ExtraFields * @param string $computed Computed value * @return int <=0 if KO, >0 if OK */ - private function create($attrname, $type='varchar', $length=255, $elementtype='member', $unique=0, $required=0, $default_value='',$param='', $perms='', $list='0', $computed='') + private function create($attrname, $type = 'varchar', $length = 255, $elementtype = 'member', $unique = 0, $required = 0, $default_value = '', $param = '', $perms = '', $list = '0', $computed = '') { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -317,7 +317,7 @@ class ExtraFields * @param string $enabled Condition to have the field enabled or not * @return int <=0 if KO, >0 if OK */ - private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $default='', $computed='',$entity='', $langfile='', $enabled='1') + private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') { // phpcs:enable global $conf,$user; @@ -414,7 +414,7 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...) * @return int < 0 if KO, 0 if nothing is done, 1 if OK */ - function delete($attrname, $elementtype='member') + function delete($attrname, $elementtype = 'member') { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -472,7 +472,7 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @return int < 0 if KO, 0 if nothing is done, 1 if OK */ - private function delete_label($attrname, $elementtype='member') + private function delete_label($attrname, $elementtype = 'member') { // phpcs:enable global $conf; @@ -529,7 +529,7 @@ class ExtraFields * @param int $totalizable Is extrafield totalizable on list * @return int >0 if OK, <=0 if KO */ - function update($attrname, $label, $type, $length, $elementtype, $unique=0, $required=0, $pos=0, $param='', $alwayseditable=0, $perms='', $list='', $help='', $default='', $computed='', $entity='', $langfile='', $enabled='1', $totalizable=0) + function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -639,7 +639,7 @@ class ExtraFields * @param int $totalizable Is extrafield totalizable on list * @return int <=0 if KO, >0 if OK */ - private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1', $totalizable=0) + private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { // phpcs:enable global $conf, $user; @@ -770,7 +770,7 @@ class ExtraFields * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required. * @return array Array of attributes keys+label for all extra fields. */ - function fetch_name_optionals_label($elementtype,$forceload=false) + function fetch_name_optionals_label($elementtype, $forceload = false) { // phpcs:enable global $conf; @@ -893,7 +893,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data * @return string */ - function showInputField($key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss='', $objectid=0, $extrafieldsobjectkey='') + function showInputField($key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '', $objectid = 0, $extrafieldsobjectkey = '') { global $conf,$langs,$form; @@ -1508,7 +1508,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data * @return string Formated value */ - function showOutputField($key, $value, $moreparam='', $extrafieldsobjectkey='') + function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '') { global $conf,$langs; @@ -1820,7 +1820,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined, use the new method to get extrafields data * @return string Formated value */ - function getAlignFlag($key, $extrafieldsobjectkey='') + function getAlignFlag($key, $extrafieldsobjectkey = '') { global $conf,$langs; @@ -1890,7 +1890,7 @@ class ExtraFields * @param string $onlykey Only following key is filled. When we make update of only one extrafield ($action = 'update_extras'), calling page must must set this to avoid to have other extrafields being reset. * @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example) */ - function setOptionalsFromPost($extralabels, &$object, $onlykey='') + function setOptionalsFromPost($extralabels, &$object, $onlykey = '') { global $_POST, $langs; $nofillrequired='';// For error when required field left blank @@ -1989,7 +1989,7 @@ class ExtraFields * @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names) * @return array|int array_options set or 0 if no value */ - function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix='', $keysuffix='') + function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix = '', $keysuffix = '') { global $_POST; diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 027fdda0514..66f6e19102c 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -41,7 +41,7 @@ class FileUpload * @param int $fk_element fk_element * @param string $element element */ - function __construct($options=null,$fk_element=null,$element=null) + function __construct($options = null, $fk_element = null, $element = null) { global $db, $conf; global $object; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index c1c288cbf79..cf6a3cf345d 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -264,7 +264,7 @@ class Fiscalyear extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -277,7 +277,7 @@ class Fiscalyear extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index 615729ba9c3..797f0a14af1 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -44,7 +44,7 @@ class GoogleAPI * @param DoliDB $db Database handler * @param string $key Google key */ - function __construct($db,$key) + function __construct($db, $key) { $this->db=$db; $this->key=$key; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 98193f1e32e..47edef4011d 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -136,7 +136,7 @@ class HookManager * All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller. * $this->error or this->errors are also defined by class called by this function if error. */ - function executeHooks($method, $parameters=array(), &$object='', &$action='') + function executeHooks($method, $parameters = array(), &$object = '', &$action = '') { if (! is_array($this->hooks) || empty($this->hooks)) return ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 228c9fa1538..c737c7b791e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -102,7 +102,7 @@ class Form * @param string $paramid Key of parameter for id ('id', 'socid') * @return string HTML edit field */ - function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0, $paramid='id') + function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id') { global $conf,$langs; @@ -164,7 +164,7 @@ class Form * @param string $paramid Key of parameter for id ('id', 'socid') * @return string HTML edit field */ - function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='', $paramid='id') + function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id') { global $conf,$langs,$db; @@ -306,7 +306,7 @@ class Form * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') * @return string HTML edit in place */ - private function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null) + private function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null) { global $conf; @@ -441,7 +441,7 @@ class Form * @see Use function textwithpicto if you can. * TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip */ - function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger='', $forcenowrap=0) + function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0) { global $conf; @@ -526,7 +526,7 @@ class Form * @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only) * @return string HTML code of text, picto, tooltip */ - function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger='', $forcenowrap=0) + function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger = '', $forcenowrap = 0) { global $conf, $langs; @@ -578,7 +578,7 @@ class Form * @param int $alwaysvisible 1=select button always visible * @return string Select list */ - function selectMassAction($selected, $arrayofaction, $alwaysvisible=0) + function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0) { global $conf,$langs,$hookmanager; @@ -678,7 +678,7 @@ class Form * @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...) * @return string HTML string with select */ - function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0, $addspecialentries=0) + function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0) { // phpcs:enable global $conf,$langs,$mysoc; @@ -791,7 +791,7 @@ class Form * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return string HTML string with select and input */ - function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) + function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array()) { // phpcs:enable global $conf,$langs; @@ -884,7 +884,7 @@ class Form * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service') * @return void */ - function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0) + function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0) { // phpcs:enable global $db,$langs,$user,$conf; @@ -987,7 +987,7 @@ class Form * @param int $showempty Add an empty field * @return void */ - function select_type_fees($selected='',$htmlname='type',$showempty=0) + function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0) { // phpcs:enable global $user, $langs; @@ -1031,7 +1031,7 @@ class Form * @return string Return select box for thirdparty. * @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0) */ - function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) + function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0) { // phpcs:enable return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit); @@ -1057,7 +1057,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) * @return string HTML string with select box for thirdparty. */ - function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false) + function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1121,7 +1121,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return string HTML string with */ - function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false) + function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1295,7 +1295,7 @@ class Form * @param int $maxvalue Max value for lines that can be selected * @return int Return number of qualifed lines in list */ - function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) + function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0) { // phpcs:enable global $langs,$conf; @@ -1382,7 +1382,7 @@ class Form * @return int <0 if KO, Nb of contact in list if OK * @deprected You can use selectcontacts directly (warning order of param was changed) */ - function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='') + function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '') { // phpcs:enable print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid); @@ -1412,7 +1412,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return int <0 if KO, Nb of contact in list if OK */ - function selectcontacts($socid, $selected='', $htmlname='contactid', $showempty=0, $exclude='', $limitto='', $showfunction=0, $moreclass='', $options_only=false, $showsoc=0, $forcecombo=0, $events=array(), $moreparam='', $htmlid='', $multiple=false) + function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false) { global $conf,$langs,$hookmanager,$action; @@ -1559,7 +1559,7 @@ class Form * @deprecated Use select_dolusers instead * @see select_dolusers() */ - function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0') + function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0') { // phpcs:enable print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity); @@ -1589,7 +1589,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ - function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false) + function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1797,7 +1797,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ - function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array()) + function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array()) { // phpcs:enable global $conf, $user, $langs; @@ -1890,7 +1890,7 @@ class Form * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @return void */ - function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array()) + function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array()) { // phpcs:enable global $langs,$conf; @@ -2032,7 +2032,7 @@ class Form * 'warehouseinternal' = select products from warehouses for internal correct/transfer only * @return array Array of keys for json */ - function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='') + function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '') { // phpcs:enable global $langs,$conf,$user,$db; @@ -2324,7 +2324,7 @@ class Form * @param int $hidepriceinlabel Hide price in label * @return void */ - private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel=0) + private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel = 0) { global $langs,$conf,$user,$db; @@ -2546,7 +2546,7 @@ class Form * @param string $morecss More CSS * @return void */ - function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0, $morecss='') + function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '') { // phpcs:enable global $langs,$conf; @@ -2592,7 +2592,7 @@ class Form * @param string $morecss Add more CSS * @return array Array of keys for json */ - function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0,$morecss='') + function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '') { // phpcs:enable global $langs,$conf,$db; @@ -2816,7 +2816,7 @@ class Form * @param int $selected_supplier Pre-selected supplier if more than 1 result * @return void */ - function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') + function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '') { // phpcs:enable global $langs,$conf; @@ -2930,7 +2930,7 @@ class Form * @param int $showempty Add an empty field * @return integer|null */ - function select_address($selected, $socid, $htmlname='address_id',$showempty=0) + function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0) { // phpcs:enable // looking for users @@ -3081,7 +3081,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function selectAvailabilityDelay($selected='',$htmlname='availid',$filtertype='',$addempty=0) + function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0) { global $langs,$user; @@ -3167,7 +3167,7 @@ class Form * @param int $addempty Add an empty entry * @return void */ - function selectInputReason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0) + function selectInputReason($selected = '', $htmlname = 'demandreasonid', $exclude = '', $addempty = 0) { global $langs,$user; @@ -3263,7 +3263,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ - function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='') + function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '') { // phpcs:enable global $langs, $user, $conf; @@ -3310,7 +3310,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ - function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') + function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '') { // phpcs:enable global $langs,$user; @@ -3364,7 +3364,7 @@ class Form * @param string $htmlname Nom de la zone select * @return string Code of HTML select to chose tax or not */ - function selectPriceBaseType($selected='',$htmlname='price_base_type') + function selectPriceBaseType($selected = '', $htmlname = 'price_base_type') { global $langs; @@ -3402,7 +3402,7 @@ class Form * @param string $moreattrib To add more attribute on select * @return void */ - function selectShippingMethod($selected='',$htmlname='shipping_method_id',$filtre='',$useempty=0,$moreattrib='') + function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; @@ -3455,7 +3455,7 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectShippingMethod($page, $selected='', $htmlname='shipping_method_id', $addempty=0) + function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0) { global $langs, $db; @@ -3540,7 +3540,7 @@ class Form * @param int $showempty Add a nempty line * @return string HTML select */ - function selectUnits($selected = '', $htmlname = 'units', $showempty=0) + function selectUnits($selected = '', $htmlname = 'units', $showempty = 0) { global $langs; @@ -3591,7 +3591,7 @@ class Form * @param int $showcurrency Show currency in label * @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...) */ - function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) + function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0) { // phpcs:enable global $langs, $conf; @@ -3661,7 +3661,7 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempty=0) + function formSelectAccount($page, $selected = '', $htmlname = 'fk_account', $addempty = 0) { global $langs; if ($htmlname != "none") { @@ -3699,7 +3699,7 @@ class Form * @return string * @see select_categories */ - function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0) + function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0) { // phpcs:enable global $conf, $langs; @@ -3790,7 +3790,7 @@ class Form * @deprecated * @see formconfirm() */ - function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) + function form_confirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = "", $useajax = 0, $height = 170, $width = 500) { // phpcs:enable dol_syslog(__METHOD__ . ': using form_confirm is deprecated. Use formconfim instead.', LOG_WARNING); @@ -3821,7 +3821,7 @@ class Form * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section. * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ - function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice='', $useajax=0, $height=210, $width=500, $disableformtag=0) + function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 210, $width = 500, $disableformtag = 0) { global $langs,$conf; global $useglobalvars; @@ -4101,7 +4101,7 @@ class Form * @param int $nooutput No print is done. String is returned. * @return string Return html content */ - function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) + function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -4157,7 +4157,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0) + function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0) { // phpcs:enable global $langs; @@ -4192,7 +4192,7 @@ class Form * @param int $addempty Ajoute entree vide * @return void */ - function form_availability($page, $selected='', $htmlname='availability', $addempty=0) + function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0) { // phpcs:enable global $langs; @@ -4227,7 +4227,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function formInputReason($page, $selected='', $htmlname='demandreason', $addempty=0) + function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0) { global $langs; if ($htmlname != "none") @@ -4271,7 +4271,7 @@ class Form * @return string * @see selectDate */ - function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) + function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -4312,7 +4312,7 @@ class Form * @param array $include List of users id to include * @return void */ - function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='') + function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '') { // phpcs:enable global $langs; @@ -4353,7 +4353,7 @@ class Form * @param int $addempty 1=Add empty entry * @return void */ - function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1, $addempty=0) + function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0) { // phpcs:enable global $langs; @@ -4387,7 +4387,7 @@ class Form * @param string $htmlname Name of select html field * @return void */ - function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') + function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code') { // phpcs:enable global $langs; @@ -4417,7 +4417,7 @@ class Form * @param string $currency Currency code to explain the rate * @return void */ - function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='') + function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '') { // phpcs:enable global $langs, $mysoc, $conf; @@ -4466,7 +4466,7 @@ class Form * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return void */ - function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0) + function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0) { // phpcs:enable global $conf,$langs; @@ -4557,7 +4557,7 @@ class Form * @param string $htmlname Name of HTML select. If 'none', we just show contact link. * @return void */ - function form_contacts($page, $societe, $selected='', $htmlname='contactid') + function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid') { // phpcs:enable global $langs, $conf; @@ -4608,7 +4608,7 @@ class Form * @param int $nooutput No print output. Return it only. * @return void */ - function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $nooutput=0) + function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0) { // phpcs:enable global $langs; @@ -4651,7 +4651,7 @@ class Form * @deprecated * @return void */ - function select_currency($selected='',$htmlname='currency_id') + function select_currency($selected = '', $htmlname = 'currency_id') { // phpcs:enable print $this->selectCurrency($selected,$htmlname); @@ -4664,7 +4664,7 @@ class Form * @param string $htmlname name of HTML select list * @return string */ - function selectCurrency($selected='',$htmlname='currency_id') + function selectCurrency($selected = '', $htmlname = 'currency_id') { global $conf,$langs,$user; @@ -4707,7 +4707,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - function selectMultiCurrency($selected='', $htmlname='multicurrency_code', $useempty=0) + function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) { global $db,$conf,$langs,$user; @@ -4844,7 +4844,7 @@ class Form * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @return string */ - function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0) + function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) { // phpcs:enable global $langs,$conf,$mysoc; @@ -5044,7 +5044,7 @@ class Form * @deprecated * @see form_date, select_month, select_year, select_dayofweek */ - function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') { // phpcs:enable $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); @@ -5077,7 +5077,7 @@ class Form * @return string Html for selectDate * @see form_date, select_month, select_year, select_dayofweek */ - function selectDate($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') { global $conf,$langs; @@ -5440,7 +5440,7 @@ class Form * @param int $nooutput Do not output html string but return it * @return string|void */ - function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) + function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -5528,7 +5528,7 @@ class Form * @return string Return HTML string * @see selectForFormsList select_thirdparty */ - function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0) + function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0) { global $conf, $user; @@ -5598,7 +5598,7 @@ class Form * @return string Return HTML string * @see selectForForms */ - function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0, $outputmode=0) + function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0) { global $conf, $langs, $user; @@ -5735,7 +5735,7 @@ class Form * @return string HTML select string. * @see multiselectarray, selectArrayAjax, selectArrayFilter */ - static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='',$disablebademail=0, $nohtmlescape=0) + static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '', $addjscombo = 0, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0) { global $conf, $langs; @@ -5845,7 +5845,7 @@ class Form * @return string HTML select string * @see selectArrayFilter, ajax_combobox in ajax.lib.php */ - static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) + static function selectArrayAjax($htmlname, $url, $id = '', $moreparam = '', $moreparamtourl = '', $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) { global $conf, $langs; global $delayedhtmlcontent; @@ -5947,7 +5947,7 @@ class Form * @return string HTML select string * @see selectArrayAjax, ajax_combobox in ajax.lib.php */ - static function selectArrayFilter($htmlname, $array, $id='', $moreparam='', $disableFiltering=0, $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) + static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) { global $conf, $langs; global $delayedhtmlcontent; @@ -6065,7 +6065,7 @@ class Form * @return string HTML multiselect string * @see selectarray, selectArrayAjax, selectArrayFilter */ - static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='', $elemtype='', $placeholder='', $addjscombo=-1) + static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1) { global $conf, $langs; @@ -6264,7 +6264,7 @@ class Form * @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect (recommended) * @return string String with categories */ - function showCategories($id, $type, $rendermode=0) + function showCategories($id, $type, $rendermode = 0) { global $db; @@ -6309,7 +6309,7 @@ class Form * @param array $compatibleImportElementsList Array of compatibles elements object for "import from" action * @return int <0 if KO, >=0 if OK */ - function showLinkedObjectBlock($object, $morehtmlright='',$compatibleImportElementsList=false) + function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false) { global $conf,$langs,$hookmanager; global $bc; @@ -6457,7 +6457,7 @@ class Form * @param array $excludelinksto Do not show links of this type, for exemple array('order') or array('supplier_order'). null or array() if no exclusion. * @return string <0 if KO, >0 if OK */ - function showLinkToObjectBlock($object, $restrictlinksto=array(), $excludelinksto=array()) + function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array()) { global $conf, $langs, $hookmanager; global $bc; @@ -6630,7 +6630,7 @@ class Form * @param int $useempty 1=Add empty line * @return string See option */ - function selectyesno($htmlname, $value='', $option=0, $disabled=false, $useempty=0) + function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0) { global $langs; @@ -6672,7 +6672,7 @@ class Form * @param int $useempty Affiche valeur vide dans liste * @return void */ - function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0) + function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -6730,7 +6730,7 @@ class Form * @param string $morehtmlright More html code to show after ref. * @return string Portion HTML with ref + navigation buttons */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='') + function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '') { global $langs,$conf,$hookmanager; @@ -6880,7 +6880,7 @@ class Form * @param int $width Width of photo * @return string HTML code to output barcode */ - function showbarcode(&$object,$width=100) + function showbarcode(&$object, $width = 100) { global $conf; @@ -6917,7 +6917,7 @@ class Form * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty. * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='') + static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '') { global $conf,$langs; @@ -7076,7 +7076,7 @@ class Form * @return string * @see select_dolusers */ - function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false) + function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -7191,7 +7191,7 @@ class Form * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes * @return string */ - function showCheckAddButtons($cssclass='checkforaction', $calljsfunction=0) + function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0) { global $conf, $langs; @@ -7230,7 +7230,7 @@ class Form * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes * @return string */ - function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0) + function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0) { $out.=$this->showFilterButtons(); if ($addcheckuncheckall) @@ -7252,7 +7252,7 @@ class Form * @param array $params param to give * @return string */ - function selectExpenseCategories($selected='', $htmlname='fk_c_exp_tax_cat', $useempty=0, $excludeid=array(), $target='', $default_selected=0, $params=array()) + function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array()) { global $db, $conf, $langs, $user; @@ -7341,7 +7341,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - function selectExpenseRanges($selected='', $htmlname='fk_range', $useempty=0) + function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0) { global $db,$conf,$langs; @@ -7378,7 +7378,7 @@ class Form * @param integer $useid 0=use 'code' as key, 1=use 'id' as key * @return string */ - function selectExpense($selected='', $htmlname='fk_c_type_fees', $useempty=0, $allchoice=1, $useid=0) + function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0) { global $db,$langs; diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 5ffaf0463a6..41476fb4966 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -70,7 +70,7 @@ class FormAccounting extends Form * @param int $disabledajaxcombo Disable ajax combo box. * @return string String with HTML select */ - function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0) + function select_journal($selectid, $htmlname = 'journal', $nature = 0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '', $disabledajaxcombo = 0) { // phpcs:enable global $conf,$langs; @@ -151,7 +151,7 @@ class FormAccounting extends Form * @param int $allcountries All countries * @return void */ - function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0) + function select_accounting_category($selected = '', $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0) { // phpcs:enable global $db,$langs,$user,$mysoc; @@ -267,7 +267,7 @@ class FormAccounting extends Form * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @return string String with HTML select */ - function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='') + function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '') { // phpcs:enable global $conf, $langs; @@ -356,7 +356,7 @@ class FormAccounting extends Form * @param string $morecss More css * @return string String with HTML select */ - function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') + function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth200') { // phpcs:enable diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 15db641a5ec..2f345bb20e4 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -64,7 +64,7 @@ class FormActions * @param string $morecss More css on select field * @return void */ - function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100') + function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') { // phpcs:enable global $langs,$conf; @@ -168,7 +168,7 @@ class FormActions * @param string $morehtmlright More html text on right of title line * @return int <0 if KO, >=0 if OK */ - function showactions($object, $typeelement, $socid=0, $forceshowtitle=0, $morecss='listactions', $max=0, $moreparambacktopage='', $morehtmlright='') + function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlright = '') { global $langs,$conf,$user; global $bc; @@ -327,7 +327,7 @@ class FormActions * @param int $nooutput 1=No output * @return string */ - function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0) + function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0) { // phpcs:enable global $langs,$user,$form,$conf; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 32a421a7b61..e96ec257c93 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -59,7 +59,7 @@ class FormAdmin * @param int $forcecombo Force to use combo box (so no ajax beautify effect) * @return string Return HTML select string with list of languages */ - function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0) + function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0) { // phpcs:enable global $langs; @@ -131,7 +131,7 @@ class FormAdmin * @param string $moreattrib More attributes on html select tag * @return integer|null */ - function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='') + function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib = '') { // phpcs:enable global $langs,$conf; @@ -293,7 +293,7 @@ class FormAdmin * @param string $htmlname Nom de la zone select * @return void */ - function select_timezone($selected,$htmlname) + function select_timezone($selected, $htmlname) { // phpcs:enable global $langs,$conf; @@ -349,7 +349,7 @@ class FormAdmin * @param int $showempty Add empty value * @return string Return HTML output */ - function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0) + function select_paper_format($selected = '', $htmlname = 'paperformat_id', $filter = 0, $showempty = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 65a3213bad8..f7a7199ab03 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -60,7 +60,7 @@ class FormBarCode * @param int $idForm Id du formulaire * @return string HTML select string */ - function setBarcodeEncoder($selected,$barcodelist,$code_id,$idForm='formbarcode') + function setBarcodeEncoder($selected, $barcodelist, $code_id, $idForm = 'formbarcode') { global $conf, $langs; @@ -123,7 +123,7 @@ class FormBarCode * @return void * @deprecated */ - function select_barcode_type($selected='', $htmlname='barcodetype_id', $useempty=0) + function select_barcode_type($selected = '', $htmlname = 'barcodetype_id', $useempty = 0) { // phpcs:enable print $this->selectBarcodeType($selected, $htmlname, $useempty); @@ -137,7 +137,7 @@ class FormBarCode * @param int $useempty Display empty value in select * @return string */ - function selectBarcodeType($selected='', $htmlname='barcodetype_id', $useempty=0) + function selectBarcodeType($selected = '', $htmlname = 'barcodetype_id', $useempty = 0) { global $langs, $conf; @@ -193,7 +193,7 @@ class FormBarCode * @return void * @deprecated */ - function form_barcode_type($page, $selected='', $htmlname='barcodetype_id') + function form_barcode_type($page, $selected = '', $htmlname = 'barcodetype_id') { // phpcs:enable print $this->formBarcodeType($page, $selected, $htmlname); @@ -207,7 +207,7 @@ class FormBarCode * @param string $htmlname Nom du formulaire select * @return string */ - function formBarcodeType($page, $selected='', $htmlname='barcodetype_id') + function formBarcodeType($page, $selected = '', $htmlname = 'barcodetype_id') { global $langs, $conf; $out = ''; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9d0bded74b6..065b241095a 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -60,7 +60,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types */ - function typent_array($mode=0, $filter='') + function typent_array($mode = 0, $filter = '') { // phpcs:enable global $langs,$mysoc; @@ -103,7 +103,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types d'effectifs */ - function effectif_array($mode=0, $filter='') + function effectif_array($mode = 0, $filter = '') { // phpcs:enable $effs = array(); @@ -145,7 +145,7 @@ class FormCompany * @param int $empty Add empty value in list * @return void */ - function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0) + function form_prospect_level($page, $selected = '', $htmlname = 'prospect_level_id', $empty = 0) { // phpcs:enable global $user, $langs; @@ -199,7 +199,7 @@ class FormCompany * @param string $htmlname Id of department * @return void */ - function select_departement($selected='',$country_codeid=0, $htmlname='state_id') + function select_departement($selected = '', $country_codeid = 0, $htmlname = 'state_id') { // phpcs:enable print $this->select_state($selected,$country_codeid, $htmlname); @@ -219,7 +219,7 @@ class FormCompany * @return string String with HTML select * @see select_country */ - function select_state($selected='',$country_codeid=0, $htmlname='state_id') + function select_state($selected = '', $country_codeid = 0, $htmlname = 'state_id') { // phpcs:enable global $conf,$langs,$user; @@ -332,7 +332,7 @@ class FormCompany * @param string $htmlname Name of HTML select field * @return void */ - function select_region($selected='',$htmlname='region_id') + function select_region($selected = '', $htmlname = 'region_id') { // phpcs:enable global $conf,$langs; @@ -398,7 +398,7 @@ class FormCompany * @param string $morecss Add more css on SELECT element * @return string String with HTML select */ - function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100') + function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth100') { // phpcs:enable global $conf,$langs,$user; @@ -459,7 +459,7 @@ class FormCompany * @deprecated Use print xxx->select_juridicalstatus instead * @see select_juridicalstatus() */ - function select_forme_juridique($selected='', $country_codeid=0, $filter='') + function select_forme_juridique($selected = '', $country_codeid = 0, $filter = '') { // phpcs:enable print $this->select_juridicalstatus($selected, $country_codeid, $filter); @@ -476,7 +476,7 @@ class FormCompany * @param string $htmlname HTML name of select * @return string String with HTML select */ - function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code') + function select_juridicalstatus($selected = '', $country_codeid = 0, $filter = '', $htmlname = 'forme_juridique_code') { // phpcs:enable global $conf,$langs,$user; @@ -581,7 +581,7 @@ class FormCompany * @param string $morecss More CSS on select component * @return int The selected third party ID */ - function selectCompaniesForNewContact($object, $var_id, $selected='', $htmlname='newcompany', $limitto='', $forceid=0, $moreparam='', $morecss='') + function selectCompaniesForNewContact($object, $var_id, $selected = '', $htmlname = 'newcompany', $limitto = '', $forceid = 0, $moreparam = '', $morecss = '') { global $conf, $langs; @@ -740,7 +740,7 @@ class FormCompany * @param string $morecss Add more css to select component * @return void */ - function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $sortorder='position', $showempty=0, $morecss='') + function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') { global $user, $langs; @@ -774,7 +774,7 @@ class FormCompany * @param string $morecss More css * @return string */ - function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='') + function select_ziptown($selected = '', $htmlname = 'zipcode', $fields = '', $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '') { // phpcs:enable global $conf; @@ -805,7 +805,7 @@ class FormCompany * @param string $morecss More css * @return string HTML string with prof id */ - function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent') + function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 5bdb00cfc40..f09758aec2d 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -60,7 +60,7 @@ class FormContract * @param int $showempty Show empty line * @return int Nbr of project if OK, <0 if KO */ - function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) + function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) { // phpcs:enable global $db,$user,$conf,$langs; @@ -177,7 +177,7 @@ class FormContract * @param int $showempty Show empty line * @return int Nbr of project if OK, <0 if KO */ - function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) + function formSelectContract($page, $socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) { global $langs; diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 94747481cb0..13cf88e9aa2 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -58,7 +58,7 @@ class FormCron extends Form * @param integer $readonly Select is read only or not * @return string HTML select field */ - function select_typejob($htmlname,$selected=0,$readonly=0) + function select_typejob($htmlname, $selected = 0, $readonly = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d8af718bb04..5bd33520420 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -77,7 +77,7 @@ class FormFile * @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be) * @return int <0 if KO, >0 if OK */ - function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='') + function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '') { // phpcs:enable global $conf,$langs, $hookmanager; @@ -255,7 +255,7 @@ class FormFile * @return int <0 if KO, number of shown files if OK * @deprecated Use print xxx->showdocuments() instead. */ - function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='') + function show_documents($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '') { // phpcs:enable $this->numoffiles=0; @@ -288,7 +288,7 @@ class FormFile * @param int $hideifempty Hide section of generated files if there is no file * @return string Output string with HTML array of documents (might be empty string) */ - function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$morepicto='',$object=null,$hideifempty=0) + function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '', $morepicto = '', $object = null, $hideifempty = 0) { // Deprecation warning if (! empty($iconPDF)) { @@ -887,7 +887,7 @@ class FormFile * @param string $filter Filter filenames on this regex string (Example: '\.pdf$') * @return string Output string with HTML link of documents (might be empty string). This also fill the array ->infofiles */ - function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter='') + function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = '') { global $conf, $langs; @@ -1022,7 +1022,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_autoecmfiles */ - function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0) + function list_of_documents($filearray, $object, $modulepart, $param = '', $forcedownload = 0, $relativepath = '', $permonobject = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $title = '', $url = '', $showrelpart = 0, $permtoeditline = -1, $upload_dir = '', $sortfield = '', $sortorder = 'ASC', $disablemove = 1, $addfilterfields = 0) { // phpcs:enable global $user, $conf, $langs, $hookmanager; @@ -1412,7 +1412,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_documents */ - function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0) + function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permtodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0) { // phpcs:enable global $user, $conf, $langs, $form; @@ -1695,7 +1695,7 @@ class FormFile * @param string $param More param to add into URL * @return int Number of links */ - public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='') + public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '') { global $user, $conf, $langs, $user; global $sortfield, $sortorder; @@ -1831,7 +1831,7 @@ class FormFile * @param string $param More param on http links * @return string $out Output string with HTML */ - public function showPreview($file, $modulepart, $relativepath, $ruleforpicto=0, $param='') + public function showPreview($file, $modulepart, $relativepath, $ruleforpicto = 0, $param = '') { global $langs, $conf; diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index ae35b74fad9..a9602f8a158 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -60,7 +60,7 @@ class FormIntervention * @param int $showempty Show empty line * @return int Nbre of project if OK, <0 if KO */ - function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1) + function select_interventions($socid = -1, $selected = '', $htmlname = 'interventionid', $maxlength = 16, $showempty = 1) { // phpcs:enable global $db,$user,$conf,$langs; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2cb10056cc3..ac4ce55ebba 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -183,7 +183,7 @@ class FormMail extends Form * @param string $type Mime type (can be dol_mimetype($file)) * @return void */ - function add_attached_files($path, $file='', $type='') + function add_attached_files($path, $file = '', $type = '') { // phpcs:enable $listofpaths=array(); @@ -268,7 +268,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return void */ - function show_form($addfileaction='addfile',$removefileaction='removefile') + function show_form($addfileaction = 'addfile', $removefileaction = 'removefile') { // phpcs:enable print $this->get_form($addfileaction,$removefileaction); @@ -285,7 +285,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return string Form to show */ - function get_form($addfileaction='addfile', $removefileaction='removefile') + function get_form($addfileaction = 'addfile', $removefileaction = 'removefile') { // phpcs:enable global $conf, $langs, $user, $hookmanager, $form; @@ -1143,7 +1143,7 @@ class FormMail extends Form * @param string $label Label of template * @return ModelMail One instance of ModelMail */ - public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id=0, $active=1, $label='') + public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id = 0, $active = 1, $label = '') { $ret = new ModelMail(); @@ -1267,7 +1267,7 @@ class FormMail extends Form * @param int $active 1=Only active template, 0=Only disabled, -1=All * @return int <0 if KO, nb of records found if OK */ - public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active=1) + public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1) { $ret=array(); @@ -1378,7 +1378,7 @@ class FormMail extends Form * @param Object $object Object if applicable * @return array Array of substitution values for emails. */ - static function getAvailableSubstitKey($mode='formemail', $object=null) + static function getAvailableSubstitKey($mode = 'formemail', $object = null) { global $conf, $langs; diff --git a/htdocs/core/class/html.formmailing.class.php b/htdocs/core/class/html.formmailing.class.php index 067692f5094..95c2c057b40 100644 --- a/htdocs/core/class/html.formmailing.class.php +++ b/htdocs/core/class/html.formmailing.class.php @@ -40,7 +40,7 @@ class FormMailing extends Form * @param integer $show_empty Show empty option * @return string HTML select */ - public function selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0) + public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0) { global $langs; diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index cdd827145b0..8492237d68f 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -59,7 +59,7 @@ class FormMargin * @param boolean $force_price True of not * @return array Array with info */ - function getMarginInfosArray($object, $force_price=false) + function getMarginInfosArray($object, $force_price = false) { global $conf, $db; @@ -191,7 +191,7 @@ class FormMargin * @param boolean $force_price Force price * @return void */ - function displayMarginInfos($object, $force_price=false) + function displayMarginInfos($object, $force_price = false) { global $langs, $conf, $user; diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 781b3f76e4f..c16f292d10d 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -39,7 +39,7 @@ class FormOrder extends Form * @param string $hmlname Name of HTML select element * @return void */ - public function selectSupplierOrderStatus($selected='', $short=0, $hmlname='order_status') + public function selectSupplierOrderStatus($selected = '', $short = 0, $hmlname = 'order_status') { $options = array(); @@ -74,7 +74,7 @@ class FormOrder extends Form * @param int $addempty 0=list with no empty value, 1=list with empty value * @return array Tableau des sources de commandes */ - public function selectInputMethod($selected='',$htmlname='source_id',$addempty=0) + public function selectInputMethod($selected = '', $htmlname = 'source_id', $addempty = 0) { global $langs; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 8ca0b988fda..ce3fe126a51 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -67,7 +67,7 @@ class FormOther * @param int $fk_user Utilisateur créant le modèle * @return void */ - function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null) + function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -119,7 +119,7 @@ class FormOther * @param int $useempty Affiche valeur vide dans liste * @return void */ - function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0) + function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -168,7 +168,7 @@ class FormOther * @param string $htmlname Name of combo list * @return integer */ - function select_ecotaxes($selected='', $htmlname='ecotaxe_id') + function select_ecotaxes($selected = '', $htmlname = 'ecotaxe_id') { // phpcs:enable global $langs; @@ -227,7 +227,7 @@ class FormOther * @param string $country_code Country Code * @return string HTML select list */ - function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='') + function select_revenue_stamp($selected = '', $htmlname = 'revenuestamp', $country_code = '') { // phpcs:enable global $langs; @@ -290,7 +290,7 @@ class FormOther * @param int $showempty Add also an empty line * @return string HTML select string */ - function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0) + function select_percent($selected = 0, $htmlname = 'percent', $disabled = 0, $increment = 5, $start = 0, $end = 100, $showempty = 0) { // phpcs:enable $return = '<select class="flat" name="'.$htmlname.'" '.($disabled?'disabled':'').'>'; @@ -328,7 +328,7 @@ class FormOther * @return string Html combo list code * @see select_all_categories */ - function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='') + function select_categories($type, $selected = 0, $htmlname = 'search_categ', $nocateg = 0, $showempty = 1, $morecss = '') { // phpcs:enable global $conf, $langs; @@ -389,7 +389,7 @@ class FormOther * @param string $morecss More CSS * @return string Html combo list code */ - function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0,$showempty=1,$morecss='') + function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '') { // phpcs:enable global $conf,$langs; @@ -490,7 +490,7 @@ class FormOther * @param string $morecss More css * @return void */ - function selectProjectTasks($selectedtask='', $projectid=0, $htmlname='task_parent', $modeproject=0, $modetask=0, $mode=0, $useempty=0, $disablechildoftaskid=0, $filteronprojstatus='', $morecss='') + function selectProjectTasks($selectedtask = '', $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '') { global $user, $langs; @@ -528,7 +528,7 @@ class FormOther * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id * @return void */ - private function _pLineSelect(&$inc, $parent, $lines, $level=0, $selectedtask=0, $selectedproject=0, $disablechildoftaskid=0) + private function _pLineSelect(&$inc, $parent, $lines, $level = 0, $selectedtask = 0, $selectedproject = 0, $disablechildoftaskid = 0) { global $langs, $user, $conf; @@ -621,7 +621,7 @@ class FormOther * @return string HTML code for color thumb * @see selectColor */ - static function showColor($color, $textifnotdefined='') + static function showColor($color, $textifnotdefined = '') { $textcolor='FFF'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -646,7 +646,7 @@ class FormOther * @deprecated Use instead selectColor * @see selectColor() */ - function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='') + function select_color($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '') { // phpcs:enable print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors); @@ -664,7 +664,7 @@ class FormOther * @return string * @see showColor */ - static function selectColor($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='', $morecss='') + static function selectColor($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '', $morecss = '') { // Deprecation warning if ($form_name) { @@ -763,7 +763,7 @@ class FormOther * @param int $y Hauteur de l'image en pixels * @return void */ - function CreateColorIcon($color,$module,$name,$x='12',$y='12') + function CreateColorIcon($color, $module, $name, $x = '12', $y = '12') { // phpcs:enable global $conf; @@ -802,7 +802,7 @@ class FormOther * @param int $useempty Affiche valeur vide dans liste * @return string */ - function select_dayofweek($selected='',$htmlname='weekid',$useempty=0) + function select_dayofweek($selected = '', $htmlname = 'weekid', $useempty = 0) { // phpcs:enable global $langs; @@ -850,7 +850,7 @@ class FormOther * @param string $morecss More Css * @return string */ - function select_month($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='') + function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = '') { // phpcs:enable global $langs; @@ -897,7 +897,7 @@ class FormOther * @param string $morecss More CSS * @return string */ - function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto') + function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') { // phpcs:enable print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss); @@ -917,7 +917,7 @@ class FormOther * @param string $morecss More css * @return string */ - function selectyear($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto') + function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') { $out=''; @@ -968,7 +968,7 @@ class FormOther * @param int $originid Id de l'origine * @return void */ - function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='') + function form_address($page, $selected, $socid, $htmlname = 'address_id', $origin = '', $originid = '') { // phpcs:enable global $langs,$conf; @@ -1011,7 +1011,7 @@ class FormOther * @param String $areacode Code of area for pages ('0'=value for Home page) * @return array array('selectboxlist'=>, 'boxactivated'=>, 'boxlista'=>, 'boxlistb'=>) */ - static function getBoxesArea($user,$areacode) + static function getBoxesArea($user, $areacode) { global $conf,$langs,$db; @@ -1231,7 +1231,7 @@ class FormOther * @param string $moreattrib More attributes on HTML select tag * @return void */ - function select_dictionary($htmlname,$dictionarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0,$moreattrib='') + function select_dictionary($htmlname, $dictionarytable, $keyfield = 'code', $labelfield = 'label', $selected = '', $useempty = 0, $moreattrib = '') { // phpcs:enable global $langs, $conf; diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index dea04047405..d91142bd6bd 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -71,7 +71,7 @@ class FormProjets * @param int $htmlid Html id to use instead of htmlname * @return string Return html content */ - function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0, $forceaddid=0, $morecss='', $htmlid='') + function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '') { // phpcs:enable global $langs,$conf,$form; @@ -140,7 +140,7 @@ class FormProjets * @param string $morecss More CSS * @return int Nb of project if OK, <0 if KO */ - function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500') + function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500') { // phpcs:enable global $user,$conf,$langs; @@ -320,7 +320,7 @@ class FormProjets * @param User $usertofilter User object to use for filtering * @return int Nbr of project if OK, <0 if KO */ - function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $projectsListId='', $showproject='all', $usertofilter=null) + function selectTasks($socid = -1, $selected = '', $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null) { global $user,$conf,$langs; @@ -488,7 +488,7 @@ class FormProjets * @param string $projectkey Equivalent key to fk_projet for actual table_element * @return int|string The HTML select list of element or '' if nothing or -1 if KO */ - function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet") + function select_element($table_element, $socid = 0, $morecss = '', $limitonstatus = -2, $projectkey = "fk_projet") { // phpcs:enable global $conf, $langs; @@ -618,7 +618,7 @@ class FormProjets * @param string $morecss Add more css * @return int|string The HTML select list of element or '' if nothing or -1 if KO */ - function selectOpportunityStatus($htmlname, $preselected='-1', $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0, $morecss='') + function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '') { global $conf, $langs; diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index c4ac522d98a..1f4fad0829c 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -60,7 +60,7 @@ class FormPropal * @param string $htmlname Name of select field * @return void */ - function selectProposalStatus($selected='',$short=0, $excludedraft=0, $showempty=1, $mode='customer',$htmlname='propal_statut') + function selectProposalStatus($selected = '', $short = 0, $excludedraft = 0, $showempty = 1, $mode = 'customer', $htmlname = 'propal_statut') { global $langs; diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 4ef6208723d..9d300db27e8 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -100,7 +100,7 @@ class FormSms * @param int $showform Show form tags and submit button (recommanded is to use with value 0) * @return void */ - function show_form($morecss='titlefield', $showform=1) + function show_form($morecss = 'titlefield', $showform = 1) { // phpcs:enable global $conf, $langs, $user, $form; diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index 99e36878390..9f9ed7ab1d2 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -61,7 +61,7 @@ class FormSocialContrib * @param string $morecss Add more CSS on select * @return void */ - function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300') + function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300') { // phpcs:enable global $conf,$db,$langs,$user,$mysoc; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 6c4a9703014..a04032463c9 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -124,7 +124,7 @@ class FormTicket * @param int $withdolfichehead With dol_fiche_head * @return void */ - public function showForm($withdolfichehead=0) + public function showForm($withdolfichehead = 0) { global $conf, $langs, $user, $hookmanager; @@ -431,7 +431,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; @@ -531,7 +531,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; @@ -632,7 +632,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index f5feccd5860..fea4f34332c 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -54,7 +54,7 @@ class FormWebsite * @param int $useempty Show empty value or not * @return string Html component */ - function selectWebsite($selected='',$htmlname='exportmodelid',$useempty=0) + function selectWebsite($selected = '', $htmlname = 'exportmodelid', $useempty = 0) { $out=''; @@ -107,7 +107,7 @@ class FormWebsite * @param string $moreattrib More attributes on HTML select tag * @return void */ - function selectTypeOfContainer($htmlname, $selected='', $useempty=0, $moreattrib='') + function selectTypeOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; @@ -170,7 +170,7 @@ class FormWebsite * @param string $moreattrib More attributes on HTML select tag * @return void */ - function selectSampleOfContainer($htmlname, $selected='', $useempty=0, $moreattrib='') + function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index dedf3ec384f..0a97429be44 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -48,7 +48,7 @@ class InfoBox * @param int $includehidden Include also hidden boxes * @return array Array of boxes */ - static function listBoxes($db, $mode, $zone, $user=null, $excludelist=array(), $includehidden=1) + static function listBoxes($db, $mode, $zone, $user = null, $excludelist = array(), $includehidden = 1) { global $conf; @@ -186,7 +186,7 @@ class InfoBox * @param int $userid Id of user * @return int <0 if KO, 0=Nothing done, > 0 if OK */ - static function saveboxorder($db, $zone,$boxorder,$userid=0) + static function saveboxorder($db, $zone, $boxorder, $userid = 0) { global $conf; diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 6f43643eeb7..7c8bb689de5 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -65,7 +65,7 @@ class Interfaces * @param Conf $conf Objet conf * @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise. */ - function run_triggers($action,$object,$user,$langs,$conf) + function run_triggers($action, $object, $user, $langs, $conf) { // phpcs:enable // Check parameters @@ -241,7 +241,7 @@ class Interfaces * @param array $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only. * @return array Array list of triggers */ - function getTriggersList($forcedirtriggers=null) + function getTriggersList($forcedirtriggers = null) { global $conf, $langs, $db; diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 8c42d691d39..2c845440ec1 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -333,7 +333,7 @@ class Ldap * @param string $pass Password * @return boolean true or false */ - function bindauth($bindDn,$pass) + function bindauth($bindDn, $pass) { if (! $this->result = @ldap_bind($this->connection, $bindDn, $pass)) { @@ -569,7 +569,7 @@ class Ldap * @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) (for ldap_rename) * @return int <0 if KO, >0 if OK */ - function update($dn, $info, $user, $olddn, $newrdn=false, $newparent=false) + function update($dn, $info, $user, $olddn, $newrdn = false, $newparent = false) { global $conf; @@ -741,7 +741,7 @@ class Ldap * @param int $timeout Timeout in second (default 1s) * @return boolean true or false */ - function serverPing($host, $port=389, $timeout=1) + function serverPing($host, $port = 389, $timeout = 1) { // Replace ldaps:// by ssl:// if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/',$host, $regs)) { @@ -925,7 +925,7 @@ class Ldap * @param string $filter Filter * @return int|array <0 or false if KO, array if OK */ - function getAttribute($dn,$filter) + function getAttribute($dn, $filter) { // Check parameters if (! $this->connection) @@ -970,7 +970,7 @@ class Ldap * @param string $attribute Attributes * @return void */ - function getAttributeValues($filterrecord,$attribute) + function getAttributeValues($filterrecord, $attribute) { $attributes=array(); $attributes[0] = $attribute; @@ -1015,7 +1015,7 @@ class Ldap * @param array $attributeAsArray Array of fields wanted as an array not a string * @return array Array of [id_record][ldap_field]=value */ - function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter=0, $attributeAsArray=array()) + function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter = 0, $attributeAsArray = array()) { $fulllist=array(); @@ -1260,7 +1260,7 @@ class Ldap * Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com) * @return int >0 if OK, <0 if KO */ - function fetch($user,$filter) + function fetch($user, $filter) { // Perform the search and get the entry handles @@ -1463,7 +1463,7 @@ class Ldap * @param string $pagecodefrom Page code of src string * @return string Converted string */ - private function convToOutputCharset($str,$pagecodefrom='UTF-8') + private function convToOutputCharset($str, $pagecodefrom = 'UTF-8') { global $conf; if ($pagecodefrom == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_encode($str); @@ -1478,7 +1478,7 @@ class Ldap * @param string $pagecodeto Page code for result string * @return string Converted string */ - function convFromOutputCharset($str,$pagecodeto='UTF-8') + function convFromOutputCharset($str, $pagecodeto = 'UTF-8') { global $conf; if ($pagecodeto == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_decode($str); @@ -1493,7 +1493,7 @@ class Ldap * @param string $keygroup Key of group * @return int gid number */ - function getNextGroupGid($keygroup='LDAP_KEY_GROUPS') + function getNextGroupGid($keygroup = 'LDAP_KEY_GROUPS') { global $conf; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 8413725ab11..82069e10204 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -72,7 +72,7 @@ class Link extends CommonObject * @param User $user Object of user that ask creation * @return int >= 0 if OK, < 0 if KO */ - public function create($user='') + public function create($user = '') { global $langs,$conf; @@ -156,7 +156,7 @@ class Link extends CommonObject * @param int $call_trigger 0=no, 1=yes * @return int <0 if KO, >=0 if OK */ - public function update($user='', $call_trigger=1) + public function update($user = '', $call_trigger = 1) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -241,7 +241,7 @@ class Link extends CommonObject * @param string $sortorder sort order * @return int 1 if ok, 0 if no records, -1 if error **/ - public function fetchAll(&$links, $objecttype, $objectid, $sortfield=null, $sortorder=null) + public function fetchAll(&$links, $objecttype, $objectid, $sortfield = null, $sortorder = null) { global $conf; @@ -315,7 +315,7 @@ class Link extends CommonObject * @param int $rowid Id of link to load * @return int 1 if ok, 0 if no record found, -1 if error **/ - public function fetch($rowid=null) + public function fetch($rowid = null) { global $conf; diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 3d9d92189a3..872f871b202 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -65,7 +65,7 @@ class Menu * @param string $prefix Prefix to title (image or picto) * @return void */ - function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') + function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix); } @@ -88,7 +88,7 @@ class Menu * @param string $prefix Prefix to title (image or picto) * @return void */ - function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') + function insert($idafter, $url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { $array_start = array_slice($this->liste,0,($idafter+1)); $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix)); diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 86b27948389..641bfeacdcb 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -91,7 +91,7 @@ class Menubase * @param DoliDB $db Database handler * @param string $menu_handler Menu handler */ - function __construct($db,$menu_handler='') + function __construct($db, $menu_handler = '') { $this->db = $db; $this->menu_handler = $menu_handler; @@ -105,7 +105,7 @@ class Menubase * @param User $user User that create * @return int <0 if KO, Id of record if OK */ - function create($user=null) + function create($user = null) { global $conf, $langs; @@ -245,7 +245,7 @@ class Menubase * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -310,7 +310,7 @@ class Menubase * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index e7cd7cabe53..e5616c31c40 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -105,7 +105,7 @@ class Notify * @param Object $object Object the notification is about * @return string Message */ - function confirmMessage($action,$socid,$object) + function confirmMessage($action, $socid, $object) { global $langs; $langs->load("mails"); @@ -146,7 +146,7 @@ class Notify * @param array $scope Scope where to search * @return array|int <0 if KO, array of notifications to send if OK */ - function getNotificationsArray($notifcode, $socid=0, $object=null, $userid=0, $scope=array('thirdparty', 'user', 'global')) + function getNotificationsArray($notifcode, $socid = 0, $object = null, $userid = 0, $scope = array('thirdparty', 'user', 'global')) { global $conf, $user; @@ -309,7 +309,7 @@ class Notify * @param array $mimefilename_list List of attached file name in message * @return int <0 if KO, or number of changes if OK */ - function send($notifcode, $object, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array()) + function send($notifcode, $object, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array()) { global $user,$conf,$langs,$mysoc; global $hookmanager; diff --git a/htdocs/core/class/openid.class.php b/htdocs/core/class/openid.class.php index 48de42ad847..2254ec25cf2 100644 --- a/htdocs/core/class/openid.class.php +++ b/htdocs/core/class/openid.class.php @@ -301,7 +301,7 @@ class SimpleOpenID * @param string $params Params * @return boolean|unknown */ - function FSOCK_Request($url, $method="GET", $params = "") + function FSOCK_Request($url, $method = "GET", $params = "") { // phpcs:enable $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds @@ -335,7 +335,7 @@ class SimpleOpenID * @param string $params Params * @return string */ - function CURL_Request($url, $method="GET", $params = "") + function CURL_Request($url, $method = "GET", $params = "") { // phpcs:enable // Remember, SSL MUST BE SUPPORTED @@ -394,7 +394,7 @@ class SimpleOpenID * @param string $url Url to found endpoint * @return string Endpoint */ - function GetOpenIDServer($url='') + function GetOpenIDServer($url = '') { // phpcs:enable global $conf; @@ -518,7 +518,7 @@ class SimpleOpenID * @param string $url Url of endpoint to request * @return string First endpoint OpenID server found. False if it failed to found. */ - function sendDiscoveryRequestToGetXRDS($url='') + function sendDiscoveryRequestToGetXRDS($url = '') { global $conf; diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index fd37476a26e..931dce263a1 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -184,7 +184,7 @@ class RssParser * @param string $cachedir Directory where to save cache file * @return int <0 if KO, >0 if OK */ - public function parser($urlRSS, $maxNb=0, $cachedelay=60, $cachedir='') + public function parser($urlRSS, $maxNb = 0, $cachedelay = 60, $cachedir = '') { global $conf; @@ -666,7 +666,7 @@ class RssParser * @param string $str2 Str2 * @return string String cancatenated */ - function concat(&$str1, $str2="") + function concat(&$str1, $str2 = "") { if (!isset($str1) ) { $str1=""; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 1ade95098fa..c52261a5530 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -310,7 +310,7 @@ class SMTPs * @param boolean $_part Variant * @return string Errors to */ - function getErrorsTo($_part = true ) + function getErrorsTo($_part = true) { $_retValue = ''; @@ -328,7 +328,7 @@ class SMTPs * @param boolean $_vDebug Value for debug * @return void */ - function setDebug($_vDebug = false ) + function setDebug($_vDebug = false) { $this->_debug = $_vDebug; } @@ -1659,7 +1659,7 @@ class SMTPs * @param integer $_value Message Priority * @return void */ - function setPriority( $_value = 3 ) + function setPriority($_value = 3) { if ( ( is_numeric($_value) ) && ( ( $_value >= 0 ) && ( $_value <= 5 ) ) ) @@ -1748,7 +1748,7 @@ class SMTPs * @param string $type Type of boundary * @return string $_smtpsBoundary MIME message Boundary */ - function _getBoundary($type='mixed') + function _getBoundary($type = 'mixed') { if ($type == 'mixed') return $this->_smtpsBoundary; else if ($type == 'related') return $this->_smtpsRelatedBoundary; @@ -1807,7 +1807,7 @@ class SMTPs * @param string $CRLF CRLF * @return boolean|null True or false */ - function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" ) + function socket_send_str($_strSend, $_returnCode = null, $CRLF = "\r\n") { // phpcs:enable if ($this->_debug) $this->log.=$_strSend; // @CHANGE LDR for log @@ -1828,7 +1828,7 @@ class SMTPs * @param string $_errMsg Error Message * @return void */ - function _setErr( $_errNum, $_errMsg ) + function _setErr($_errNum, $_errMsg) { $this->_smtpsErrors[] = array( 'num' => $_errNum, diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 90986e7b6da..eab2ef70e8a 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -42,7 +42,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonthWithPrevYear($endyear, $startyear, $cachedelay=0, $format=0) + function getNbByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $format = 0) { global $conf,$user,$langs; @@ -136,7 +136,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay=0, $format=0) + function getAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $format = 0) { global $conf,$user,$langs; @@ -228,7 +228,7 @@ abstract class Stats * @param int $startyear End year * @return array Array of values */ - function getAverageByMonthWithPrevYear($endyear,$startyear) + function getAverageByMonthWithPrevYear($endyear, $startyear) { if ($startyear > $endyear) return -1; @@ -264,7 +264,7 @@ abstract class Stats * @param int $cachedelay Delay we accept for cache file (0=No read, no save of cache, -1=No read but save) * @return array Array of values */ - function getAllByProductEntry($year,$cachedelay=0) + function getAllByProductEntry($year, $cachedelay = 0) { global $conf,$user,$langs; @@ -413,7 +413,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of nb each month */ - function _getNbByMonth($year, $sql, $format=0) + function _getNbByMonth($year, $sql, $format = 0) { global $langs; @@ -470,7 +470,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array */ - function _getAmountByMonth($year, $sql, $format=0) + function _getAmountByMonth($year, $sql, $format = 0) { global $langs; @@ -524,7 +524,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array */ - function _getAverageByMonth($year, $sql, $format=0) + function _getAverageByMonth($year, $sql, $format = 0) { global $langs; @@ -577,7 +577,7 @@ abstract class Stats * @param int $limit Limit * @return array */ - function _getAllByProduct($sql, $limit=10) + function _getAllByProduct($sql, $limit = 10) { global $langs; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index a8d22b61257..d13ca7eb567 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -62,7 +62,7 @@ class Translate * @param string $srclang Language to use. If '' or 'auto', we use browser lang. * @return void */ - function setDefaultLang($srclang='en_US') + function setDefaultLang($srclang = 'en_US') { global $conf; @@ -132,7 +132,7 @@ class Translate * @param int $mode 0=Long language code, 1=Short language code (en, fr, es, ...) * @return string Language code used (en_US, en_AU, fr_FR, ...) */ - function getDefaultLang($mode=0) + function getDefaultLang($mode = 0) { if (empty($mode)) return $this->defaultlang; else return substr($this->defaultlang,0,2); @@ -173,7 +173,7 @@ class Translate * @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK * @see loadLangs */ - function load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='',$loadfromfileonly=0) + function load($domain, $alt = 0, $stopafterdirection = 0, $forcelangdir = '', $loadfromfileonly = 0) { global $conf,$db; @@ -594,7 +594,7 @@ class Translate * @param int $maxsize Max length of text * @return string Translated string (encoded into HTML entities and UTF8) */ - function trans($key, $param1='', $param2='', $param3='', $param4='', $maxsize=0) + function trans($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $maxsize = 0) { global $conf; @@ -655,7 +655,7 @@ class Translate * @param string $param5 chaine de param5 * @return string Translated string (encoded into UTF8) */ - function transnoentities($key, $param1='', $param2='', $param3='', $param4='', $param5='') + function transnoentities($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') { return $this->convToOutputCharset($this->transnoentitiesnoconv($key, $param1, $param2, $param3, $param4, $param5)); } @@ -676,7 +676,7 @@ class Translate * @param string $param5 chaine de param5 * @return string Translated string */ - function transnoentitiesnoconv($key, $param1='', $param2='', $param3='', $param4='', $param5='') + function transnoentitiesnoconv($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') { global $conf; @@ -747,7 +747,7 @@ class Translate * @param string $pagecodefrom Page code of src string * @return string Converted string */ - function convToOutputCharset($str,$pagecodefrom='UTF-8') + function convToOutputCharset($str, $pagecodefrom = 'UTF-8') { if ($pagecodefrom == 'ISO-8859-1' && $this->charset_output == 'UTF-8') $str=utf8_encode($str); if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') $str=utf8_decode(str_replace('€',chr(128),$str)); @@ -764,7 +764,7 @@ class Translate * @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code * @return array List of languages */ - function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0) + function get_available_languages($langdir = DOL_DOCUMENT_ROOT, $maxlength = 0, $usecode = 0) { // phpcs:enable global $conf; @@ -804,7 +804,7 @@ class Translate * @param integer $searchalt Search also alernate language file * @return boolean true if exists and readable */ - function file_exists($filename,$searchalt=0) + function file_exists($filename, $searchalt = 0) { // phpcs:enable // Test si fichier dans repertoire de la langue @@ -836,7 +836,7 @@ class Translate * 10 if setDefaultLang was en_US => ten * 123 if setDefaultLang was fr_FR => cent vingt trois */ - function getLabelFromNumber($number,$isamount=0) + function getLabelFromNumber($number, $isamount = 0) { global $conf; @@ -879,7 +879,7 @@ class Translate * @return string Label in UTF8 (but without entities) * @see dol_getIdFromCode */ - function getLabelFromKey($db,$key,$tablename,$fieldkey,$fieldlabel,$keyforselect='',$filteronentity=0) + function getLabelFromKey($db, $key, $tablename, $fieldkey, $fieldlabel, $keyforselect = '', $filteronentity = 0) { // If key empty if ($key == '') return ''; @@ -947,7 +947,7 @@ class Translate * @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only required currency. * @return string Currency symbol encoded into UTF8 */ - function getCurrencySymbol($currency_code, $forceloadall=0) + function getCurrencySymbol($currency_code, $forceloadall = 0) { $currency_sign = ''; // By default return iso code diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 9061539a804..b9720c400a6 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -53,7 +53,7 @@ class Utils * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than 24h, 'allfiles', 'logfile') * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function purgeFiles($choice='tempfilesold') + function purgeFiles($choice = 'tempfilesold') { global $conf, $langs, $dolibarr_main_data_root; @@ -182,7 +182,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function dumpDatabase($compression='none', $type='auto', $usedefault=1, $file='auto', $keeplastnfiles=0, $execmethod=0) + function dumpDatabase($compression = 'none', $type = 'auto', $usedefault = 1, $file = 'auto', $keeplastnfiles = 0, $execmethod = 0) { global $db, $conf, $langs, $dolibarr_main_data_root; global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass; @@ -501,7 +501,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return array array('result'=>...,'output'=>...,'error'=>...). result = 0 means OK. */ - function executeCLI($command, $outputfile, $execmethod=0) + function executeCLI($command, $outputfile, $execmethod = 0) { global $conf, $langs; @@ -835,7 +835,7 @@ class Utils * @param string $tables Table name or '*' for all * @return int <0 if KO, >0 if OK */ - function backupTables($outputfile, $tables='*') + function backupTables($outputfile, $tables = '*') { global $db, $langs; global $errormsg; diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 27144c9293a..9cb98f4838e 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -42,7 +42,7 @@ function encode($string) * @param int $line_max Max length of lines * @return string Encoded string */ -function dol_quoted_printable_encode($input, $line_max=76) +function dol_quoted_printable_encode($input, $line_max = 76) { $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); $lines = preg_split("/(\?:\r\n|\r|\n)/", $input); @@ -98,7 +98,7 @@ class vCard * @param string $type Type * @return void */ - function setPhoneNumber($number, $type="") + function setPhoneNumber($number, $type = "") { // type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE" $key = "TEL"; @@ -142,7 +142,7 @@ class vCard * @param string $suffix Suffix * @return void */ - function setName($family="", $first="", $additional="", $prefix="", $suffix="") + function setName($family = "", $first = "", $additional = "", $prefix = "", $suffix = "") { $this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix); $this->filename = "$first%20$family.vcf"; @@ -174,7 +174,7 @@ class vCard * @param string $type Type * @return void */ - function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") + function setAddress($postoffice = "", $extended = "", $street = "", $city = "", $region = "", $zip = "", $country = "", $type = "HOME;POSTAL") { // $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL" $key = "ADR"; @@ -201,7 +201,7 @@ class vCard * @param string $type Type * @return void */ - function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") + function setLabel($postoffice = "", $extended = "", $street = "", $city = "", $region = "", $zip = "", $country = "", $type = "HOME;POSTAL") { $label = ""; if ($postoffice!="") $label.= "$postoffice\r\n"; @@ -222,7 +222,7 @@ class vCard * @param string $type Vcard type * @return void */ - function setEmail($address,$type="internet,pref") + function setEmail($address, $type = "internet,pref") { $this->properties["EMAIL;TYPE=".$type] = $address; } @@ -293,7 +293,7 @@ class vCard * @param string $type Type * @return void */ - function setURL($url, $type="") + function setURL($url, $type = "") { // $type may be WORK | HOME $key = "URL"; diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 6d0cd48ccfe..b6df52d2ef9 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -141,7 +141,7 @@ function xyzToUnixTimestamp($mysqldate) * @param int $year Year * @return void */ -function displayBox($selectedDate,$month,$year) +function displayBox($selectedDate, $month, $year) { global $langs,$conf; diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 54b950fdee7..e62692b233a 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -419,7 +419,7 @@ interface Database * @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ * @return int|string Date TMS or '' */ - function jdate($string, $gm=false); + function jdate($string, $gm = false); /** * Encrypt sensitive data in database diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index ecc27bf88dc..da1c3cd74fb 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -75,7 +75,7 @@ abstract class DoliDB implements Database * @param string $resko resultat si test non egal * @return string SQL string */ - function ifsql($test,$resok,$resko) + function ifsql($test, $resok, $resko) { return 'IF('.$test.','.$resok.','.$resko.')'; } @@ -135,7 +135,7 @@ abstract class DoliDB implements Database * @param string $log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ - function commit($log='') + function commit($log = '') { dol_syslog('',0,-1); if ($this->transaction_opened<=1) @@ -165,7 +165,7 @@ abstract class DoliDB implements Database * @param string $log Add more log to default log line * @return resource|int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ - function rollback($log='') + function rollback($log = '') { dol_syslog('',0,-1); if ($this->transaction_opened<=1) @@ -189,7 +189,7 @@ abstract class DoliDB implements Database * @param int $offset Numero of line from where starting fetch * @return string String with SQL syntax to add a limit and offset */ - function plimit($limit=0,$offset=0) + function plimit($limit = 0, $offset = 0) { global $conf; if (empty($limit)) return ""; @@ -225,7 +225,7 @@ abstract class DoliDB implements Database * @param string $sortorder Sort order, separated by comma. Example: 'ASC,DESC'; * @return string String to provide syntax of a sort sql string */ - function order($sortfield=null,$sortorder=null) + function order($sortfield = null, $sortorder = null) { if (! empty($sortfield)) { @@ -278,7 +278,7 @@ abstract class DoliDB implements Database * @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ * @return int|string Date TMS or '' */ - function jdate($string, $gm=false) + function jdate($string, $gm = false) { // TODO GMT must set param gm to true by default if ($string==0 || $string=="0000-00-00 00:00:00") return ''; diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index f9e982961c9..ff2b4d51de7 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -55,7 +55,7 @@ class DoliDBMssql extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $langs; @@ -134,7 +134,7 @@ class DoliDBMssql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { return $line; } @@ -163,7 +163,7 @@ class DoliDBMssql extends DoliDB * @return false|resource|true Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { dol_syslog(get_class($this)."::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name"); $newhost=$host; @@ -263,7 +263,7 @@ class DoliDBMssql extends DoliDB * @param string $log Add more log to default log line * @return bool true if validation is OK or transaction level no started, false if ERROR */ - function commit($log='') + function commit($log = '') { $res=mssql_query('select @@TRANCOUNT'); $this->transaction_opened=mssql_result($res, 0, 0); @@ -296,7 +296,7 @@ class DoliDBMssql extends DoliDB * @param string $log Add more log to default log line * @return bool true si annulation ok ou transaction non ouverte, false en cas d'erreur */ - function rollback($log='') + function rollback($log = '') { $res=mssql_query('select @@TRANCOUNT'); $this->transaction_opened=mssql_result($res, 0, 0); @@ -324,7 +324,7 @@ class DoliDBMssql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return false|resource|true Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { $query = trim($query); @@ -548,7 +548,7 @@ class DoliDBMssql extends DoliDB * @param resource $resultset Curseur de la requete voulue * @return bool */ - function free($resultset=null) + function free($resultset = null) { // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion if (! is_resource($resultset)) { $resultset=$this->_results; } @@ -657,7 +657,7 @@ class DoliDBMssql extends DoliDB * @param string $fieldid Field name * @return int Id of row or -1 on error */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable $res = $this->query("SELECT @@IDENTITY as id"); @@ -679,7 +679,7 @@ class DoliDBMssql extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -744,7 +744,7 @@ class DoliDBMssql extends DoliDB * @param string $owner Username of database owner * @return false|resource|true resource defined if OK, false if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable /*if (empty($charset)) $charset=$this->forcecharset; @@ -778,7 +778,7 @@ class DoliDBMssql extends DoliDB * @param string $table Nmae of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database,$table='') + function DDLListTables($database, $table = '') { // phpcs:enable $this->_results = mssql_list_tables($database, $this->db); @@ -817,7 +817,7 @@ class DoliDBMssql extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -911,7 +911,7 @@ class DoliDBMssql extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return false|resource|true Resource */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -931,7 +931,7 @@ class DoliDBMssql extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -968,7 +968,7 @@ class DoliDBMssql extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -992,7 +992,7 @@ class DoliDBMssql extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -1015,7 +1015,7 @@ class DoliDBMssql extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'"; @@ -1141,7 +1141,7 @@ class DoliDBMssql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { // FIXME: Dummy method // TODO: Implement @@ -1157,7 +1157,7 @@ class DoliDBMssql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { // FIXME: Dummy method // TODO: Implement @@ -1188,7 +1188,7 @@ class DoliDBMssql extends DoliDB * @param mixed $fields String for one field or array of string for multiple field * @return false|object */ - function GetFieldInformation($table,$fields) + function GetFieldInformation($table, $fields) { // phpcs:enable $sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME"; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 185ebe1a56f..ad41e78620d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -54,7 +54,7 @@ class DoliDBMysqli extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf,$langs; @@ -162,7 +162,7 @@ class DoliDBMysqli extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { return $line; } @@ -250,7 +250,7 @@ class DoliDBMysqli extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return bool|mysqli_result Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { global $conf; @@ -382,7 +382,7 @@ class DoliDBMysqli extends DoliDB * @param mysqli_result $resultset Curseur de la requete voulue * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } @@ -476,7 +476,7 @@ class DoliDBMysqli extends DoliDB * @param string $fieldid Field name * @return int|string Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable return $this->db->insert_id; @@ -491,7 +491,7 @@ class DoliDBMysqli extends DoliDB * @return string XXX(field) or XXX('value') or field or 'value' * */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -582,7 +582,7 @@ class DoliDBMysqli extends DoliDB * @param string $owner Username of database owner * @return bool|mysqli_result resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -612,7 +612,7 @@ class DoliDBMysqli extends DoliDB * @param string $table Nmae of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -671,7 +671,7 @@ class DoliDBMysqli extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -768,7 +768,7 @@ class DoliDBMysqli extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return bool|mysqli_result Resultset x (x->Field, x->Type, ...) */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -788,7 +788,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -839,7 +839,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -885,7 +885,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -908,7 +908,7 @@ class DoliDBMysqli extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'"; @@ -1082,7 +1082,7 @@ class DoliDBMysqli extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); @@ -1103,7 +1103,7 @@ class DoliDBMysqli extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { $result=array(); diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 85abdf2b004..b2c6f52d305 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -62,7 +62,7 @@ class DoliDBPgsql extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf,$langs; @@ -150,7 +150,7 @@ class DoliDBPgsql extends DoliDB * @param bool $unescapeslashquot Unescape slash quote with quote quote * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=false) + static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false) { // Removed empty line if this is a comment line for SVN tagging if (preg_match('/^--\s\$Id/i',$line)) { @@ -389,7 +389,7 @@ class DoliDBPgsql extends DoliDB * @return false|resource Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { // use pg_pconnect() instead of pg_connect() if you want to use persistent connection costing 1ms, instead of 30ms for non persistent @@ -483,7 +483,7 @@ class DoliDBPgsql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return false|resource Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { global $conf; @@ -631,7 +631,7 @@ class DoliDBPgsql extends DoliDB * @param resource $resultset Result set of request * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_resource($resultset)) { $resultset=$this->_results; } @@ -647,7 +647,7 @@ class DoliDBPgsql extends DoliDB * @param int $offset Numero of line from where starting fetch * @return string String with SQL syntax to add a limit and offset */ - function plimit($limit=0,$offset=0) + function plimit($limit = 0, $offset = 0) { global $conf; if (empty($limit)) return ""; @@ -688,7 +688,7 @@ class DoliDBPgsql extends DoliDB * @param string $resko resultat si test non egal * @return string chaine formate SQL */ - function ifsql($test,$resok,$resko) + function ifsql($test, $resok, $resko) { return '(CASE WHEN '.$test.' THEN '.$resok.' ELSE '.$resko.' END)'; } @@ -777,7 +777,7 @@ class DoliDBPgsql extends DoliDB * @param string $fieldid Field name * @return string Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable //$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab); @@ -800,7 +800,7 @@ class DoliDBPgsql extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -862,7 +862,7 @@ class DoliDBPgsql extends DoliDB * @param string $owner Username of database owner * @return false|resource resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -885,7 +885,7 @@ class DoliDBPgsql extends DoliDB * @param string $table Name of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -958,7 +958,7 @@ class DoliDBPgsql extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -1054,7 +1054,7 @@ class DoliDBPgsql extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable // Note: using ' on user does not works with pgsql @@ -1078,7 +1078,7 @@ class DoliDBPgsql extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return false|resource Resultset x (x->attname) */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid"; @@ -1100,7 +1100,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -1140,7 +1140,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -1184,7 +1184,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name; @@ -1343,7 +1343,7 @@ class DoliDBPgsql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); @@ -1364,7 +1364,7 @@ class DoliDBPgsql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { /* This is to return current running requests. $sql='SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid'; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index bbd5853f95f..439c62af122 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -57,7 +57,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf; @@ -134,7 +134,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { // Removed empty line if this is a comment line for SVN tagging if (preg_match('/^--\s\$Id/i',$line)) { @@ -323,7 +323,7 @@ class DoliDBSqlite3 extends DoliDB * @return SQLite3 Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { global $main_data_dir; @@ -401,7 +401,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return SQLite3Result Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { $ret=null; $query = trim($query); @@ -602,7 +602,7 @@ class DoliDBSqlite3 extends DoliDB * @param SQLite3Result $resultset Curseur de la requete voulue * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } @@ -710,7 +710,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $fieldid Field name * @return int Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable return $this->db->lastInsertRowId(); @@ -724,7 +724,7 @@ class DoliDBSqlite3 extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -810,7 +810,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $owner Username of database owner * @return SQLite3Result resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -840,7 +840,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $table Name of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -900,7 +900,7 @@ class DoliDBSqlite3 extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -993,7 +993,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return SQLite3Result Resource */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -1013,7 +1013,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -1057,7 +1057,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -1080,7 +1080,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -1104,7 +1104,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "INSERT INTO user "; @@ -1236,7 +1236,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); static $pragmas; @@ -1285,7 +1285,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { $result=array(); /* diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index f1fe5365e7a..72722a1a948 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -55,7 +55,7 @@ function SetXmlHeaders() * @param string $currentFolder Current folder * @return void */ -function CreateXmlHeader( $command, $resourceType, $currentFolder ) +function CreateXmlHeader($command, $resourceType, $currentFolder) { SetXmlHeaders(); diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 34e32fa5f99..58f7c20c109 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -67,7 +67,7 @@ function GetFolders($resourceType, $currentFolder) * @param string $currentFolder Current folder * @return void */ -function GetFoldersAndFiles( $resourceType, $currentFolder ) +function GetFoldersAndFiles($resourceType, $currentFolder) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder($resourceType, $currentFolder, 'GetFoldersAndFiles'); @@ -132,7 +132,7 @@ function GetFoldersAndFiles( $resourceType, $currentFolder ) * @param string $currentFolder Current folder * @return void */ -function CreateFolder( $resourceType, $currentFolder ) +function CreateFolder($resourceType, $currentFolder) { if (!isset($_GET)) { global $_GET; diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 3ac325ed5d4..7d544ae9cce 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -29,7 +29,7 @@ * @param string $sFolder sFolder * @return string Combined path */ -function CombinePaths( $sBasePath, $sFolder ) +function CombinePaths($sBasePath, $sFolder) { return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/'); } @@ -238,7 +238,7 @@ function GetRootPath() // Emulate the asp Server.mapPath function. // given an url path return the physical directory that it corresponds to -function Server_MapPath( $path ) +function Server_MapPath($path) { // This function is available only for Apache if (function_exists('apache_lookup_uri')) { @@ -339,7 +339,7 @@ function GetCurrentFolder() } // Do a cleanup of the folder name to avoid possible problems -function SanitizeFolderName( $sNewFolderName ) +function SanitizeFolderName($sNewFolderName) { $sNewFolderName = stripslashes($sNewFolderName); @@ -350,7 +350,7 @@ function SanitizeFolderName( $sNewFolderName ) } // Do a cleanup of the file name to avoid possible problems -function SanitizeFileName( $sNewFileName ) +function SanitizeFileName($sNewFileName) { global $Config ; @@ -367,7 +367,7 @@ function SanitizeFileName( $sNewFileName ) } // This is the function that sends the results of the uploading process. -function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) +function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '') { // Minified version of the document.domain automatic fix script (#1919). // The original script can be found at _dev/domain_fix_template.js diff --git a/htdocs/core/filemanagerdol/connectors/php/util.php b/htdocs/core/filemanagerdol/connectors/php/util.php index f23ba45550a..0b39003f494 100644 --- a/htdocs/core/filemanagerdol/connectors/php/util.php +++ b/htdocs/core/filemanagerdol/connectors/php/util.php @@ -82,7 +82,7 @@ function FindBadUtf8($string) * @param string $value Value * @return string */ -function ConvertToXmlAttribute( $value ) +function ConvertToXmlAttribute($value) { if ( defined('PHP_OS') ) { @@ -110,7 +110,7 @@ function ConvertToXmlAttribute( $value ) * @param array $formExtensions Array of extensions * @return boolean */ -function IsHtmlExtension( $ext, $formExtensions ) +function IsHtmlExtension($ext, $formExtensions) { if (!$formExtensions || !is_array($formExtensions) ) { @@ -132,7 +132,7 @@ function IsHtmlExtension( $ext, $formExtensions ) * @param string $filePath absolute path to file * @return boolean */ -function DetectHtml( $filePath ) +function DetectHtml($filePath) { $fp = @fopen($filePath, 'rb'); @@ -202,7 +202,7 @@ function DetectHtml( $filePath ) * @param string $extension File extension * @return boolean True or false */ -function IsImageValid( $filePath, $extension ) +function IsImageValid($filePath, $extension) { if (!@is_readable($filePath)) { return -1; diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index b0b6dc6855c..30ace607536 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -152,7 +152,7 @@ function length_accounta($accounta) * @param string $varlink Add a variable into the address of the page * @return void */ -function journalHead($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='') +function journalHead($nom, $variante, $period, $periodlink, $description, $builddate, $exportlink = '', $moreparam = array(), $calcmode = '', $varlink = '') { global $langs; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index aae550d65f8..77a21100f48 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -55,7 +55,7 @@ function versiontostring($versionarray) * 0 if same * 1,2,3,4 if versionarray1>versionarray2 (value depends on level of difference) */ -function versioncompare($versionarray1,$versionarray2) +function versioncompare($versionarray1, $versionarray2) { $ret=0; $level=0; @@ -127,7 +127,7 @@ function versiondolibarrarray() * @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value * @return int <=0 if KO, >0 if OK */ -function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='', $okerror='default', $linelengthlimit=32768, $nocommentremoval=0, $offsetforchartofaccount=0) +function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0) { global $db, $conf, $langs, $user; @@ -432,7 +432,7 @@ function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='', * * @see dolibarr_get_const, dolibarr_set_const, dol_set_user_param */ -function dolibarr_del_const($db, $name, $entity=1) +function dolibarr_del_const($db, $name, $entity = 1) { global $conf; @@ -472,7 +472,7 @@ function dolibarr_del_const($db, $name, $entity=1) * * @see dolibarr_del_const, dolibarr_set_const, dol_set_user_param */ -function dolibarr_get_const($db, $name, $entity=1) +function dolibarr_get_const($db, $name, $entity = 1) { global $conf; $value=''; @@ -507,7 +507,7 @@ function dolibarr_get_const($db, $name, $entity=1) * * @see dolibarr_del_const, dolibarr_get_const, dol_set_user_param */ -function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1) +function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0, $note = '', $entity = 1) { global $conf; @@ -864,7 +864,7 @@ function purgeSessions($mysessionid) * @param int $withdeps Activate/Disable also all dependencies * @return array array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added); */ -function activateModule($value,$withdeps=1) +function activateModule($value, $withdeps = 1) { global $db, $modules, $langs, $conf, $mysoc; @@ -1008,7 +1008,7 @@ function activateModule($value,$withdeps=1) * @param int $requiredby 1=Desactive aussi modules dependants * @return string Error message or ''; */ -function unActivateModule($value, $requiredby=1) +function unActivateModule($value, $requiredby = 1) { global $db, $modules, $conf; @@ -1085,7 +1085,7 @@ function unActivateModule($value, $requiredby=1) * @param array $tabfieldcheck Tabfieldcheck * @return int 1 */ -function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond,&$tabhelp,&$tabfieldcheck) +function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tabsql, &$tabsqlsort, &$tabfield, &$tabfieldvalue, &$tabfieldinsert, &$tabrowid, &$tabcond, &$tabhelp, &$tabfieldcheck) { global $db, $modules, $conf, $langs; @@ -1362,7 +1362,7 @@ function complete_elementList_with_modules(&$elementList) * @param string $helptext Help * @return void */ -function form_constantes($tableau, $strictw3c=0, $helptext='') +function form_constantes($tableau, $strictw3c = 0, $helptext = '') { global $db,$bc,$langs,$conf,$user; global $_Avery_Labels; @@ -1606,7 +1606,7 @@ function showModulesExludedForExternal($modules) * @param string $description Model description * @return int <0 if KO, >0 if OK */ -function addDocumentModel($name, $type, $label='', $description='') +function addDocumentModel($name, $type, $label = '', $description = '') { global $db, $conf; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 6dab036193d..9b7481af7af 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -47,7 +47,7 @@ * @param int $resourceid Preselected value of resource for filter on resource * @return void */ -function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='', $resourceid=0) +function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0) { global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; @@ -209,7 +209,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh * @param int $max Max nb of records * @return void */ -function show_array_actions_to_do($max=5) +function show_array_actions_to_do($max = 5) { global $langs, $conf, $user, $db, $bc, $socid; @@ -309,7 +309,7 @@ function show_array_actions_to_do($max=5) * @param int $max Max nb of records * @return void */ -function show_array_last_actions_done($max=5) +function show_array_last_actions_done($max = 5) { global $langs, $conf, $user, $db, $bc, $socid; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 4b4d36aa20b..8a2aa8f91a9 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -43,7 +43,7 @@ * - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax) * @return string Script */ -function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array()) +function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLength = 2, $autoselect = 0, $ajaxoptions = array()) { if (empty($minLength)) $minLength=1; @@ -221,7 +221,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt * @param int $autoselect Automatic selection if just one value * @return string Script */ -function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLength=2, $autoselect=0) +function ajax_multiautocompleter($htmlname, $fields, $url, $option = '', $minLength = 2, $autoselect = 0) { $script = '<!-- Autocomplete -->'."\n"; $script.= '<script>'; @@ -328,7 +328,7 @@ function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLengt * @param int $h height of dialog box * @return void */ -function ajax_dialog($title,$message,$w=350,$h=150) +function ajax_dialog($title, $message, $w = 350, $h = 150) { global $langs; @@ -371,7 +371,7 @@ function ajax_dialog($title,$message,$w=350,$h=150) * @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason. * @see selectArrayAjax of html.form.class */ -function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve') +function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = 0, $forcefocus = 0, $widthTypeOfAutocomplete = 'resolve') { global $conf; @@ -481,7 +481,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ * @param bool $strict Use only "disabled" with delConstant and "enabled" with setConstant * @return string */ -function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0) +function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0) { global $conf, $langs; @@ -549,7 +549,7 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, * @param array $input Array of type->list of CSS element to switch. Example: array('disabled'=>array(0=>'cssid')) * @return string html for button on/off */ -function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=array()) +function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input = array()) { global $langs; diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index efd245209d2..49acbf31517 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -65,7 +65,7 @@ else $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; * @param string $mode 'png' or 'jpg' ... * @return array|string $bars array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) or string with error message */ -function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") +function barcode_print($code, $encoding = "ANY", $scale = 2, $mode = "png") { dol_syslog("barcode.lib.php::barcode_print $code $encoding $scale $mode"); @@ -108,7 +108,7 @@ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") * @param string $encoding Encoding * @return array array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) */ -function barcode_encode($code,$encoding) +function barcode_encode($code, $encoding) { global $genbarcode_loc; @@ -238,7 +238,7 @@ function barcode_encode_ean($ean, $encoding = "EAN-13") * @param string $encoding Encoding * @return array array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) */ -function barcode_encode_genbarcode($code,$encoding) +function barcode_encode_genbarcode($code, $encoding) { global $genbarcode_loc; diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index 4d85c412bab..769613f6b6c 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -29,7 +29,7 @@ * @param string $type Type of category * @return array Array of tabs to show */ -function categories_prepare_head($object,$type) +function categories_prepare_head($object, $type) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 41b0f1af3ef..ebcca729d55 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -425,7 +425,7 @@ function societe_admin_prepare_head() * @param int $searchlabel Label of country to search (warning: searching on label is not reliable) * @return mixed Integer with country id or String with country code or translated country name or Array('id','code','label') or 'NotDefined' */ -function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='') +function getCountry($searchkey, $withcode = '', $dbtouse = 0, $outputlangs = '', $entconv = 1, $searchlabel = '') { global $db,$langs; @@ -490,7 +490,7 @@ function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entc * @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output * @return mixed String with state code or state name or Array('id','code','label')/Array('id','code','label','region_code','region') */ -function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$entconv=1) +function getState($id, $withcode = '', $dbtouse = 0, $withregion = 0, $outputlangs = '', $entconv = 1) { global $db,$langs; @@ -566,7 +566,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent * @param Translate $outputlangs Output language * @return string Label translated of currency */ -function currency_name($code_iso, $withcode='', $outputlangs=null) +function currency_name($code_iso, $withcode = '', $outputlangs = null) { global $langs,$db; @@ -717,7 +717,7 @@ function isInEEC($object) * @param string $morehtmlright More html on right of title * @return void */ -function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelink=0, $morehtmlright='') +function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatelink = 0, $morehtmlright = '') { global $user; @@ -845,7 +845,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin * @param string $backtopage Url to go once contact is created * @return void */ -function show_contacts($conf,$langs,$db,$object,$backtopage='') +function show_contacts($conf, $langs, $db, $object, $backtopage = '') { global $user,$conf,$extrafields,$hookmanager; global $contextpage; @@ -1176,7 +1176,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') * @param string $backtopage Url to go once address is created * @return void */ -function show_addresses($conf,$langs,$db,$object,$backtopage='') +function show_addresses($conf, $langs, $db, $object, $backtopage = '') { global $user; @@ -1270,7 +1270,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='') * @param int $actioncode Filter on actioncode * @return mixed Return html part or void if noprint is 1 */ -function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$actioncode='') +function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '') { global $user,$conf; @@ -1296,7 +1296,7 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac * @param string $sortorder Sort order * @return mixed Return html part or void if noprint is 1 */ -function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep,a.id', $sortorder='DESC') +function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') { global $user, $conf; global $form; @@ -1763,7 +1763,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= * @param Societe $object Third party object * @return void */ -function show_subsidiaries($conf,$langs,$db,$object) +function show_subsidiaries($conf, $langs, $db, $object) { global $user; diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 0f84f46497e..b9a4dcbe710 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -80,7 +80,7 @@ function getServerTimeZoneString() * @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer') * @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer) */ -function getServerTimeZoneInt($refgmtdate='now') +function getServerTimeZoneInt($refgmtdate = 'now') { global $conf; if (method_exists('DateTimeZone','getOffset')) @@ -151,7 +151,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit) * @return int Time into seconds * @see convertSecondToTime */ -function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0) +function convertTime2Seconds($iHours = 0, $iMinutes = 0, $iSeconds = 0) { $iResult=($iHours*3600)+($iMinutes*60)+$iSeconds; return $iResult; @@ -179,7 +179,7 @@ function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0) * Example: 0 return 00:00, 3600 return 1:00, 86400 return 1d, 90000 return 1 Day 01:00 * @see convertTime2Seconds */ -function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7) +function convertSecondToTime($iSecond, $format = 'all', $lengthOfDay = 86400, $lengthOfWeek = 7) { global $langs; @@ -327,7 +327,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date) * * @see dol_print_date, dol_mktime, dol_getdate */ -function dol_stringtotime($string, $gm=1) +function dol_stringtotime($string, $gm = 1) { // Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used. if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i',$string,$reg)) @@ -485,7 +485,7 @@ function dol_get_next_week($day, $week, $month, $year) * Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, after a dol_print_date will return 1970-01-01 00:00:00 * @return int Date for first day, '' if error */ -function dol_get_first_day($year,$month=1,$gm=false) +function dol_get_first_day($year, $month = 1, $gm = false) { if ($year > 9999) return ''; return dol_mktime(0,0,0,$month,1,$year,$gm); @@ -499,7 +499,7 @@ function dol_get_first_day($year,$month=1,$gm=false) * @param boolean $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. * @return int Date for first day, '' if error */ -function dol_get_last_day($year,$month=12,$gm=false) +function dol_get_last_day($year, $month = 12, $gm = false) { if ($year > 9999) return ''; if ($month == 12) @@ -527,7 +527,7 @@ function dol_get_last_day($year,$month=12,$gm=false) * @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. * @return array year,month,week,first_day,first_month,first_year,prev_day,prev_month,prev_year */ -function dol_get_first_day_week($day,$month,$year,$gm=false) +function dol_get_first_day_week($day, $month, $year, $gm = false) { global $conf; @@ -605,7 +605,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false) * @return int Nombre de jours feries * @see num_between_day, num_open_day */ -function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR', $lastday=0) +function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', $lastday = 0) { global $conf; @@ -897,7 +897,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR', $ * @return int Number of days * @see also num_public_holiday, num_open_day */ -function num_between_day($timestampStart, $timestampEnd, $lastday=0) +function num_between_day($timestampStart, $timestampEnd, $lastday = 0) { if ($timestampStart < $timestampEnd) { @@ -927,7 +927,7 @@ function num_between_day($timestampStart, $timestampEnd, $lastday=0) * @return int Number of days or hours * @see also num_between_day, num_public_holiday */ -function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0, $country_code='') +function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, $halfday = 0, $country_code = '') { global $langs,$mysoc; @@ -971,7 +971,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $ha * @param int $short 0=Return long label, 1=Return short label * @return array Month string or array if selected < 0 */ -function monthArray($outputlangs,$short=0) +function monthArray($outputlangs, $short = 0) { $montharray = array ( 1 => $outputlangs->trans("Month01"), diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index b5e607fbbc5..57cadc28e72 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -38,7 +38,7 @@ * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs; diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 459bb3e3f2b..5ed80465428 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -31,7 +31,7 @@ * @param int $edit 1 to add edit form * @return void */ -function show_skin($fuser,$edit=0) +function show_skin($fuser, $edit = 0) { global $conf,$langs,$db; global $bc; diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php index 05f16e767ba..a1ec2bc4eba 100644 --- a/htdocs/core/lib/ecm.lib.php +++ b/htdocs/core/lib/ecm.lib.php @@ -72,7 +72,7 @@ function ecm_prepare_dasboard_head($object) * @param string $section Section * @return array Array of tabs to show */ -function ecm_prepare_head($object, $module='ecm', $section='') +function ecm_prepare_head($object, $module = 'ecm', $section = '') { global $langs, $conf, $user; $h = 0; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index ae80d371e33..28095a97ac9 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -56,7 +56,7 @@ function dol_basename($pathfile) * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','date'=>'yyy','size'=>99,'type'=>'dir|file',...) * @see dol_dir_list_indatabase */ -function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0) +function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0, $nohook = 0, $relativename = "", $donotfollowsymlinks = 0) { global $db, $hookmanager; global $object; @@ -226,7 +226,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','type'=>'dir|file',...) * @see dol_dir_list */ -function dol_dir_list_in_database($path, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0) +function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0) { global $conf, $db; @@ -578,7 +578,7 @@ function dol_filemtime($pathoffile) * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK * @see dol_copy dolReplaceRegExInFile */ -function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) +function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0) { global $conf; @@ -648,7 +648,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK * @see dol_copy dolReplaceInFile */ -function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) +function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0) { // TODO } @@ -663,7 +663,7 @@ function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newma * @return int <0 if error, 0 if nothing done (dest file already exists and overwriteifexists=0), >0 if OK * @see dol_delete_file */ -function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) +function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1) { global $conf; @@ -719,7 +719,7 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK * @see dol_copy */ -function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement=null) +function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) { global $conf; @@ -811,7 +811,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep * @return boolean True if OK, false if KO * @see dol_move_uploaded_file */ -function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1, $testvirus=0, $indexdatabase=1) +function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $testvirus = 0, $indexdatabase = 1) { global $user, $db, $conf; $result=false; @@ -993,7 +993,7 @@ function dolCheckVirus($src_file) * @return int >0 if OK, <0 or string if KO * @see dol_move */ -function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') +function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile') { global $conf, $db, $user, $langs; global $object, $hookmanager; @@ -1136,7 +1136,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable * @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error * @see dol_delete_dir */ -function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1) +function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $object = null, $allowdotdot = false, $indexdatabase = 1) { global $db, $conf, $user, $langs; global $hookmanager; @@ -1246,7 +1246,7 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje * @return boolean True if success, false if error * @see dol_delete_file dol_copy */ -function dol_delete_dir($dir,$nophperrors=0) +function dol_delete_dir($dir, $nophperrors = 0) { // Security: // We refuse transversal using .. and pipes into filenames. @@ -1270,7 +1270,7 @@ function dol_delete_dir($dir,$nophperrors=0) * @param int $countdeleted Counter to count nb of elements found really deleted * @return int Number of files and directory we try to remove. NB really removed is returned into var by reference $countdeleted. */ -function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$countdeleted=0) +function dol_delete_dir_recursive($dir, $count = 0, $nophperrors = 0, $onlysub = 0, &$countdeleted = 0) { dol_syslog("functions.lib:dol_delete_dir_recursive ".$dir,LOG_DEBUG); if (dol_is_dir($dir)) @@ -1478,7 +1478,7 @@ function dol_meta_create($object) * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_init_file_process($pathtoscan='', $trackid='') +function dol_init_file_process($pathtoscan = '', $trackid = '') { $listofpaths=array(); $listofnames=array(); @@ -1516,7 +1516,7 @@ function dol_init_file_process($pathtoscan='', $trackid='') * @param int $generatethumbs 1=Generate also thumbs for uploaded image files * @return int <=0 if KO, >0 if OK */ -function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesession=0, $varfiles='addedfile', $savingdocmask='', $link=null, $trackid='', $generatethumbs=1) +function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesession = 0, $varfiles = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1) { global $db,$user,$conf,$langs; @@ -1660,7 +1660,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1,$trackid='') +function dol_remove_file_process($filenb, $donotupdatesession = 0, $donotdeletefile = 1, $trackid = '') { global $db,$user,$conf,$langs,$_FILES; @@ -1712,7 +1712,7 @@ function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile= * @param int $setsharekey Set also the share key * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded', $setsharekey=0) +function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uploaded', $setsharekey = 0) { global $db, $user; @@ -1760,7 +1760,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded * @param string $mode How file was created ('uploaded', 'generated', ...) * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') +function deleteFilesIntoDatabaseIndex($dir, $file, $mode = 'uploaded') { global $conf, $db, $user; @@ -1816,7 +1816,7 @@ function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') * @param string $fileoutput Output filename * @return int <0 if KO, 0=Nothing done, >0 if OK */ -function dol_convert_file($fileinput, $ext='png', $fileoutput='') +function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '') { global $langs; @@ -1874,7 +1874,7 @@ function dol_convert_file($fileinput, $ext='png', $fileoutput='') * @param string $mode 'gz' or 'bz' or 'zip' * @return int <0 if KO, >0 if OK */ -function dol_compress_file($inputfile, $outputfile, $mode="gz") +function dol_compress_file($inputfile, $outputfile, $mode = "gz") { $foundhandler=0; @@ -1927,7 +1927,7 @@ function dol_compress_file($inputfile, $outputfile, $mode="gz") * @param string $outputdir Target dir name * @return array array('error'=>'Error code') or array() if no error */ -function dol_uncompress($inputfile,$outputdir) +function dol_uncompress($inputfile, $outputdir) { global $langs; @@ -1988,7 +1988,7 @@ function dol_uncompress($inputfile,$outputdir) * @param string $mode 'zip' * @return int <0 if KO, >0 if OK */ -function dol_compress_dir($inputdir, $outputfile, $mode="zip") +function dol_compress_dir($inputdir, $outputfile, $mode = "zip") { $foundhandler=0; @@ -2088,7 +2088,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only * @return string Full path to most recent file */ -function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview.*\.png)$','^\.'),$nohook=false,$mode='') +function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(\.meta|_preview.*\.png)$','^\.'), $nohook = false, $mode = '') { $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,$mode,$nohook); return $tmparray[0]; @@ -2106,7 +2106,7 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta * @return mixed Array with access information : 'accessallowed' & 'sqlprotectagainstexternals' & 'original_file' (as a full path name) * @see restrictedArea */ -function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser='', $refname='', $mode='read') +function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser = '', $refname = '', $mode = 'read') { global $conf, $db, $user; global $dolibarr_main_data_root, $dolibarr_main_document_root_alt; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 690a3ff5152..ca89eeba47c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -76,7 +76,7 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port) * @param object $currentobject Current object if needed * @return mixed Entity id(s) to use */ -function getEntity($element, $shared=1, $currentobject=null) +function getEntity($element, $shared = 1, $currentobject = null) { global $conf, $mc; @@ -231,7 +231,7 @@ function GETPOSTISSET($paramname) * @param string $noreplace Force disable of replacement of __xxx__ strings. * @return string|string[] Value found (string or array), or '' if check fails */ -function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0) +function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $options = null, $noreplace = 0) { global $mysoc,$user,$conf; @@ -580,7 +580,7 @@ if (! function_exists('dol_getprefix')) * @param string $mode '' (prefix for session name) or 'email' (prefix for email id) * @return string A calculated prefix */ - function dol_getprefix($mode='') + function dol_getprefix($mode = '') { global $conf; @@ -615,7 +615,7 @@ if (! function_exists('dol_getprefix')) * @param string $classname Class name (deprecated) * @return bool True if load is a success, False if it fails */ -function dol_include_once($relpath, $classname='') +function dol_include_once($relpath, $classname = '') { global $conf,$langs,$user,$mysoc; // Do not remove this. They must be defined for files we include. Other globals var must be retreived with $GLOBALS['var'] @@ -644,7 +644,7 @@ function dol_include_once($relpath, $classname='') * 2:If $type==0 and if file was not found into alternate dir, test into main dir, return default path if found, empty string if not found * @return string Full filesystem path (if path=0), Full url path (if mode=1) */ -function dol_buildpath($path, $type=0, $returnemptyifnotfound=0) +function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0) { global $conf; @@ -742,7 +742,7 @@ function dol_buildpath($path, $type=0, $returnemptyifnotfound=0) * @return object Object clone * @see https://php.net/manual/language.oop5.cloning.php */ -function dol_clone($object, $native=0) +function dol_clone($object, $native = 0) { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); @@ -767,7 +767,7 @@ function dol_clone($object, $native=0) * 'width' = function is used to define a width * @return int New size after optimizing */ -function dol_size($size,$type='') +function dol_size($size, $type = '') { global $conf; if (empty($conf->dol_optimize_smallscreen)) return $size; @@ -786,7 +786,7 @@ function dol_size($size,$type='') * * @see dol_string_nospecial, dol_string_unaccent, dol_sanitizePathName */ -function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) +function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1) { $filesystem_forbidden_chars = array('<','>','/','\\','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); @@ -802,7 +802,7 @@ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) * * @see dol_string_nospecial, dol_string_unaccent, dol_sanitizeFileName */ -function dol_sanitizePathName($str,$newstr='_',$unaccent=1) +function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1) { $filesystem_forbidden_chars = array('<','>','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); @@ -874,7 +874,7 @@ function dol_string_unaccent($str) * * @see dol_sanitizeFilename, dol_string_unaccent */ -function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='') +function dol_string_nospecial($str, $newstr = '_', $badcharstoreplace = '') { $forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=", '°'); // more complete than dol_sanitizeFileName $forbidden_chars_to_remove=array(); @@ -904,7 +904,7 @@ function dolEscapeXML($string) * @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n. * @return string Escaped string. Both ' and " are escaped into ' if they are escaped. */ -function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) +function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0) { // escape quotes and backslashes, newlines, etc. $substitjs=array("'"=>"\\'","\r"=>'\\r'); @@ -927,7 +927,7 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) * @return string Escaped string * @see dol_string_nohtmltag, dol_string_nospecial, dol_string_unaccent */ -function dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0) +function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0) { // escape quotes and backslashes, newlines, etc. $tmp=html_entity_decode($stringtoescape, ENT_COMPAT, 'UTF-8'); // TODO Use htmlspecialchars_decode instead, that make only required change for html tags @@ -980,7 +980,7 @@ function dol_strtoupper($utf8_string) * @param string $restricttologhandler Output log only for this log handler * @return void */ -function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='', $restricttologhandler='') +function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '') { global $conf, $user; @@ -1072,7 +1072,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' * @param string $morecss More Css * @return void */ -function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') +function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '') { print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss); } @@ -1090,7 +1090,7 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto * @param string $morecss More Css * @return string */ -function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') +function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '') { global $conf, $langs, $hookmanager; @@ -1250,7 +1250,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi * @param int $notab -1 or 0=Add tab footer, 1=no tab footer * @return void */ -function dol_fiche_end($notab=0) +function dol_fiche_end($notab = 0) { print dol_get_fiche_end($notab); } @@ -1261,7 +1261,7 @@ function dol_fiche_end($notab=0) * @param int $notab -1 or 0=Add tab footer, 1=no tab footer * @return string */ -function dol_get_fiche_end($notab=0) +function dol_get_fiche_end($notab = 0) { if (! $notab || $notab == -1) return "\n</div>\n"; else return ''; @@ -1286,7 +1286,7 @@ function dol_get_fiche_end($notab=0) * @param string $morehtmlright More html code to show before navigation arrows * @return void */ -function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='') +function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '') { global $conf, $form, $user, $langs; @@ -1568,7 +1568,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r * @return string * @deprecated Form::editfieldkey */ -function fieldLabel($langkey, $fieldkey, $fieldrequired=0) +function fieldLabel($langkey, $fieldkey, $fieldrequired = 0) { global $conf, $langs; $ret=''; @@ -1587,7 +1587,7 @@ function fieldLabel($langkey, $fieldkey, $fieldrequired=0) * @param string $moreclass More class to add * @return string String to add class onto HTML element */ -function dol_bc($var,$moreclass='') +function dol_bc($var, $moreclass = '') { global $bc; $ret=' '.$bc[$var]; @@ -1606,7 +1606,7 @@ function dol_bc($var,$moreclass='') * @return string Formated string * @see dol_print_address */ -function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', $mode=0) +function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs = '', $mode = 0) { global $conf,$langs; @@ -1680,7 +1680,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', * @param int $is_gmt See comment of timestamp parameter * @return string A formatted string */ -function dol_strftime($fmt, $ts=false, $is_gmt=false) +function dol_strftime($fmt, $ts = false, $is_gmt = false) { if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); @@ -1709,7 +1709,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false) * * @see dol_mktime, dol_stringtotime, dol_getdate */ -function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$encodetooutput=false) +function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlangs = '', $encodetooutput = false) { global $conf,$langs; @@ -1886,7 +1886,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e * 'ndays' => $ndays * @see dol_print_date, dol_stringtotime, dol_mktime */ -function dol_getdate($timestamp,$fast=false) +function dol_getdate($timestamp, $fast = false) { global $conf; @@ -1925,7 +1925,7 @@ function dol_getdate($timestamp,$fast=false) * @return int|string Date as a timestamp, '' or false if error * @see dol_print_date, dol_stringtotime, dol_getdate */ -function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) +function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $check = 1) { global $conf; //print "- ".$hour.",".$minute.",".$second.",".$month.",".$day.",".$year.",".$_SERVER["WINDIR"]." -"; @@ -2008,7 +2008,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) * 'tzuser' => we add the user timezone * @return int $date Timestamp */ -function dol_now($mode='gmt') +function dol_now($mode = 'gmt') { $ret=0; @@ -2047,7 +2047,7 @@ function dol_now($mode='gmt') * @param int $shortunit Use short label of size unit (for example 'b' instead of 'bytes') * @return string Link */ -function dol_print_size($size,$shortvalue=0,$shortunit=0) +function dol_print_size($size, $shortvalue = 0, $shortunit = 0) { global $conf,$langs; $level=1024; @@ -2083,7 +2083,7 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0) * @param int $withpicto With picto * @return string HTML Link */ -function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) +function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0) { global $langs; @@ -2113,7 +2113,7 @@ function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) * @param int $withpicto Show picto * @return string HTML Link */ -function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=1,$withpicto=0) +function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0) { global $conf,$user,$langs,$hookmanager; @@ -2170,7 +2170,7 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid= * @param string $type 'skype','facebook',... * @return string HTML Link */ -function dol_print_socialnetworks($value,$cid,$socid,$type) +function dol_print_socialnetworks($value, $cid, $socid, $type) { global $conf,$user,$langs; @@ -2226,7 +2226,7 @@ function dol_print_socialnetworks($value,$cid,$socid,$type) * @param int $adddivfloat Add div float around phone. * @return string Formated phone number */ -function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='',$adddivfloat=0) +function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addlink = '', $separ = " ", $withpicto = '', $titlealt = '', $adddivfloat = 0) { global $conf, $user, $langs, $mysoc, $hookmanager; @@ -2605,7 +2605,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep * @param int $mode 0=return IP + country/flag, 1=return only country/flag, 2=return only IP * @return string Formated IP, with country if GeoIP module is enabled */ -function dol_print_ip($ip,$mode=0) +function dol_print_ip($ip, $mode = 0) { global $conf,$langs; @@ -2710,7 +2710,7 @@ function dol_user_country() * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address */ -function dol_print_address($address, $htmlid, $mode, $id, $noprint=0, $charfornl='') +function dol_print_address($address, $htmlid, $mode, $id, $noprint = 0, $charfornl = '') { global $conf, $user, $langs, $hookmanager; @@ -2762,7 +2762,7 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0, $charfornl * @param int $acceptsupervisorkey If 1, the special string '__SUPERVISOREMAIL__' is also accepted as valid * @return boolean true if email syntax is OK, false if KO or empty string */ -function isValidEmail($address, $acceptsupervisorkey=0) +function isValidEmail($address, $acceptsupervisorkey = 0) { if ($acceptsupervisorkey && $address == '__SUPERVISOREMAIL__') return true; if (filter_var($address, FILTER_VALIDATE_EMAIL)) return true; @@ -2819,7 +2819,7 @@ function isValidPhone($phone) * @param string $stringencoding Encoding of string * @return int Length of string */ -function dol_strlen($string, $stringencoding='UTF-8') +function dol_strlen($string, $stringencoding = 'UTF-8') { if (function_exists('mb_strlen')) return mb_strlen($string,$stringencoding); else return strlen($string); @@ -2835,7 +2835,7 @@ function dol_strlen($string, $stringencoding='UTF-8') * @param int $trunconbytes 1=Length is max of bytes instead of max of characters * @return string substring */ -function dol_substr($string, $start, $length, $stringencoding='', $trunconbytes=0) +function dol_substr($string, $start, $length, $stringencoding = '', $trunconbytes = 0) { global $langs; @@ -2881,7 +2881,7 @@ function dol_substr($string, $start, $length, $stringencoding='', $trunconbytes= * @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS) * @return string Truncated string. WARNING: length is never higher than $size if $nodot is set, but can be 3 chars higher otherwise. */ -function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodot=0, $display=0) +function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF-8', $nodot = 0, $display = 0) { global $conf; @@ -2950,7 +2950,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo * @return string Return img tag * @see #img_object, #img_picto_common */ -function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $srconly=0, $notitle=0, $alt='', $morecss='') +function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0, $alt = '', $morecss = '') { global $conf, $langs; @@ -3155,7 +3155,7 @@ function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $sr * @return string Return img tag * @see #img_picto, #img_picto_common */ -function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly=0, $notitle=0) +function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0) { return img_picto($titlealt, 'object_'.$picto, $moreatt, $pictoisfullpath, $srconly, $notitle); } @@ -3276,7 +3276,7 @@ function img_edit_add($titlealt = 'default', $other = '') * @param string $other Add more attributes on img * @return string Return tag img */ -function img_edit_remove($titlealt = 'default', $other='') +function img_edit_remove($titlealt = 'default', $other = '') { global $conf, $langs; @@ -3345,7 +3345,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"') * @param string $other Add more attributes on img * @return string Retourne tag img */ -function img_printer($titlealt = "default", $other='') +function img_printer($titlealt = "default", $other = '') { global $conf,$langs; if ($titlealt=="default") $titlealt=$langs->trans("Print"); @@ -3442,7 +3442,7 @@ function img_error($titlealt = 'default') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_next($titlealt = 'default', $moreatt='') +function img_next($titlealt = 'default', $moreatt = '') { global $conf, $langs; @@ -3459,7 +3459,7 @@ function img_next($titlealt = 'default', $moreatt='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_previous($titlealt = 'default', $moreatt='') +function img_previous($titlealt = 'default', $moreatt = '') { global $conf, $langs; @@ -3477,7 +3477,7 @@ function img_previous($titlealt = 'default', $moreatt='') * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_down($titlealt = 'default', $selected = 0, $moreclass='') +function img_down($titlealt = 'default', $selected = 0, $moreclass = '') { global $conf, $langs; @@ -3494,7 +3494,7 @@ function img_down($titlealt = 'default', $selected = 0, $moreclass='') * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_up($titlealt = 'default', $selected = 0, $moreclass='') +function img_up($titlealt = 'default', $selected = 0, $moreclass = '') { global $conf, $langs; @@ -3511,7 +3511,7 @@ function img_up($titlealt = 'default', $selected = 0, $moreclass='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_left($titlealt = 'default', $selected = 0, $moreatt='') +function img_left($titlealt = 'default', $selected = 0, $moreatt = '') { global $conf, $langs; @@ -3528,7 +3528,7 @@ function img_left($titlealt = 'default', $selected = 0, $moreatt='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_right($titlealt = 'default', $selected = 0, $moreatt='') +function img_right($titlealt = 'default', $selected = 0, $moreatt = '') { global $conf, $langs; @@ -3582,7 +3582,7 @@ function img_credit_card($brand) * @param string $morecss More css * @return string Return img tag */ -function img_mime($file, $titlealt = '', $morecss='') +function img_mime($file, $titlealt = '', $morecss = '') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -3673,7 +3673,7 @@ function img_searchclear($titlealt = 'default', $other = '') * @param string $morecss More CSS * @return string String with info text */ -function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin='1', $morecss='') +function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = '') { global $conf, $langs; @@ -3698,7 +3698,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin='1', $morecss='') * @return void * @see dol_htmloutput_errors */ -function dol_print_error($db='',$error='',$errors=null) +function dol_print_error($db = '', $error = '', $errors = null) { global $conf,$langs,$argv; global $dolibarr_main_prod; @@ -3826,7 +3826,7 @@ function dol_print_error($db='',$error='',$errors=null) * @param string $email Email * @return void */ -function dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='') +function dol_print_error_email($prefixcode, $errormessage = '', $errormessages = array(), $morecss = 'error', $email = '') { global $langs,$conf; @@ -3863,7 +3863,7 @@ function dol_print_error_email($prefixcode, $errormessage='', $errormessages=arr * @param string $tooltip Tooltip * @return void */ -function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="") +function print_liste_field_titre($name, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $tooltip = "") { print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $moreattrib, $sortfield, $sortorder, $prefix, 0, $tooltip); } @@ -3885,7 +3885,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * @param string $tooltip Tooltip * @return string */ -function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='') +function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $disablesortlink = 0, $tooltip = '') { global $conf, $langs, $form; //print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n"; @@ -4010,7 +4010,7 @@ function print_titre($title) * @return void * @deprecated Use print load_fiche_titre instead */ -function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id='') +function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '') { print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id); } @@ -4028,7 +4028,7 @@ function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoi * @return string * @see print_barre_liste */ -function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='') +function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '') { global $conf; @@ -4076,7 +4076,7 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', * @param int $hidenavigation Force to hide all navigation tools * @return void */ -function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0) +function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0) { global $conf,$langs; @@ -4189,7 +4189,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so * @param int $hideselectlimit Force to hide select limit * @return void */ -function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $hideselectlimit=0) +function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $betweenarrows = '', $afterarrows = '', $limit = -1, $totalnboflines = 0, $hideselectlimit = 0) { global $conf, $langs; @@ -4274,7 +4274,7 @@ function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betwee * @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates * @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)') */ -function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0) +function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0) { $morelabel=''; @@ -4322,7 +4322,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0) * * @see price2num() Revert function of price */ -function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='') +function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $forcerounding = -1, $currency_code = '') { global $langs,$conf; @@ -4414,7 +4414,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou * * @see price Opposite function of price2num */ -function price2num($amount,$rounding='',$alreadysqlnb=0) +function price2num($amount, $rounding = '', $alreadysqlnb = 0) { global $langs,$conf; @@ -4500,7 +4500,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0) * @param string $forceunitoutput 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT) * @return string String to show dimensions */ -function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round=-1, $forceunitoutput='no') +function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round = -1, $forceunitoutput = 'no') { require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -4555,7 +4555,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round= * @return mixed 0 if not found, localtax rate if found * @see get_default_tva */ -function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller="", $vatnpr=0) +function get_localtax($vatrate, $local, $thirdparty_buyer = "", $thirdparty_seller = "", $vatnpr = 0) { global $db, $conf, $mysoc; @@ -4745,7 +4745,7 @@ function get_localtax_by_third($local) * @return array array('rowid'=> , 'code'=> ...) * @see getLocalTaxesFromRate */ -function getTaxesFromId($vatrate, $buyer=null, $seller=null, $firstparamisid=1) +function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid = 1) { global $db, $mysoc; @@ -4801,7 +4801,7 @@ function getTaxesFromId($vatrate, $buyer=null, $seller=null, $firstparamisid=1) * @return array array(localtax_type1(1-6/0 if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp) * @see getTaxesFromId */ -function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid=0) +function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid = 0) { global $db, $mysoc; @@ -4859,7 +4859,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi * @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)' * @see get_product_localtax_for_country */ -function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice=0) +function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice = 0) { global $db,$conf,$mysoc; @@ -5009,7 +5009,7 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller) * @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)', -1 if we can't guess it * @see get_default_npr, get_default_localtax */ -function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0) +function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) { global $conf; @@ -5096,7 +5096,7 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, * @return float 0 or 1 * @see get_default_tva, get_default_localtax */ -function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0) +function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) { global $db; @@ -5133,7 +5133,7 @@ function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, * @return integer localtax, -1 si ne peut etre determine * @see get_default_tva, get_default_npr */ -function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0) +function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod = 0) { global $mysoc; @@ -5176,7 +5176,7 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id * @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color. * @return string HTML string */ -function yn($yesno, $case=1, $color=0) +function yn($yesno, $case = 1, $color = 0) { global $langs; $result='unknown'; $classname=''; @@ -5263,7 +5263,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart) * @param int $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444' * @return int < 0 if KO, 0 = already exists, > 0 if OK */ -function dol_mkdir($dir, $dataroot='', $newmask=null) +function dol_mkdir($dir, $dataroot = '', $newmask = null) { global $conf; @@ -5354,7 +5354,7 @@ function picto_required() * * @see dol_escape_htmltag strip_tags dol_string_onlythesehtmltags dol_string_neverthesehtmltags */ -function dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0) +function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0) { if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>\n+/ims', '<br>', $stringtoclean); $temp = preg_replace('/<br[^>]*>/i', "\n", $stringtoclean); @@ -5418,7 +5418,7 @@ function dol_string_onlythesehtmltags($stringtoclean) * * @see dol_escape_htmltag strip_tags dol_string_nohtmltag dol_string_onlythesehtmltags */ -function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags=array('textarea')) +function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags = array('textarea')) { $temp = $stringtoclean; foreach($disallowed_tags as $tagtoremove) @@ -5438,7 +5438,7 @@ function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags=array('t * @return string Output text * @see dol_nboflines_bis, dol_string_nohtmltag, dol_escape_htmltag */ -function dolGetFirstLineOfText($text, $nboflines=1) +function dolGetFirstLineOfText($text, $nboflines = 1) { if ($nboflines == 1) { @@ -5496,7 +5496,7 @@ function dolGetFirstLineOfText($text, $nboflines=1) * @return string String encoded * @see dol_nboflines, dolGetFirstLineOfText */ -function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) +function dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false) { if (!$nl2brmode) { return nl2br($stringtoencode, $forxml); @@ -5524,7 +5524,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * @param int $removelasteolbr 1=Remove last br or lasts \n (default), 0=Do nothing * @return string String encoded */ -function dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1) +function dol_htmlentitiesbr($stringtoencode, $nl2brmode = 0, $pagecodefrom = 'UTF-8', $removelasteolbr = 1) { $newstring=$stringtoencode; if (dol_textishtml($stringtoencode)) // Check if text is already HTML or not @@ -5552,7 +5552,7 @@ function dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8' * @param string $pagecodeto Page code for result * @return string String decoded */ -function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8') +function dol_htmlentitiesbr_decode($stringtodecode, $pagecodeto = 'UTF-8') { $ret=dol_html_entity_decode($stringtodecode,ENT_COMPAT,$pagecodeto); $ret=preg_replace('/'."\r\n".'<br(\s[\sa-zA-Z_="]*)?\/?>/i',"<br>",$ret); @@ -5582,7 +5582,7 @@ function dol_htmlcleanlastbr($stringtodecode) * @param string $c Operand c * @return string String decoded */ -function dol_html_entity_decode($a,$b,$c='UTF-8') +function dol_html_entity_decode($a, $b, $c = 'UTF-8') { return html_entity_decode($a,$b,$c); } @@ -5597,7 +5597,7 @@ function dol_html_entity_decode($a,$b,$c='UTF-8') * @param bool $double_encode When double_encode is turned off, PHP will not encode existing html entities * @return string $ret Encoded string */ -function dol_htmlentities($string, $flags=null, $encoding='UTF-8', $double_encode=false) +function dol_htmlentities($string, $flags = null, $encoding = 'UTF-8', $double_encode = false) { return htmlentities($string, $flags, $encoding, $double_encode); } @@ -5633,7 +5633,7 @@ function dol_string_is_good_iso($s) * @return int Number of lines * @see dol_nboflines_bis, dolGetFirstLineOfText */ -function dol_nboflines($s,$maxchar=0) +function dol_nboflines($s, $maxchar = 0) { if ($s == '') return 0; $arraystring=explode("\n",$s); @@ -5652,7 +5652,7 @@ function dol_nboflines($s,$maxchar=0) * @return int Number of lines * @see dol_nboflines, dolGetFirstLineOfText */ -function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8') +function dol_nboflines_bis($text, $maxlinesize = 0, $charset = 'UTF-8') { $repTable = array("\t" => " ", "\n" => "<br>", "\r" => " ", "\0" => " ", "\x0B" => " "); if (dol_textishtml($text)) $repTable = array("\t" => " ", "\n" => " ", "\r" => " ", "\0" => " ", "\x0B" => " "); @@ -5707,7 +5707,7 @@ function dol_microtime_float() * @return boolean true/false * @see dol_concatdesc */ -function dol_textishtml($msg,$option=0) +function dol_textishtml($msg, $option = 0) { if ($option == 1) { @@ -5749,7 +5749,7 @@ function dol_textishtml($msg,$option=0) * @return string Text 1 + new line + Text2 * @see dol_textishtml */ -function dol_concatdesc($text1,$text2,$forxml=false, $invert=false) +function dol_concatdesc($text1, $text2, $forxml = false, $invert = false) { if (!empty($invert)) { @@ -5777,7 +5777,7 @@ function dol_concatdesc($text1,$text2,$forxml=false, $invert=false) * @return array Array of substitutions * @see setSubstitFromObject */ -function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null) +function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $object = null) { global $db, $conf, $mysoc, $user, $extrafields; @@ -6115,7 +6115,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob * @return string Output string after substitutions * @see complete_substitutions_array, getCommonSubstitutionArray */ -function make_substitutions($text, $substitutionarray, $outputlangs=null) +function make_substitutions($text, $substitutionarray, $outputlangs = null) { global $conf, $langs; @@ -6178,7 +6178,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) * @return void * @see make_substitutions */ -function complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray") +function complete_substitutions_array(&$substitutionarray, $outputlangs, $object = null, $parameters = null, $callfunc = "completesubstitutionarray") { global $conf,$user; @@ -6234,7 +6234,7 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object * @param Translate $outputlangs Output language * @return void */ -function print_date_range($date_start,$date_end,$format = '',$outputlangs='') +function print_date_range($date_start, $date_end, $format = '', $outputlangs = '') { print get_date_range($date_start,$date_end,$format,$outputlangs); } @@ -6249,7 +6249,7 @@ function print_date_range($date_start,$date_end,$format = '',$outputlangs='') * @param integer $withparenthesis 1=Add parenthesis, 0=non parenthesis * @return string String */ -function get_date_range($date_start,$date_end,$format = '',$outputlangs='', $withparenthesis=1) +function get_date_range($date_start, $date_end, $format = '', $outputlangs = '', $withparenthesis = 1) { global $langs; @@ -6281,7 +6281,7 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='', $wit * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname * @return string Firstname + lastname or Lastname + firstname */ -function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) +function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) { global $conf; @@ -6322,7 +6322,7 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) * @return void * @see dol_htmloutput_events */ -function setEventMessage($mesgs, $style='mesgs') +function setEventMessage($mesgs, $style = 'mesgs') { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); This is not deprecated, it is used by setEventMessages function if (! is_array($mesgs)) // If mesgs is a string @@ -6348,7 +6348,7 @@ function setEventMessage($mesgs, $style='mesgs') * @return void * @see dol_htmloutput_events */ -function setEventMessages($mesg, $mesgs, $style='mesgs') +function setEventMessages($mesg, $mesgs, $style = 'mesgs') { if (empty($mesg) && empty($mesgs)) { @@ -6375,7 +6375,7 @@ function setEventMessages($mesg, $mesgs, $style='mesgs') * @return void * @see dol_htmloutput_mesg */ -function dol_htmloutput_events($disabledoutputofmessages=0) +function dol_htmloutput_events($disabledoutputofmessages = 0) { // Show mesgs if (isset($_SESSION['dol_events']['mesgs'])) { @@ -6410,7 +6410,7 @@ function dol_htmloutput_events($disabledoutputofmessages=0) * @see dol_htmloutput_errors * @see setEventMessages */ -function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0) +function get_htmloutput_mesg($mesgstring = '', $mesgarray = '', $style = 'ok', $keepembedded = 0) { global $conf, $langs; @@ -6486,7 +6486,7 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb * @see dol_print_error * @see dol_htmloutput_mesg */ -function get_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0) +function get_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembedded = 0) { return get_htmloutput_mesg($mesgstring, $mesgarray,'error',$keepembedded); } @@ -6504,7 +6504,7 @@ function get_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded * @see dol_htmloutput_errors * @see setEventMessages */ -function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok', $keepembedded=0) +function dol_htmloutput_mesg($mesgstring = '', $mesgarray = array(), $style = 'ok', $keepembedded = 0) { if (empty($mesgstring) && (! is_array($mesgarray) || count($mesgarray) == 0)) return; @@ -6558,7 +6558,7 @@ function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok * @see dol_print_error * @see dol_htmloutput_mesg */ -function dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0) +function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembedded = 0) { dol_htmloutput_mesg($mesgstring, $mesgarray, 'error', $keepembedded); } @@ -6576,7 +6576,7 @@ function dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded * @param int $keepindex If 0 and index key of array to sort is a numeric, than index will be rewrote. If 1 or index key is not numeric, key for index is kept after sorting. * @return array Sorted array */ -function dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0) +function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sensitive = 0, $keepindex = 0) { // Clean parameters $order=strtolower($order); @@ -6672,7 +6672,7 @@ function dol_osencode($str) * @return int <0 if KO, Id of code if OK * @see $langs->getLabelFromKey */ -function dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0) +function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0) { global $cache_codes; @@ -6739,7 +6739,7 @@ function verifCond($strRights) * @param int $hideerrors 1=Hide errors * @return mixed Nothing or return of eval */ -function dol_eval($s, $returnvalue=0, $hideerrors=1) +function dol_eval($s, $returnvalue = 0, $hideerrors = 1) { // Only global variables can be changed by eval function and returned to caller global $db, $langs, $user, $conf, $website, $websitepage; @@ -7049,7 +7049,7 @@ function getLanguageCodeFromCountryCode($countrycode) * @param string $mode 'add' to complete head, 'remove' to remove entries * @return void */ -function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode='add') +function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add') { global $hookmanager; @@ -7144,7 +7144,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= * @param string $zone 'private' (for private pages) or 'public' (for public pages) * @return void */ -function printCommonFooter($zone='private') +function printCommonFooter($zone = 'private') { global $conf, $hookmanager, $user; global $action; @@ -7405,7 +7405,7 @@ function dol_getmypid() * @param integer $nofirstand 1=Do not output the first 'AND' * @return string $res The statement to append to the SQL query */ -function natural_search($fields, $value, $mode=0, $nofirstand=0) +function natural_search($fields, $value, $mode = 0, $nofirstand = 0) { global $db,$langs; @@ -7588,7 +7588,7 @@ function showDirectDownloadLink($object) * @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image (default). * @return string New file name (full or relative path, including the thumbs/) */ -function getImageFileNameForSize($file, $extName, $extImgTarget='') +function getImageFileNameForSize($file, $extName, $extImgTarget = '') { $dirName = dirname($file); if ($dirName == '.') $dirName=''; @@ -7620,7 +7620,7 @@ function getImageFileNameForSize($file, $extName, $extImgTarget='') * @param string $param More param on http links * @return string|array Output string with href link or array with all components of link */ -function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='') +function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param = '') { global $conf, $langs; @@ -7650,7 +7650,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='' * @param string $addlink Add a 'link to' after * @return string */ -function ajax_autoselect($htmlname, $addlink='') +function ajax_autoselect($htmlname, $addlink = '') { global $langs; $out = '<script> @@ -7672,7 +7672,7 @@ function ajax_autoselect($htmlname, $addlink='') * @return string Return a mime type family (text/xxx, application/xxx, image/xxx, audio, video, archive) * @see image_format_supported (images.lib.php) */ -function dol_mimetype($file, $default='application/octet-stream', $mode=0) +function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0) { $mime=$default; $imgmime='other.png'; @@ -7788,7 +7788,7 @@ function dol_mimetype($file, $default='application/octet-stream', $mode=0) * @param string $rowidfield name of the column rowid * @return string */ -function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid') +function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield = 'rowid') { global $dictvalues,$db,$langs; @@ -7894,7 +7894,7 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal * @param integer $x Multiple. For example 60 to round up to nearest exact minute for a date with seconds. * @return integer Value rounded. */ -function roundUpToNextMultiple($n, $x=5) +function roundUpToNextMultiple($n, $x = 5) { return (ceil($n)%$x === 0) ? ceil($n) : round(($n+$x/2)/$x)*$x; } diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aae70adfb62..db264909819 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -78,7 +78,7 @@ function jsUnEscape($source) * @param string $subdir Sub directory (Example: '/mailings') * @return array Array of directories that can contains module descriptors */ -function dolGetModulesDirs($subdir='') +function dolGetModulesDirs($subdir = '') { global $conf; @@ -142,7 +142,7 @@ function dol_getDefaultFormat(Translate $outputlangs = null) * @param int $searchalt 1=Search also in alternative languages * @return boolean true if OK, false if KO */ -function dol_print_file($langs,$filename,$searchalt=0) +function dol_print_file($langs, $filename, $searchalt = 0) { global $conf; @@ -192,7 +192,7 @@ function dol_print_file($langs,$filename,$searchalt=0) * @param int $usetable Output into a table * @return void */ -function dol_print_object_info($object, $usetable=0) +function dol_print_object_info($object, $usetable = 0) { global $langs, $db; @@ -528,7 +528,7 @@ function isValidMailDomain($mail) * @param int $anchor 1: verify anchor is provided, 0: not verify anchor * @return int 1=Check is OK, 0=Check is KO */ -function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0) +function isValidUrl($url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0, $anchor = 0) { $ValidUrl = 0; $urlregex = ''; @@ -571,7 +571,7 @@ function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0) * @param integer $http 1 = keep both http:// and https://, 0: remove http:// but not https:// * @return string Cleaned url */ -function clean_url($url,$http=1) +function clean_url($url, $http = 1) { // Fixed by Matelli (see http://matelli.fr/showcases/patchs-dolibarr/fix-cleaning-url.html) // To include the minus sign in a char class, we must not escape it but put it at the end of the class @@ -617,7 +617,7 @@ function clean_url($url,$http=1) * @param bool $displaytld Display tld (default: true) * @return string Return email with hidden parts or ''; */ -function dolObfuscateEmail($mail, $replace="*", $nbreplace=8, $nbdisplaymail=4, $nbdisplaydomain=3, $displaytld=true) +function dolObfuscateEmail($mail, $replace = "*", $nbreplace = 8, $nbdisplaymail = 4, $nbdisplaydomain = 3, $displaytld = true) { if(!isValidEmail($mail))return ''; $tab = explode('@', $mail); @@ -658,7 +658,7 @@ function dolObfuscateEmail($mail, $replace="*", $nbreplace=8, $nbdisplaymail=4, * @param string $tdoptions Options for td * @return string */ -function array2tr($data,$troptions='',$tdoptions='') +function array2tr($data, $troptions = '', $tdoptions = '') { $text = '<tr '.$troptions.'>' ; foreach($data as $key => $item){ @@ -678,7 +678,7 @@ function array2tr($data,$troptions='',$tdoptions='') * @param string $tdoptions Options for td * @return string */ -function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdoptions='') +function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = '', $tdoptions = '') { $text='' ; if($tableMarkup) $text = '<table '.$tableoptions.'>' ; @@ -712,7 +712,7 @@ function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdopti * @param int $forceentity Entity id to force * @return string New value (numeric) or error message */ -function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$mode='next', $bentityon=true, $objuser=null, $forceentity=null) +function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $date = '', $mode = 'next', $bentityon = true, $objuser = null, $forceentity = null) { global $conf,$user; @@ -1193,7 +1193,7 @@ function get_string_between($string, $start, $end) * @param string $value Value * @return int|string <0 or error string if KO, 0 if OK */ -function check_value($mask,$value) +function check_value($mask, $value) { $result=0; @@ -1302,7 +1302,7 @@ function check_value($mask,$value) * @param boolean $upper Convert to tupper * @return string x */ -function binhex($bin, $pad=false, $upper=false) +function binhex($bin, $pad = false, $upper = false) { $last = dol_strlen($bin)-1; for($i=0; $i<=$last; $i++){ $x += $bin[$last-$i] * pow(2,$i); } @@ -1418,7 +1418,7 @@ function numero_semaine($time) * @param int $to_unit Nouvelle unite en puissance de 10 * @return float Masse convertie */ -function weight_convert($weight,&$from_unit,$to_unit) +function weight_convert($weight, &$from_unit, $to_unit) { /* Pour convertire 320 gr en Kg appeler * $f = -3 @@ -1522,7 +1522,7 @@ function dol_set_user_param($db, $conf, &$user, $tab) * @param Translate $langs Output language * @return string Formated reduction */ -function dol_print_reduction($reduction,$langs) +function dol_print_reduction($reduction, $langs) { $string = ''; if ($reduction == 100) @@ -1589,7 +1589,7 @@ function version_webserver() * @param int $maxfilenamelength Max length of value to show * @return mixed 0 if no module is activated, or array(key=>label). For modules that need directory scan, key is completed with ":filename". */ -function getListOfModels($db,$type,$maxfilenamelength=0) +function getListOfModels($db, $type, $maxfilenamelength = 0) { global $conf,$langs; $liste=array(); @@ -1714,7 +1714,7 @@ function is_ip($ip) * @param string $firstname Firstname * @return string Login */ -function dol_buildlogin($lastname,$firstname) +function dol_buildlogin($lastname, $firstname) { $login=strtolower(dol_string_unaccent($firstname)); $login.=($login?'.':''); @@ -1778,7 +1778,7 @@ function getSoapParams() * @param string $option More options * @return string URL of link to object id/type */ -function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') +function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') { global $db, $conf, $langs; @@ -2140,7 +2140,7 @@ function getElementProperties($element_type) * @param ref $element_ref Element ref (Use this if element_id but not both) * @return int|object object || 0 || -1 if error */ -function fetchObjectByElement($element_id, $element_type, $element_ref='') +function fetchObjectByElement($element_id, $element_type, $element_ref = '') { global $conf; global $db,$conf; @@ -2170,7 +2170,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref='') * @return string RGB hex value (without # before). For example: 'FF00FF', '01FF02' * @see colorStringToArray */ -function colorArrayToHex($arraycolor,$colorifnotfound='888888') +function colorArrayToHex($arraycolor, $colorifnotfound = '888888') { if (! is_array($arraycolor)) return $colorifnotfound; if (empty($arraycolor)) return $colorifnotfound; @@ -2187,7 +2187,7 @@ function colorArrayToHex($arraycolor,$colorifnotfound='888888') * @return string RGB hex value (without # before). For example: FF00FF * @see colorArrayToHex */ -function colorStringToArray($stringcolor,$colorifnotfound=array(88,88,88)) +function colorStringToArray($stringcolor, $colorifnotfound = array(88,88,88)) { if (is_array($stringcolor)) return $stringcolor; // If already into correct output format, we return as is $tmp=preg_match('/^#?([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/',$stringcolor,$reg); @@ -2316,7 +2316,7 @@ function getModuleDirForApiClass($module) * @param $max int Between 0 and 255 * @return String */ -function random_color_part($min=0,$max=255) +function random_color_part($min = 0, $max = 255) { return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT); } @@ -2328,7 +2328,7 @@ function random_color_part($min=0,$max=255) * @param $max int Between 0 and 255 * @return String */ -function random_color($min=0, $max=255) +function random_color($min = 0, $max = 255) { return random_color_part($min, $max) . random_color_part($min, $max) . random_color_part($min, $max); } diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 9f04a81fa5f..20f99be09e3 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -33,7 +33,7 @@ * @param boolean $centimes 0=no centimes | 1=centimes to translate * @return string Text of the number */ -function dol_convertToWord($num, $langs, $currency=false, $centimes=false) +function dol_convertToWord($num, $langs, $currency = false, $centimes = false) { global $conf; @@ -144,7 +144,7 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false) * @param string $numorcurrency 'number' or 'amount' * @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99) */ -function dolNumberToWord($numero, $langs, $numorcurrency='number') +function dolNumberToWord($numero, $langs, $numorcurrency = 'number') { // If the number is negative convert to positive and return -1 if is too long if ($numero < 0) $numero *= -1; diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 418cc1418b5..2787b8f1209 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -31,7 +31,7 @@ * @param string[] $addheaders Array of string to add into header. Example: ('Accept: application/xrds+xml', ....) * @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) */ -function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addheaders=array()) +function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = 1, $addheaders = array()) { //declaring of global variables global $conf, $langs; diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index a37bd2818a1..0bc0ac8f7a5 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -106,7 +106,7 @@ function dol_getImageSize($file, $url = false) * @param int $src_y Position of croping image in source image (not use if mode=0) * @return int File name if OK, error message if KO */ -function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x=0, $src_y=0) +function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -349,7 +349,7 @@ function dolRotateImage($file_path) * @param int $targetformat New format of target (IMAGETYPE_GIF, IMAGETYPE_JPG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_WBMP ... or 0 to keep old format) * @return string Full path of thumb or '' if it fails or 'Error...' if it fails */ -function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0) +function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $quality = 50, $outdir = 'thumbs', $targetformat = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php index c3b8beac249..71e47554ac4 100644 --- a/htdocs/core/lib/import.lib.php +++ b/htdocs/core/lib/import.lib.php @@ -32,7 +32,7 @@ * @param int $maxstep Limit steps to maxstep or no limit if 0 * @return array Array of tabs */ -function import_prepare_head($param, $maxstep=0) +function import_prepare_head($param, $maxstep = 0) { global $langs; diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index f511d12da21..227d9ee24ec 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; * @param string $fileprefix Prefix to add into filename of generated PDF * @return int Error code */ -function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate=0, $filesuffix='', $paymentbankid='', $thirdpartiesid='', $fileprefix='mergedpdf') +function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate = 0, $filesuffix = '', $paymentbankid = '', $thirdpartiesid = '', $fileprefix = 'mergedpdf') { $sql = "SELECT DISTINCT f.rowid, f.ref"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 9f2e55153d0..28e75d494e9 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -103,7 +103,7 @@ function ldap_prepare_head() * @param string $objectclass Class * @return void */ -function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) +function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) { global $langs, $conf, $user; //print 'key='.$key.' dn='.$dn.' objectclass='.$objectclass; @@ -141,7 +141,7 @@ function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) * @param int $subcount Subcount * @return int */ -function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) +function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0) { global $bc, $conf; diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 69c127f915c..c8e594f549a 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -39,7 +39,7 @@ $shmoffset=1000; // Max number of entries found into a language file. If too low * @param string $data Data to save * @return int <0 if KO, Nb of bytes written if OK */ -function dol_setcache($memoryid,$data) +function dol_setcache($memoryid, $data) { global $conf; $result=0; @@ -214,7 +214,7 @@ function dol_listshmop() * @param string $data Data to save * @return int <0 if KO, Nb of bytes written if OK */ -function dol_setshmop($memoryid,$data) +function dol_setshmop($memoryid, $data) { global $shmkeys,$shmoffset; diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 4981e0fffd0..57928341302 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -37,7 +37,7 @@ * @return int|object <=0 if KO, Object if OK * @see rebuildObjectSql */ -function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir='', $addfieldentry=array() ,$delfieldentry='') +function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = '', $addfieldentry = array(), $delfieldentry = '') { global $db, $langs; @@ -210,7 +210,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir=' * @return int <=0 if KO, >0 if OK * @see rebuildObjectClass */ -function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', $object=null) +function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '', $object = null) { global $db, $langs; diff --git a/htdocs/core/lib/parsemd.lib.php b/htdocs/core/lib/parsemd.lib.php index 13334fd400c..8fb3a1eecca 100644 --- a/htdocs/core/lib/parsemd.lib.php +++ b/htdocs/core/lib/parsemd.lib.php @@ -29,7 +29,7 @@ * @param string $replaceimagepath Replace path to image with another path. Exemple: ('doc/'=>'xxx/aaa/') * @return string Parsed content */ -function dolMd2Html($content, $parser='parsedown',$replaceimagepath=null) +function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null) { if (is_array($replaceimagepath)) { diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 0119b0f0ee5..28f899096bb 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -95,7 +95,7 @@ function payment_supplier_prepare_head(Paiement $object) * @param string $paymentmethod Filter on this payment method (''=none, 'paypal', ...) * @return array Array of valid payment method */ -function getValidOnlinePaymentMethods($paymentmethod='') +function getValidOnlinePaymentMethods($paymentmethod = '') { global $conf; @@ -123,7 +123,7 @@ function getValidOnlinePaymentMethods($paymentmethod='') * @param string $ref Ref of object * @return string Url string */ -function showOnlinePaymentUrl($type,$ref) +function showOnlinePaymentUrl($type, $ref) { global $conf, $langs; @@ -149,7 +149,7 @@ function showOnlinePaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='your_free_tag') +function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -274,7 +274,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo * @param Object $object Object related to payment * @return void */ -function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null) +function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage = 0, $suffix = '', $object = null) { global $conf; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 056796032d4..7b624a02f8a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -79,7 +79,7 @@ function pdf_getFormat(Translate $outputlangs = null) * @param string $pagetype 'P' or 'l' * @return TCPDF PDF object */ -function pdf_getInstance($format='',$metric='mm',$pagetype='P') +function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') { global $conf; @@ -316,7 +316,7 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) * @param int $includealias 1=Include alias name after name * @return string String with name of thirdparty (+ alias if requested) */ -function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0) +function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias = 0) { global $conf; @@ -350,7 +350,7 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali * @param Object $object Object we want to build document for * @return string String with full address */ -function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) +function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $targetcontact = '', $usecontact = 0, $mode = 'source', $object = null) { global $conf, $hookmanager; @@ -597,7 +597,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target * @param int $page_height Height of page * @return void */ -function pdf_pagehead(&$pdf,$outputlangs,$page_height) +function pdf_pagehead(&$pdf, $outputlangs, $page_height) { global $conf; @@ -620,7 +620,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) * @param int $onlykey 1=Do not calculate some heavy values of keys (performance enhancement when we need only the keys), 2=Values are truncated and html sanitized (to use for help tooltip) * @return array Array of substitutions */ -function pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0) +function pdf_getSubstitutionArray($outputlangs, $exclude = null, $object = null, $onlykey = 0) { $substitutionarray = getCommonSubstitutionArray($outputlangs, $onlykey, $exclude, $object); $substitutionarray['__FROM_NAME__']='__FROM_NAME__'; @@ -689,7 +689,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) * @param int $default_font_size Default font size * @return float The Y PDF position */ -function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) +function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $default_font_size = 10) { global $mysoc, $conf; @@ -869,7 +869,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default * @param int $hidefreetext 1=Hide free text, 0=Show free text * @return int Return height of bottom margin including footer text */ -function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) +function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails = 0, $hidefreetext = 0) { global $conf,$user,$mysoc; @@ -1116,7 +1116,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass * @param string $default_font_size Font size * @return float The Y PDF position */ -function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) +function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs); if (! empty($linkedobjects)) @@ -1155,7 +1155,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al * @param int $issupplierline Is it a line for a supplier object ? * @return string */ -function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_writelinedesc(&$pdf, $object, $i, $outputlangs, $w, $h, $posx, $posy, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs, $hookmanager; @@ -1193,7 +1193,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs; @@ -1422,7 +1422,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinenum($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1455,7 +1455,7 @@ function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1487,7 +1487,7 @@ function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref_supplier($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1519,7 +1519,7 @@ function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails=0) +function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager, $mysoc; @@ -1578,7 +1578,7 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager; @@ -1618,7 +1618,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string */ -function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupwithtax($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager,$conf; @@ -1654,7 +1654,7 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1688,7 +1688,7 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_asked($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1722,7 +1722,7 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_shipped($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1756,7 +1756,7 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_keeptoship($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1833,7 +1833,7 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1918,7 +1918,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string Return total of line excl tax */ -function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager; @@ -1974,7 +1974,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string Return total of line incl tax */ -function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager,$conf; @@ -2014,7 +2014,7 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) * @return integer * @deprecated Not used by Dolibarr core, so will be removed. */ -function pdf_getTotalQty($object,$type,$outputlangs) +function pdf_getTotalQty($object, $type, $outputlangs) { global $hookmanager; @@ -2061,7 +2061,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) * @param Translate $outputlangs Object lang for output * @return array Linked objects */ -function pdf_getLinkedObjects($object,$outputlangs) +function pdf_getLinkedObjects($object, $outputlangs) { global $hookmanager; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 0b9f3a3b246..38a45fd96f1 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -82,7 +82,7 @@ * 25=multicurrency_total_tax1 for total_ht * 26=multicurrency_total_tax2 for total_ht */ -function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '', $localtaxes_array='', $progress=100, $multicurrency_tx=1, $pu_devise=0) +function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '', $localtaxes_array = '', $progress = 100, $multicurrency_tx = 1, $pu_devise = 0) { global $conf,$mysoc,$db; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 68e78a29d76..e1f7e316e20 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -317,7 +317,7 @@ function product_lot_admin_prepare_head() * @param int $socid Thirdparty id * @return integer NB of lines shown into array */ -function show_stats_for_company($product,$socid) +function show_stats_for_company($product, $socid) { global $conf,$langs,$user,$db; @@ -470,7 +470,7 @@ function show_stats_for_company($product,$socid) * @return string Unit string * @see formproduct->load_measuring_units */ -function measuring_units_string($unit,$measuring_style='') +function measuring_units_string($unit, $measuring_style = '') { global $langs; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 8b6ca6a5ca3..80bb9a555b4 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -251,7 +251,7 @@ function task_prepare_head($object) * @param string $fuser Filter on user * @return array Array of tabs to show */ -function project_timesheet_prepare_head($mode, $fuser=null) +function project_timesheet_prepare_head($mode, $fuser = null) { global $langs, $conf, $user; $h = 0; @@ -347,7 +347,7 @@ function project_admin_prepare_head() * @param string $filterprogresscalc filter text * @return void */ -function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0, $projectidfortotallink=0, $filterprogresscalc='') +function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '') { global $user, $bc, $langs, $conf, $db; global $projectstatic, $taskstatic; @@ -647,7 +647,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -873,7 +873,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1162,7 +1162,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1473,7 +1473,7 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param array $hiddenfields List of info to not show ('projectlabel', 'declaredprogress', '...', ) * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array(),$hiddenfields=array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $statut = -1, $listofoppstatus = array(), $hiddenfields = array()) { global $langs,$conf,$user,$bc; diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 5a8aa344240..e920b1a9909 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -38,7 +38,7 @@ * @param string $varlink Add a variable into the address of the page * @return void */ -function report_header($reportname,$notused,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='') +function report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink = '', $moreparam = array(), $calcmode = '', $varlink = '') { global $langs; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index c7d59db13da..573be47c8df 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -34,7 +34,7 @@ * @return string encoded string * @see dol_decode */ -function dol_encode($chain, $key='1') +function dol_encode($chain, $key = '1') { if (is_numeric($key) && $key == '1') // rule 1 is offset of 17 for char { @@ -70,7 +70,7 @@ function dol_encode($chain, $key='1') * @return string decoded string * @see dol_encode */ -function dol_decode($chain, $key='1') +function dol_decode($chain, $key = '1') { $chain = base64_decode($chain); @@ -111,7 +111,7 @@ function dol_decode($chain, $key='1') * @return string Hash of string * @getRandomPassword */ -function dol_hash($chain, $type='0') +function dol_hash($chain, $type = '0') { global $conf; @@ -147,7 +147,7 @@ function dol_hash($chain, $type='0') * @param string $type Type of hash ('0':auto, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return bool True if the computed hash is the same as the given one */ -function dol_verifyHash($chain, $hash, $type='0') +function dol_verifyHash($chain, $hash, $type = '0') { global $conf; @@ -178,7 +178,7 @@ function dol_verifyHash($chain, $hash, $type='0') * @return int Always 1, die process if not allowed * @see dol_check_secure_access_document */ -function restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0) +function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0) { global $db, $conf; global $hookmanager; @@ -433,7 +433,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu * @return bool True if user has access, False otherwise * @see restrictedArea */ -function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='', $dbt_select='rowid') +function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = '', $dbt_select = 'rowid') { global $db, $conf; @@ -657,7 +657,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh * @param int $showonlymessage Show only message parameter. Otherwise add more information. * @return void */ -function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymessage=0) +function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0) { global $conf, $db, $user, $langs; if (! is_object($langs)) diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index c09cd7f78d3..313574f6d72 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -49,7 +49,7 @@ function dol_getwebuser($mode) * @param array $authmode Array list of selected authentication mode array('http', 'dolibarr', 'xxx'...) * @return string Login or '' */ -function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmode) +function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode) { global $conf,$langs; //global $dolauthmode; // To return authentication finally used @@ -129,7 +129,7 @@ if (! function_exists('dol_loginfunction')) * @param Societe $mysoc Company object * @return void */ - function dol_loginfunction($langs,$conf,$mysoc) + function dol_loginfunction($langs, $conf, $mysoc) { global $dolibarr_main_demo,$db; global $smartphone,$hookmanager; @@ -313,7 +313,7 @@ if (! function_exists('dol_loginfunction')) * non defini=>renvoi un salt pour cryptage par defaut * @return string Salt string */ -function makesalt($type=CRYPT_SALT_LENGTH) +function makesalt($type = CRYPT_SALT_LENGTH) { dol_syslog("makesalt type=".$type); switch($type) @@ -340,7 +340,7 @@ function makesalt($type=CRYPT_SALT_LENGTH) * @param int $level Encode level: 0 no encoding, 1 encoding * @return int <0 if KO, >0 if OK */ -function encodedecode_dbpassconf($level=0) +function encodedecode_dbpassconf($level = 0) { dol_syslog("encodedecode_dbpassconf level=".$level, LOG_DEBUG); $config = ''; @@ -448,7 +448,7 @@ function encodedecode_dbpassconf($level=0) * @return string New value for password * @see dol_hash */ -function getRandomPassword($generic=false, $replaceambiguouschars=null) +function getRandomPassword($generic = false, $replaceambiguouschars = null) { global $db,$conf,$langs,$user; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index be8aeb890fc..8ad2a91d3ea 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -174,7 +174,7 @@ function delivery_prepare_head($object) * @param string $filter Filter * @return int <0 if KO, >0 if OK */ -function show_list_sending_receive($origin,$origin_id,$filter='') +function show_list_sending_receive($origin, $origin_id, $filter = '') { global $db, $conf, $langs, $bc; global $form; diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 2790c80c8e0..6f1ccdae258 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -24,7 +24,7 @@ * @param string $ref Ref of object * @return string Url string */ -function showOnlineSignatureUrl($type,$ref) +function showOnlineSignatureUrl($type, $ref) { global $conf, $langs; @@ -49,7 +49,7 @@ function showOnlineSignatureUrl($type,$ref) * @param string $ref Ref of object * @return string Url string */ -function getOnlineSignatureUrl($mode, $type, $ref='') +function getOnlineSignatureUrl($mode, $type, $ref = '') { global $conf, $db, $langs; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 7927bec0268..e45afe65af1 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -88,7 +88,7 @@ function tax_prepare_head(ChargeSociales $object) * @param int $q Quarter * @return array Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error */ -function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m=0, $q=0) +function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m = 0, $q = 0) { global $conf; @@ -556,7 +556,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di * @param int $m Month * @return array Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error */ -function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m=0) +function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0) { global $conf; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 735050af437..19407852066 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -126,7 +126,7 @@ function ticket_prepare_head($object) * @param string $car Char to generate key * @return void */ -function generate_random_id($car=16) +function generate_random_id($car = 16) { $string = ""; $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 6c66079090a..d8242521f70 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -33,7 +33,7 @@ * @param int $silent Do not output indent and picto, returns only value * @return integer[] array(0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after, nbofdirinsub, nbofdocinsub) */ -function tree_showpad(&$fulltree,$key,$silent=0) +function tree_showpad(&$fulltree, $key, $silent = 0) { $pos=1; @@ -113,7 +113,7 @@ function tree_showpad(&$fulltree,$key,$silent=0) * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) * @return void */ -function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0) +function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0) { global $tree_recur_alreadyadded; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5747c0a5c0e..224d8407c48 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -295,7 +295,7 @@ function user_admin_prepare_head() * @param boolean $foruserprofile Show for user profile view * @return void */ -function show_theme($fuser,$edit=0,$foruserprofile=false) +function show_theme($fuser, $edit = 0, $foruserprofile = false) { global $conf,$langs,$db,$form; global $bc; diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index da16b0846c5..a66fd3971fd 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -33,7 +33,7 @@ * @return boolean True if OK * @see dolWebsiteOutput for function used to replace content in a web server context */ -function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0) +function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0) { $nbrep = 0; @@ -102,7 +102,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0) * @param string $replacewith String to use as replacement * @return string Result string without php code */ -function dolStripPhpCode($str, $replacewith='') +function dolStripPhpCode($str, $replacewith = '') { $newstr = ''; @@ -277,7 +277,7 @@ function dolWebsiteSaveContent($content) * @param int $containerid Id of container. * @return void */ -function redirectToContainer($containerref, $containeraliasalt='',$containerid=0) +function redirectToContainer($containerref, $containeraliasalt = '', $containerid = 0) { global $db, $website; @@ -412,7 +412,7 @@ function includeContainer($containerref) * @param string $grabimagesinto 'root' or 'subpage' * @return void */ -function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks=0, $grabimages=1, $grabimagesinto='subpage') +function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks = 0, $grabimages = 1, $grabimagesinto = 'subpage') { global $conf; diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 533a13e1fb6..89e8f0da5bd 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -32,7 +32,7 @@ * @param string $errorlabel Error string label * @return User Return user object identified by login/pass/entity into authentication array */ -function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) +function check_authentication($authentication, &$error, &$errorcode, &$errorlabel) { global $db,$conf,$langs; global $dolibarr_main_authentication,$dolibarr_auto_user; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 10d68475c97..01ce7fa3c60 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -32,7 +32,7 @@ * @param string $outputfile Output file * @return int <0 if ko, Nb of events in file if ok */ -function build_calfile($format,$title,$desc,$events_array,$outputfile) +function build_calfile($format, $title, $desc, $events_array, $outputfile) { global $conf,$langs; @@ -292,7 +292,7 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) * @param string $filter Filter * @return int <0 if ko, Nb of events in file if ok */ -function build_rssfile($format,$title,$desc,$events_array,$outputfile,$filter='') +function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = '') { global $user,$conf,$langs; global $dolibarr_main_url_root; @@ -395,7 +395,7 @@ function build_rssfile($format,$title,$desc,$events_array,$outputfile,$filter='' * @param string $string string to encode * @return string string encoded */ -function format_cal($format,$string) +function format_cal($format, $string) { global $conf; @@ -476,7 +476,7 @@ function calEncode($line) * @param int $forcal 1=For cal * @return string String converted */ -function quotedPrintEncode($str,$forcal=0) +function quotedPrintEncode($str, $forcal = 0) { $lines = preg_split("/\r\n/", $str); $out = ''; diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 70cb1e4fa86..00615c30f0e 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -33,7 +33,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=1) +function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotest = 1) { global $db,$conf,$langs; diff --git a/htdocs/core/login/functions_empty.php b/htdocs/core/login/functions_empty.php index a8b90de0e46..9d57e53832b 100644 --- a/htdocs/core/login/functions_empty.php +++ b/htdocs/core/login/functions_empty.php @@ -31,7 +31,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_empty($usertotest,$passwordtotest,$entitytotest) +function check_user_password_empty($usertotest, $passwordtotest, $entitytotest) { global $langs; diff --git a/htdocs/core/login/functions_forceuser.php b/htdocs/core/login/functions_forceuser.php index c337a0840b3..53e5f8beca9 100644 --- a/htdocs/core/login/functions_forceuser.php +++ b/htdocs/core/login/functions_forceuser.php @@ -32,7 +32,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_forceuser($usertotest,$passwordtotest,$entitytotest) +function check_user_password_forceuser($usertotest, $passwordtotest, $entitytotest) { // Variable dolibarr_auto_user must be defined in conf.php file global $dolibarr_auto_user; diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php index 285ebebbabf..0be350787b4 100644 --- a/htdocs/core/login/functions_http.php +++ b/htdocs/core/login/functions_http.php @@ -31,7 +31,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_http($usertotest,$passwordtotest,$entitytotest) +function check_user_password_http($usertotest, $passwordtotest, $entitytotest) { dol_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".(empty($_SERVER["REMOTE_USER"])?'':$_SERVER["REMOTE_USER"])); diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 4587dbae11b..baedc488674 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -32,7 +32,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) +function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) { global $db,$conf,$langs; global $_POST; diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index bc8d7f45122..ffba9c09fb6 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -34,7 +34,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/openid.class.php'; * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) +function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) { global $_POST,$db,$conf,$langs; diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 1ca94b38106..f6275348f07 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; * @param string $mode 'top', 'topnb', 'left', 'jmobile' * @return int 0 */ -function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode='') +function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -164,7 +164,7 @@ function print_start_menu_array_auguria() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry_auguria($idsel,$classname,$showmode) +function print_start_menu_entry_auguria($idsel, $classname, $showmode) { if ($showmode) { @@ -255,7 +255,7 @@ function print_end_menu_array_auguria() * @param array $moredata An array with more data to output * @return int Nb of entries */ -function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) +function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index f4cb98d9c4b..8427ca3085c 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -63,7 +63,7 @@ class MenuManager * @param string $forceleftmenu To force leftmenu to load * @return void */ - function loadMenu($forcemainmenu='',$forceleftmenu='') + function loadMenu($forcemainmenu = '', $forceleftmenu = '') { global $conf, $user, $langs; @@ -123,7 +123,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $conf, $langs, $user; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 223cacaf26a..01ca42c9084 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; * @param string $mode 'top', 'topnb', 'left', 'jmobile' * @return int 0 */ -function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode='') +function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -393,7 +393,7 @@ function print_start_menu_array() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry($idsel,$classname,$showmode) +function print_start_menu_entry($idsel, $classname, $showmode) { if ($showmode) { @@ -482,7 +482,7 @@ function print_end_menu_array() * @param array $moredata An array with more data to output * @return int nb of menu entries */ -function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) +function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 4992fc6d11c..7fae44b445f 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -62,7 +62,7 @@ class MenuManager * @param string $forceleftmenu To force leftmenu to load * @return void */ - function loadMenu($forcemainmenu='',$forceleftmenu='') + function loadMenu($forcemainmenu = '', $forceleftmenu = '') { // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; @@ -123,7 +123,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $conf, $langs, $user; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 038167ae512..99acddd70ec 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -67,7 +67,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -532,7 +532,7 @@ function print_start_menu_array_empty() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry_empty($idsel,$classname,$showmode) +function print_start_menu_entry_empty($idsel, $classname, $showmode) { if ($showmode) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9e8d5565f67..441f73369ca 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -381,7 +381,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int 1 if OK, 0 if KO */ - function _init($array_sql, $options='') + function _init($array_sql, $options = '') { global $conf; $err=0; @@ -474,7 +474,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int 1 if OK, 0 if KO */ - function _remove($array_sql, $options='') + function _remove($array_sql, $options = '') { $err=0; @@ -778,7 +778,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * @param int $translated 1=Special version keys are translated, 0=Special version keys are not translated * @return string Module version */ - function getVersion($translated=1) + function getVersion($translated = 1) { global $langs; $langs->load("admin"); @@ -1127,7 +1127,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int Error count (0 if OK) */ - function insert_boxes($option='') + function insert_boxes($option = '') { // phpcs:enable include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; @@ -1650,7 +1650,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Error count (0 if OK) */ - function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0) + function insert_permissions($reinitadminperms = 0, $force_entity = null, $notrigger = 0) { // phpcs:enable global $conf,$user; @@ -2017,7 +2017,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int Error count (0 if OK) */ - function insert_dirs($name,$dir) + function insert_dirs($name, $dir) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php index 323675f88f6..2a492c3588d 100644 --- a/htdocs/core/modules/action/modules_action.php +++ b/htdocs/core/modules/action/modules_action.php @@ -41,7 +41,7 @@ abstract class ModeleAction extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -69,7 +69,7 @@ abstract class ModeleAction extends CommonDocGenerator * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 44092df6ec9..b0ba812123e 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -108,7 +108,7 @@ class CommActionRapport * @param Translate $outputlangs Lang object for output language * @return int 1=OK, 0=KO */ - function write_file($socid = 0, $catid = 0, $outputlangs='') + function write_file($socid = 0, $catid = 0, $outputlangs = '') { // phpcs:enable global $user,$conf,$langs,$hookmanager; diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 12aa47ce9d6..3daea20a113 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -100,7 +100,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -285,7 +285,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -387,7 +387,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 6fc6594b1e3..c05a66df53d 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -105,7 +105,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param null|array $moreparams More parameters * @return int 1 if OK, <=0 if KO */ - function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { // phpcs:enable global $conf, $hookmanager, $langs, $user, $mysoc; @@ -430,7 +430,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -618,7 +618,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/bank/modules_bank.php b/htdocs/core/modules/bank/modules_bank.php index fe43f9cee15..8cdf2ba7ebe 100644 --- a/htdocs/core/modules/bank/modules_bank.php +++ b/htdocs/core/modules/bank/modules_bank.php @@ -45,7 +45,7 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 6d9e492d666..a0d902aa3e1 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -120,7 +120,7 @@ class modPhpbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error * @return int <0 if KO, >0 if OK */ - function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $_GET,$_SERVER; global $conf; @@ -161,7 +161,7 @@ class modPhpbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error * @return int <0 if KO, >0 if OK */ - function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $conf,$filebarcode; diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed6a7635164..e58d51135e1 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -105,7 +105,7 @@ class modTcpdfbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error (not used with this engine) * @return int <0 if KO, >0 if OK */ - function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $_GET; @@ -152,7 +152,7 @@ class modTcpdfbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error (not used with this engine) * @return int <0 if KO, >0 if OK */ - function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $conf,$_GET; diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 97121eebcfd..58271615683 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -119,7 +119,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode * @param Product $objproduct Object product * @return string Return string example */ - function getExample($langs,$objproduct=0) + function getExample($langs, $objproduct = 0) { $examplebarcode = $this->getNextValue($objproduct,''); if (! $examplebarcode) @@ -142,7 +142,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objproduct=null,$type='') + function getNextValue($objproduct = null, $type = '') { global $db,$conf; diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 44d7eccbb07..81481d11dcf 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -96,7 +96,7 @@ abstract class ModeleNumRefBarCode * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value */ - function getNextValue($objproduct,$type='') + function getNextValue($objproduct, $type = '') { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -126,7 +126,7 @@ abstract class ModeleNumRefBarCode * @param int $type -1=Nothing, 0=Product, 1=Service * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf; diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 32d35edb70a..2868191046a 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -381,7 +381,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts * @param int $hidefreetext 1=Hide free text * @return void */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index ba617787cbe..e6abe0cf78f 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -109,7 +109,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -153,7 +153,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts * @param string $objforref Object for number to search * @return string Next free value */ - function chequereceipt_get_num($objsoc,$objforref) + function chequereceipt_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 6e211fb4ace..175ec2a7270 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -112,7 +112,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -141,7 +141,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts * @param string $objforref Object for number to search * @return string Next free value */ - function chequereceipt_get_num($objsoc,$objforref) + function chequereceipt_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 5a7920ce4f1..cc259b7f6b1 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -92,7 +92,7 @@ abstract class ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); @@ -135,7 +135,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index bd5c870e0ba..f65fe07a6ce 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -204,7 +204,7 @@ class doc_generic_order_odt extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 7009773e582..879319db2b9 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -215,7 +215,7 @@ class pdf_einstein extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; @@ -1125,7 +1125,7 @@ class pdf_einstein extends ModelePDFCommandes * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1235,7 +1235,7 @@ class pdf_einstein extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="PdfOrderTitle") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { global $conf,$langs,$hookmanager; @@ -1446,7 +1446,7 @@ class pdf_einstein extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 07173f7db13..a67327fa249 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -158,7 +158,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; @@ -1183,7 +1183,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param string $currency Currency code * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1251,7 +1251,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="PdfOrderTitle") + private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { global $conf,$langs,$hookmanager; @@ -1462,7 +1462,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - private function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1481,7 +1481,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hideref Do not show ref * @return null */ - public function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index ebbe72f94c9..66a5307cbfa 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -67,7 +67,7 @@ class pdf_proforma extends pdf_einstein * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="InvoiceProForma") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma") { global $conf,$langs,$hookmanager; diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 215d2380819..891e3d3dddd 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -119,7 +119,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 1b08c9c1105..0b6768dd273 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -128,7 +128,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -159,7 +159,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index d644de33a5d..6090ad35028 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -48,7 +48,7 @@ abstract class ModelePDFCommandes extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 22dfc6388b4..399bdca0fe0 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -193,7 +193,7 @@ class doc_generic_contract_odt extends ModelePDFContract * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 3375e5b7ccc..265263dd9bd 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -172,7 +172,7 @@ class pdf_strato extends ModelePDFContract * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$hookmanager,$mysoc; @@ -508,7 +508,7 @@ class pdf_strato extends ModelePDFContract * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -762,7 +762,7 @@ class pdf_strato extends ModelePDFContract * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 4769ec17f99..4b40b982c28 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -118,7 +118,7 @@ class mod_contract_magre extends ModelNumRefContracts * @param Object $contract contract object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $db,$conf; @@ -145,7 +145,7 @@ class mod_contract_magre extends ModelNumRefContracts * @param Object $objforref contract object * @return string Value if OK, 0 if KO */ - function contract_get_num($objsoc,$objforref) + function contract_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 993f4bf9bfb..509ece14278 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -81,7 +81,7 @@ class mod_contract_olive extends ModelNumRefContracts * @param Contrat $contract Object contract * @return string Return next value */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $langs; return ''; diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index e91775f669c..6c8f6b848c8 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -119,7 +119,7 @@ class mod_contract_serpis extends ModelNumRefContracts * @param Object $contract contract object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $db,$conf; @@ -161,7 +161,7 @@ class mod_contract_serpis extends ModelNumRefContracts * @param Object $objforref contract object * @return string Value if OK, 0 if KO */ - function contract_get_num($objsoc,$objforref) + function contract_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 59290de7d82..55f2ac2a940 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -51,7 +51,7 @@ abstract class ModelePDFContract extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cac7329cf5b..e19e8d6839f 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -73,7 +73,7 @@ class html_cerfafr extends ModeleDon * @param string $currency Currency code * @return int >0 if OK, <0 if KO */ - function write_file($don,$outputlangs,$currency='') + function write_file($don, $outputlangs, $currency = '') { // phpcs:enable global $user,$conf,$langs,$mysoc; @@ -283,7 +283,7 @@ class html_cerfafr extends ModeleDon * @param mixed $devise2 devise 2 ex: centimes * @return string amount in letters */ - private function amountToLetters($montant, $devise1='', $devise2='') + private function amountToLetters($montant, $devise1 = '', $devise2 = '') { $unite = array(); $dix = array(); diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php index aee52063227..7c74e1b542d 100644 --- a/htdocs/core/modules/dons/modules_don.php +++ b/htdocs/core/modules/dons/modules_don.php @@ -47,7 +47,7 @@ abstract class ModeleDon extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 4d7cc056f12..6ef784b0292 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -203,7 +203,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index bfda0e8dfad..b9c16d33420 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -116,7 +116,7 @@ class pdf_merou extends ModelePdfExpedition * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -154,7 +154,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file(&$object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$mysoc,$hookmanager; @@ -455,7 +455,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $langs; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -493,7 +493,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hidefreetext 1=Hide free text * @return void */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetFont('','', $default_font_size - 2); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 84f73cde1c6..fe841f2278b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -115,7 +115,7 @@ class pdf_rouget extends ModelePdfExpedition * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -184,7 +184,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$hookmanager; @@ -778,7 +778,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -1111,7 +1111,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 35a5eb2325b..a1bc26efa64 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -119,7 +119,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -148,7 +148,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition * @param Object $objforref Shipment object * @return string Next free value */ - function expedition_get_num($objsoc,$objforref) + function expedition_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 2ebf9335755..6b875388a4d 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -117,7 +117,7 @@ class mod_expedition_safor extends ModelNumRefExpedition * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -158,7 +158,7 @@ class mod_expedition_safor extends ModelNumRefExpedition * @param Object $objforref Shipment object * @return string Next free value */ - function expedition_get_num($objsoc,$objforref) + function expedition_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index a22ae0d0f99..e0c55cd2bc4 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -50,7 +50,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 9851e1781e2..644062c3077 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -541,7 +541,7 @@ class pdf_standard extends ModeleExpenseReport * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return void */ - private function printLine(&$pdf, $object, $linenumber, $curY, $default_font_size, $outputlangs, $hidedetails=0) + private function printLine(&$pdf, $object, $linenumber, $curY, $default_font_size, $outputlangs, $hidedetails = 0) { global $conf; $pdf->SetFont('','', $default_font_size - 1); @@ -835,7 +835,7 @@ class pdf_standard extends ModeleExpenseReport * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1057,7 +1057,7 @@ class pdf_standard extends ModeleExpenseReport * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 9ff7f671f9f..88621be737a 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -37,7 +37,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -66,7 +66,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 1efe6161647..298f535dffb 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -163,7 +163,7 @@ class ExportCsv extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $langs; @@ -208,7 +208,7 @@ class ExportCsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -244,7 +244,7 @@ class ExportCsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 5dc574a150f..f0848d219c1 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -186,7 +186,7 @@ class ExportExcel extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $user,$conf,$langs; @@ -275,7 +275,7 @@ class ExportExcel extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -332,7 +332,7 @@ class ExportExcel extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_excelnew.modules.php b/htdocs/core/modules/export/export_excelnew.modules.php index dfb9e4381f7..fcb580ea2d8 100644 --- a/htdocs/core/modules/export/export_excelnew.modules.php +++ b/htdocs/core/modules/export/export_excelnew.modules.php @@ -179,7 +179,7 @@ class ExportExcelnew extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $user,$conf,$langs; @@ -253,7 +253,7 @@ class ExportExcelnew extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -296,7 +296,7 @@ class ExportExcelnew extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 8afa9ded884..fa3a55fa10d 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -159,7 +159,7 @@ class ExportTsv extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $langs; @@ -204,7 +204,7 @@ class ExportTsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable foreach($array_selected_sorted as $code => $value) @@ -229,7 +229,7 @@ class ExportTsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php index 15536747a28..7a2f172c19d 100644 --- a/htdocs/core/modules/export/modules_export.php +++ b/htdocs/core/modules/export/modules_export.php @@ -52,7 +52,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac * @param integer $maxfilenamelength Max length of value to show * @return array List of templates (same content than array this->driverlabel) */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable dol_syslog(get_class($this)."::liste_modeles"); diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 8e3caa1d3ec..1ac8e9aaa2c 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -202,7 +202,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ab2ffb3bd2a..8365114bbad 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -230,7 +230,7 @@ class pdf_crabe extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1411,7 +1411,7 @@ class pdf_crabe extends ModelePDFFactures * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1842,7 +1842,7 @@ class pdf_crabe extends ModelePDFFactures * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 7e28f11bb8a..203711fc80f 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -172,7 +172,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1473,7 +1473,7 @@ class pdf_sponge extends ModelePDFFactures * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1813,7 +1813,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1830,7 +1830,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hideref Do not show ref * @return null */ - function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 7057fda20ee..9d67bdc96dc 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -149,7 +149,7 @@ class mod_facture_mars extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db; $prefix=$this->prefixinvoice; @@ -223,7 +223,7 @@ class mod_facture_mars extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index c454b200004..ccd763eec33 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -135,7 +135,7 @@ class mod_facture_mercure extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db,$conf; @@ -182,7 +182,7 @@ class mod_facture_mercure extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 454a1588f27..f04addb657d 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -167,7 +167,7 @@ class mod_facture_terre extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db; @@ -238,7 +238,7 @@ class mod_facture_terre extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index fd9168150d6..505582f534a 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -50,7 +50,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -127,7 +127,7 @@ abstract class ModeleNumRefFactures * @param Facture $facture Objet facture * @return string Value */ - function getNextValue($objsoc,$facture) + function getNextValue($objsoc, $facture) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 22ec100a73e..2c3e5a6130b 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -163,7 +163,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -491,7 +491,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -727,7 +727,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 86f25dc4078..dc0a607ad5e 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -124,7 +124,7 @@ class mod_arctic extends ModeleNumRefFicheinter * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -152,7 +152,7 @@ class mod_arctic extends ModeleNumRefFicheinter * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 24f55192ff0..a313d9ddfb9 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -122,7 +122,7 @@ class mod_pacific extends ModeleNumRefFicheinter * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -158,7 +158,7 @@ class mod_pacific extends ModeleNumRefFicheinter * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index a0ab40ce7a0..ce447be2eac 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -48,7 +48,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -162,7 +162,7 @@ abstract class ModeleNumRefFicheinter * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index f53e55be6fd..033f70a0a4e 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -162,7 +162,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays * @param Object $objforref Holiday object * @return string Value if OK, 0 if KO */ - function holiday_get_num($fuser,$objforref) + function holiday_get_num($fuser, $objforref) { // phpcs:enable return $this->getNextValue($fuser,$objforref); diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index 7f1c48fec10..25cd09de38a 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -52,7 +52,7 @@ abstract class ModelePDFHoliday extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 6db495e9f04..797f9c86227 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -93,7 +93,7 @@ class ImportCsv extends ModeleImports * @param DoliDB $db Database handler * @param string $datatoimport String code describing import set (ex: 'societe_1') */ - function __construct($db,$datatoimport) + function __construct($db, $datatoimport) { global $conf, $langs; $this->db = $db; @@ -139,7 +139,7 @@ class ImportCsv extends ModeleImports * @param array $headerlinefields Array of fields name * @return string */ - function write_title_example($outputlangs,$headerlinefields) + function write_title_example($outputlangs, $headerlinefields) { // phpcs:enable $s=join($this->separator,array_map('cleansep',$headerlinefields)); @@ -154,7 +154,7 @@ class ImportCsv extends ModeleImports * @param array $contentlinevalues Array of lines * @return string */ - function write_record_example($outputlangs,$contentlinevalues) + function write_record_example($outputlangs, $contentlinevalues) { // phpcs:enable $s=join($this->separator,array_map('cleansep',$contentlinevalues)); @@ -319,7 +319,7 @@ class ImportCsv extends ModeleImports * @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor. * @return int <0 if KO, >0 if OK */ - function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys) + function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) { // phpcs:enable global $langs,$conf,$user; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d96dc18104f..beb6b66c479 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -95,7 +95,7 @@ class ImportXlsx extends ModeleImports * @param DoliDB $db Database handler * @param string $datatoimport String code describing import set (ex: 'societe_1') */ - function __construct($db,$datatoimport) + function __construct($db, $datatoimport) { global $conf,$langs; $this->db = $db; @@ -166,7 +166,7 @@ class ImportXlsx extends ModeleImports * @param array $headerlinefields Array of fields name * @return string */ - function write_title_example($outputlangs,$headerlinefields) + function write_title_example($outputlangs, $headerlinefields) { // phpcs:enable global $conf; @@ -192,7 +192,7 @@ class ImportXlsx extends ModeleImports * @param array $contentlinevalues Array of lines * @return string */ - function write_record_example($outputlangs,$contentlinevalues) + function write_record_example($outputlangs, $contentlinevalues) { // phpcs:enable $col = 0; @@ -346,7 +346,7 @@ class ImportXlsx extends ModeleImports * @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor. * @return int <0 if KO, >0 if OK */ - function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys) + function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) { // phpcs:enable global $langs,$conf,$user; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 4c606b8bacf..352d19dde8a 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -163,7 +163,7 @@ class ModeleImports * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable dol_syslog(get_class($this)."::liste_modeles"); diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 971913cb58d..5ab47b22528 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -186,7 +186,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; @@ -673,7 +673,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -913,7 +913,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 8df38cbc3a2..31e8d85c61d 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -125,7 +125,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -169,7 +169,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder * @param Object $object Object livraison * @return string Texte descriptif */ - function livraison_get_num($objsoc=0,$object='') + function livraison_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 76579f5e757..2f8d828f038 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -124,7 +124,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param Object $object Object delivery * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -152,7 +152,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param string $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } @@ -166,7 +166,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param Object $object Objet livraison * @return string Texte descripif */ - function livraison_get_num($objsoc=0,$object='') + function livraison_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php index 6dad7003ec5..a4c28799088 100644 --- a/htdocs/core/modules/livraison/modules_livraison.php +++ b/htdocs/core/modules/livraison/modules_livraison.php @@ -49,7 +49,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index bfd7f4b0d45..5700801c64f 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -60,7 +60,7 @@ class mailing_advthirdparties extends MailingTargets * @param array $contactid Array of contact id to add * @return int <0 if error, number of emails added if ok */ - function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid) + function add_to_target_spec($mailing_id, $socid, $type_of_target, $contactid) { // phpcs:enable global $conf, $langs; @@ -208,7 +208,7 @@ class mailing_advthirdparties extends MailingTargets * @param string $sql Not use here * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; @@ -287,7 +287,7 @@ class mailing_advthirdparties extends MailingTargets * @param string $type type * @return string Url link */ - function url($id,$type) + function url($id, $type) { if ($type=='thirdparty') { $companystatic=new Societe($this->db); diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 588d61faf5e..53bf5095598 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -91,7 +91,7 @@ class mailing_contacts1 extends MailingTargets * @param string $sql Requete sql de comptage * @return int */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index cd0a0ee9d5a..8feadc6b6e2 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -110,7 +110,7 @@ class mailing_example extends MailingTargets * @param string $sql Requete sql de comptage * @return int|string Number of recipient or '?' */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { // CHANGE THIS: Optionnal diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 151d828aa61..75b01098333 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -90,7 +90,7 @@ class mailing_fraise extends MailingTargets * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { $sql = "SELECT count(distinct(a.email)) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 91539359d6e..177a40d4827 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -88,7 +88,7 @@ class mailing_pomme extends MailingTargets * @param string $sql SQL request to use to count * @return int Number of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 5465b0af5c3..e6e5e021ab9 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -218,7 +218,7 @@ class mailing_thirdparties extends MailingTargets * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index fc57a364c9d..a82517859db 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -189,7 +189,7 @@ class mailing_thirdparties_services_expired extends MailingTargets * @param string $sql SQL request to use to count * @return int Number of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { $now=dol_now(); diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index a4caef12af8..ee94516a44c 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -76,7 +76,7 @@ class mailing_xinputfile extends MailingTargets * @param string $sql Sql request to count * @return string '' means NA */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { return ''; } diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index bcbf5d9a41b..a7448952f69 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -76,7 +76,7 @@ class mailing_xinputuser extends MailingTargets * @param string $sql Sql request to count * @return string '' means NA */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { return ''; } diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 524d1446427..e6c023823fd 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -42,7 +42,7 @@ class pdf_standard extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { // use this method in future refactoring } @@ -63,7 +63,7 @@ class pdf_standard extends CommonStickerGenerator * @param string $photo Photo (full path to image file used as replacement for key __PHOTOS__ into left, right, header or footer text) * @return void */ - function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$idmember=0,$photo='') + function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $idmember = 0, $photo = '') { // phpcs:enable global $db,$mysoc,$conf,$langs; @@ -248,7 +248,7 @@ class pdf_standard extends CommonStickerGenerator * @param int $nooutput 1=Generate only file on disk and do not return it on response * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs, $srctemplatepath, $mode='member', $nooutput=0) + function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0) { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php index 4f498d92158..7cbe8778f6e 100644 --- a/htdocs/core/modules/member/modules_cards.php +++ b/htdocs/core/modules/member/modules_cards.php @@ -48,7 +48,7 @@ class ModelePDFCards * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -76,7 +76,7 @@ class ModelePDFCards * @param string $template pdf generenate document class to use default 'standard' * @return int <0 if KO, >0 if OK */ -function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='', $template='standard') +function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir = '', $template = 'standard') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 6b5cb22d69a..006c529fc02 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -377,7 +377,7 @@ class modAdherent extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 45aedc11406..515ec4296b1 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -224,7 +224,7 @@ class modApi extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index dd61c75df2a..fc123cb3cd6 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -320,7 +320,7 @@ class modAsset extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 89a84f564b8..47f5a1b0519 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -210,7 +210,7 @@ class modBanque extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 9e66bc3f995..78282afae02 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -129,7 +129,7 @@ class modBarcode extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 2c422cb4ad6..b14f385ccba 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -162,7 +162,7 @@ class modBlockedLog extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf, $user; diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index 472abe53a42..ab1179fc61c 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -132,7 +132,7 @@ class modCashDesk extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index f0561757eae..11e7091a6e4 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -483,7 +483,7 @@ class modCategorie extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 5d1bdeada81..6a5791799ad 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -269,7 +269,7 @@ class modCommande extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index 2d0f81cf0cc..ff4c44aaff6 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -109,7 +109,7 @@ class modComptabilite extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index 2ed01afee83..f7a72f62c9a 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -212,7 +212,7 @@ class modContrat extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index bf0f3b1b189..627d7051b52 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -287,7 +287,7 @@ class modDav extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { //$this->_load_tables('/dav/sql/'); diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index e5c7146729f..8fe5dfd0a39 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -152,7 +152,7 @@ class modDeplacement extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php index a2ea9dea7c8..7fbfc8d1ea4 100644 --- a/htdocs/core/modules/modDocumentGeneration.class.php +++ b/htdocs/core/modules/modDocumentGeneration.class.php @@ -103,7 +103,7 @@ class modDocumentGeneration extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 325f6533f51..10665c91b93 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -151,7 +151,7 @@ class modDon extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 868e1760ded..8c23b5e26b8 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -284,7 +284,7 @@ class modEmailCollector extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { //$this->_load_tables('/dav/sql/'); diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 06cb8272ce0..a1166d46a07 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -315,7 +315,7 @@ class modExpedition extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index 62daf54a395..428134573a2 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -210,7 +210,7 @@ class modExpenseReport extends DolibarrModules * @param string $options Options * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modExternalRss.class.php b/htdocs/core/modules/modExternalRss.class.php index 8d1bf055673..2d85e5737eb 100644 --- a/htdocs/core/modules/modExternalRss.class.php +++ b/htdocs/core/modules/modExternalRss.class.php @@ -86,7 +86,7 @@ class modExternalRss extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; @@ -126,7 +126,7 @@ class modExternalRss extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function remove($options='') + function remove($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index b1b18da2508..f46c248d69a 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -208,7 +208,7 @@ class modFicheinter extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 16712d21ec2..41aa55eef83 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -623,7 +623,7 @@ class modFournisseur extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 5da8cf74e71..9c2559f1218 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -131,7 +131,7 @@ class modHRM extends DolibarrModules * @param string $options Enabling module ('', 'noboxes') * @return int if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 6dd268fc360..50756d2e1b4 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -100,7 +100,7 @@ class modLabel extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index 662ded1da21..2c098961cc1 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -156,7 +156,7 @@ class modLoan extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index 1f600cb9f12..5011d477b4c 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -149,7 +149,7 @@ class modMailing extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 21d5f81eb98..7f7f43893d8 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -89,7 +89,7 @@ class modNotification extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php index 086dac64bed..144734d0beb 100644 --- a/htdocs/core/modules/modOauth.class.php +++ b/htdocs/core/modules/modOauth.class.php @@ -130,7 +130,7 @@ class modOauth extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index be0b67950d7..7b6fa688192 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -173,7 +173,7 @@ class modOpenSurvey extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 2753c7e76ab..b2ac992eef7 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -146,7 +146,7 @@ class modPrelevement extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index e00df796409..917b8881d47 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -550,7 +550,7 @@ class modProduct extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $this->remove($options); diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 55a800bd366..1c5f08b55a4 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -114,7 +114,7 @@ class modProductBatch extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $db,$conf; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index fc18d1c7ec6..39de792b18c 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -310,7 +310,7 @@ class modProjet extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index cb2119e0146..d61720eda28 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -265,7 +265,7 @@ class modPropale extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index 0cb05499843..ced2dc491ad 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -130,7 +130,7 @@ class modReceiptPrinter extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; // Clean before activation diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index da1154d94ee..27df9b9a31a 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -243,7 +243,7 @@ class modReception extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 056b2c19785..9fe00cead73 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -166,7 +166,7 @@ class modSalaries extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 6e5f5562a77..9a8d19b1537 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -363,7 +363,7 @@ class modService extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $this->remove($options); diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index e8150348c0c..e77ecb20f0e 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -727,7 +727,7 @@ class modSociete extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf, $langs; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 4cdc5aabf83..e9d8a2f5129 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -358,7 +358,7 @@ class modStock extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php index 570680b163b..43d42d7b8c3 100644 --- a/htdocs/core/modules/modSupplierProposal.class.php +++ b/htdocs/core/modules/modSupplierProposal.class.php @@ -206,7 +206,7 @@ class modSupplierProposal extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index c47a66c3de2..a0981c490f9 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -285,7 +285,7 @@ class modTakePos extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { $this->_load_tables('/takepos/sql/'); diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index ee04d79ebcb..cacc1dd21dd 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -185,7 +185,7 @@ class modTax extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 40b7ff901b9..7d003fc2731 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -302,7 +302,7 @@ class modUser extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 01490278566..3ef181d1da6 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -145,7 +145,7 @@ class modWebsite extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index 771d718af70..cc72e8bc917 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -139,7 +139,7 @@ class modWorkflow extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index b7d88464355..9b542ac4742 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -122,7 +122,7 @@ class mod_payment_ant extends ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -151,7 +151,7 @@ class mod_payment_ant extends ModeleNumRefPayments * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 5869032cc5b..f412769edba 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -119,7 +119,7 @@ class mod_payment_cicada extends ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_payment_cicada extends ModeleNumRefPayments * @param string $objforref Object for number to search * @return string Next free value */ - function payment_get_num($objsoc,$objforref) + function payment_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/payment/modules_payment.php b/htdocs/core/modules/payment/modules_payment.php index d9cf9b1260f..0773204a1c8 100644 --- a/htdocs/core/modules/payment/modules_payment.php +++ b/htdocs/core/modules/payment/modules_payment.php @@ -79,7 +79,7 @@ abstract class ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index afd46919598..dbe3a45bad1 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -59,7 +59,7 @@ class PrintingDriver * @param integer $maxfilenamelength Max length of value to show * @return array List of drivers */ - static function listDrivers($db,$maxfilenamelength=0) + static function listDrivers($db, $maxfilenamelength = 0) { global $conf; diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 089fb95ba69..d1deb37e3b3 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -299,7 +299,7 @@ class printing_printgcp extends PrintingDriver * @param string $subdir subdir for file * @return int 0 if OK, >0 if KO */ - public function printFile($file, $module, $subdir='') + public function printFile($file, $module, $subdir = '') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index ab65f8fba3d..ddf07afe71c 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -87,7 +87,7 @@ class printing_printipp extends PrintingDriver * * @return int 0 if OK, >0 if KO */ - public function printFile($file, $module, $subdir='') + public function printFile($file, $module, $subdir = '') { global $conf, $user; $error = 0; diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 0047dda7669..ad848427c4d 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -41,7 +41,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { // use this method in future refactoring } @@ -61,7 +61,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) * @return void */ - function Add_PDF_label(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='') + function Add_PDF_label(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $photo = '') { // phpcs:enable global $mysoc, $conf, $langs; @@ -238,7 +238,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param string $filename Short file name of PDF output file * @return int 1=OK, 0=KO */ - function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf') + function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index de1aa1b5d5e..a83d490b7be 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -96,7 +96,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { global $mysoc,$conf; @@ -277,7 +277,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator * @param string $filename Short file name of PDF output file * @return int 1=OK, 0=KO */ - function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf') + function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index 7a34d5e7e64..653c9db4d6c 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -48,7 +48,7 @@ class ModelePDFLabels * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -77,7 +77,7 @@ class ModelePDFLabels * @param string $filename Short file name of PDF output file * @return int <0 if KO, >0 if OK */ -function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='', $template='standardlabel', $filename='tmp_address_sheet.pdf') +function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir = '', $template = 'standardlabel', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index dd2527338a4..8ae2fe0eb9a 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -217,7 +217,7 @@ class doc_generic_product_odt extends ModelePDFProduct * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $product,$langs,$conf,$mysoc,$hookmanager,$user; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index e9af5b9aa6e..7da2295290f 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -160,7 +160,7 @@ class pdf_standard extends ModelePDFProduct * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -603,7 +603,7 @@ class pdf_standard extends ModelePDFProduct * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -713,7 +713,7 @@ class pdf_standard extends ModelePDFProduct * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$hookmanager; @@ -862,7 +862,7 @@ class pdf_standard extends ModelePDFProduct * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 1b455743cb2..697add2fccb 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -138,7 +138,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objproduct=0,$type=-1) + function getExample($langs, $objproduct = 0, $type = -1) { if ($type == 0 || $type == -1) { @@ -179,7 +179,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * @param int $type Produit ou service (0:product, 1:service) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $db,$conf; diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 815e383d900..a8123c702e9 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -100,7 +100,7 @@ class mod_codeproduct_leopard extends ModeleProductCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return next value */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $langs; return ''; diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 10470d4d9f0..5c5f2428464 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -47,7 +47,7 @@ abstract class ModelePDFProduct extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -118,7 +118,7 @@ abstract class ModeleProductCode * @param int $type Type * @return string Value */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -149,7 +149,7 @@ abstract class ModeleProductCode * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable $liste=array(); @@ -182,7 +182,7 @@ abstract class ModeleProductCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$product,$type) + function getToolTip($langs, $product, $type) { global $conf; diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index 0a2076e4ed0..5708033a8ea 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 6292008c54d..25f716f44cd 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -126,7 +126,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -164,7 +164,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasks(Task $task,$outputlangs) + function get_substitutionarray_tasks(Task $task, $outputlangs) { // phpcs:enable global $conf; @@ -205,7 +205,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_contacts($contact,$outputlangs) + function get_substitutionarray_project_contacts($contact, $outputlangs) { // phpcs:enable global $conf; @@ -263,7 +263,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_file($file,$outputlangs) + function get_substitutionarray_project_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -283,7 +283,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_reference($refdetail,$outputlangs) + function get_substitutionarray_project_reference($refdetail, $outputlangs) { // phpcs:enable global $conf; @@ -307,7 +307,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasksressource($taskressource,$outputlangs) + function get_substitutionarray_tasksressource($taskressource, $outputlangs) { // phpcs:enable global $conf; @@ -331,7 +331,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_taskstime($tasktime,$outputlangs) + function get_substitutionarray_taskstime($tasktime, $outputlangs) { // phpcs:enable global $conf; @@ -360,7 +360,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_task_file($file,$outputlangs) + function get_substitutionarray_task_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -471,7 +471,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param string $srctemplatepath Full path of source filename for generator using a template file * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath) + function write_file($object, $outputlangs, $srctemplatepath) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index f0161b30715..ac941af86be 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -528,7 +528,7 @@ class pdf_baleine extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -668,7 +668,7 @@ class pdf_baleine extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index bc8da2b114c..32a2d10f72d 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -122,7 +122,7 @@ class pdf_beluga extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -680,7 +680,7 @@ class pdf_beluga extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -796,7 +796,7 @@ class pdf_beluga extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index a299a9758c7..a0d15c0fc72 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -105,7 +105,7 @@ class pdf_timespent extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -459,7 +459,7 @@ class pdf_timespent extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -599,7 +599,7 @@ class pdf_timespent extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index e5f5c268f06..1e46321818c 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -167,7 +167,7 @@ class mod_project_simple extends ModeleNumRefProjects * @param Project $project Object project * @return string Next not used reference */ - function project_get_num($objsoc=0, $project='') + function project_get_num($objsoc = 0, $project = '') { // phpcs:enable return $this->getNextValue($objsoc, $project); diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index e052dbcc7bd..64fe6487540 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -153,7 +153,7 @@ class mod_project_universal extends ModeleNumRefProjects * @param Project $project Object project * @return string Next not used reference */ - function project_get_num($objsoc=0, $project='') + function project_get_num($objsoc = 0, $project = '') { // phpcs:enable return $this->getNextValue($objsoc, $project); diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index af9877d59cb..d78b34faaa9 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -45,7 +45,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index c8c588d1f4f..19fdfbac08d 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -127,7 +127,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -171,7 +171,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasks($task,$outputlangs) + function get_substitutionarray_tasks($task, $outputlangs) { // phpcs:enable global $conf; @@ -202,7 +202,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_contacts($contact,$outputlangs) + function get_substitutionarray_project_contacts($contact, $outputlangs) { // phpcs:enable global $conf; @@ -227,7 +227,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_file($file,$outputlangs) + function get_substitutionarray_project_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -247,7 +247,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_reference($refdetail,$outputlangs) + function get_substitutionarray_project_reference($refdetail, $outputlangs) { // phpcs:enable global $conf; @@ -271,7 +271,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasksressource($taskressource,$outputlangs) + function get_substitutionarray_tasksressource($taskressource, $outputlangs) { // phpcs:enable global $conf; @@ -295,7 +295,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_taskstime($tasktime,$outputlangs) + function get_substitutionarray_taskstime($tasktime, $outputlangs) { // phpcs:enable global $conf; @@ -320,7 +320,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_task_file($file,$outputlangs) + function get_substitutionarray_task_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -431,7 +431,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param string $srctemplatepath Full path of source filename for generator using a template file * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath) + function write_file($object, $outputlangs, $srctemplatepath) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 4450c57347d..4b8796ca5d0 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -123,7 +123,7 @@ class mod_task_simple extends ModeleNumRefTask * @param Task $object Object Task * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -167,7 +167,7 @@ class mod_task_simple extends ModeleNumRefTask * @param Task $object Object task * @return string Next not used reference */ - function task_get_num($objsoc=0,$object='') + function task_get_num($objsoc = 0, $object = '') { return $this->getNextValue($objsoc,$object); } diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 3272d180c50..785442edfb8 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -123,7 +123,7 @@ class mod_task_universal extends ModeleNumRefTask * @param Task $object Object task * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -153,7 +153,7 @@ class mod_task_universal extends ModeleNumRefTask * @param Task $object Object task * @return string Next not used reference */ - function project_get_num($objsoc=0,$object='') + function project_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc, $object); diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index ef7a9be4e98..0d1c36bbfe6 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -46,7 +46,7 @@ abstract class ModelePDFTask extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 18f6d9b6102..cfb1b87388f 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -233,7 +233,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 3d7b5b44c34..4f7bedef51b 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -214,7 +214,7 @@ class pdf_azur extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1318,7 +1318,7 @@ class pdf_azur extends ModelePDFPropales * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1660,7 +1660,7 @@ class pdf_azur extends ModelePDFPropales * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index a99f75d99ed..b38dbf83740 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -130,7 +130,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1352,7 +1352,7 @@ class pdf_cyan extends ModelePDFPropales * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1644,7 +1644,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1697,7 +1697,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hideref Do not show ref * @return null */ - function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index cb1638aec82..68b9c1e71de 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -124,7 +124,7 @@ class mod_propale_marbre extends ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Next value */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $db,$conf; @@ -165,7 +165,7 @@ class mod_propale_marbre extends ModeleNumRefPropales * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 87fcc7c2920..5a47fad4127 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -128,7 +128,7 @@ class mod_propale_saphir extends ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $db,$conf; diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 595534c40f4..1d820062ac3 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -50,7 +50,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Valeur */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 7f6fd99bd67..e9b616cb0e2 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -185,7 +185,7 @@ class doc_generic_reception_odt extends ModelePdfReception * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 592171ed6f0..f6a7277469b 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -40,7 +40,7 @@ class pdf_squille extends ModelePdfReception * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -110,7 +110,7 @@ class pdf_squille extends ModelePdfReception * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$hookmanager; @@ -702,7 +702,7 @@ class pdf_squille extends ModelePdfReception * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -1032,7 +1032,7 @@ class pdf_squille extends ModelePdfReception * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/reception/mod_reception_beryl.php b/htdocs/core/modules/reception/mod_reception_beryl.php index f4cdadea9d2..071c7f732c3 100644 --- a/htdocs/core/modules/reception/mod_reception_beryl.php +++ b/htdocs/core/modules/reception/mod_reception_beryl.php @@ -97,7 +97,7 @@ class mod_reception_beryl extends ModelNumRefReception * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -138,7 +138,7 @@ class mod_reception_beryl extends ModelNumRefReception * @param Object $objforref Shipment object * @return string Next free value */ - function reception_get_num($objsoc,$objforref) + function reception_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index bea6887d99e..ae4c4b42b48 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -100,7 +100,7 @@ class mod_reception_moonstone extends ModelNumRefReception * @param Object $reception Reception object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$reception) + function getNextValue($objsoc, $reception) { global $db,$conf; @@ -129,7 +129,7 @@ class mod_reception_moonstone extends ModelNumRefReception * @param Object $objforref Reception object * @return string Next free value */ - function reception_get_num($objsoc,$objforref) + function reception_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/reception/modules_reception.php b/htdocs/core/modules/reception/modules_reception.php index 57965e1b462..9f0e8e8a58d 100644 --- a/htdocs/core/modules/reception/modules_reception.php +++ b/htdocs/core/modules/reception/modules_reception.php @@ -40,7 +40,7 @@ abstract class ModelePdfReception extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 3650af12b24..a67429c0376 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -186,7 +186,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index e0d6a186879..c047e6f3661 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -139,7 +139,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { if ($type == 0 || $type == -1) { @@ -200,7 +200,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type Client ou fournisseur (0:customer, 1:supplier) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $db,$conf; @@ -324,7 +324,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type 0 = customer/prospect , 1 = supplier * @return int 0 if available, <0 if KO */ - function verif_dispo($db, $code, $soc, $type=0) + function verif_dispo($db, $code, $soc, $type = 0) { // phpcs:enable $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 9bdd27d5bee..929ad0a8a88 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -99,7 +99,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return next value */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $langs; return ''; diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 77bb7c54a64..d64b6667bf8 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -103,7 +103,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { return $this->prefixcustomer.'0901-00001<br>'.$this->prefixsupplier.'0901-00001'; } @@ -116,7 +116,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type Client ou fournisseur (1:client, 2:fournisseur) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $db, $conf, $mc; @@ -234,7 +234,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type 0 = customer/prospect , 1 = supplier * @return int 0 if available, <0 if KO */ - function verif_dispo($db, $code, $soc, $type=0) + function verif_dispo($db, $code, $soc, $type = 0) { // phpcs:enable global $conf, $mc; diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index b117c948d69..759b71bd2e8 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -112,7 +112,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { $s=''; $s.=$this->prefixcustomeraccountancycode.'CUSTCODE'; @@ -131,7 +131,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode * @param string $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index c1e83b75db4..65cbba944b1 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -76,7 +76,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { return ''; } @@ -90,7 +90,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode * @param int $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable $this->code=''; diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index a38acbc002a..6ce43cd6e0d 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -46,7 +46,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -122,7 +122,7 @@ abstract class ModeleThirdPartyCode * @param int $type Type * @return string Value */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -153,7 +153,7 @@ abstract class ModeleThirdPartyCode * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable $liste=array(); @@ -186,7 +186,7 @@ abstract class ModeleThirdPartyCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf; @@ -289,7 +289,7 @@ abstract class ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { $langs->load("bills"); return $langs->trans("NoExample"); @@ -329,7 +329,7 @@ abstract class ModeleAccountancyCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf,$db; @@ -367,7 +367,7 @@ abstract class ModeleAccountancyCode * @param int $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable global $langs; @@ -394,7 +394,7 @@ abstract class ModeleAccountancyCode * @deprecated Use the new function generateDocument of Facture class * @see Societe::generateDocument() */ -function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index c9c4350e050..b4fb70c735e 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -217,7 +217,7 @@ class doc_generic_stock_odt extends ModelePDFStock * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $stock,$langs,$conf,$mysoc,$hookmanager,$user; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index ce01124211a..db1fda75219 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -189,7 +189,7 @@ class pdf_standard extends ModelePDFStock * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -839,7 +839,7 @@ class pdf_standard extends ModelePDFStock * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -943,7 +943,7 @@ class pdf_standard extends ModelePDFStock * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$db,$hookmanager; @@ -1171,7 +1171,7 @@ class pdf_standard extends ModelePDFStock * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 3ea7e184e35..8f139fa2a7d 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -192,7 +192,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -818,7 +818,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -944,7 +944,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$db,$hookmanager; @@ -1172,7 +1172,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/stock/modules_movement.php b/htdocs/core/modules/stock/modules_movement.php index 33672e415ea..e3aab8076ac 100644 --- a/htdocs/core/modules/stock/modules_movement.php +++ b/htdocs/core/modules/stock/modules_movement.php @@ -44,7 +44,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index a74df6198ce..5e5e1546e17 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -37,7 +37,7 @@ abstract class ModelePDFStock extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 908b3c8ba41..1edc3e46024 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -170,7 +170,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode='next') + function getNextValue($objsoc, $object, $mode = 'next') { global $db,$conf; @@ -243,7 +243,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index a3cb291263a..520b2f2ca64 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -153,7 +153,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode='next') + function getNextValue($objsoc, $object, $mode = 'next') { global $db,$conf; @@ -192,7 +192,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index d1b28ebd0bd..593d4f9d51a 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -48,7 +48,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -120,7 +120,7 @@ abstract class ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode) + function getNextValue($objsoc, $object, $mode) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index f44240daa83..c15ea6e5a0b 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -195,7 +195,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; @@ -827,7 +827,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1242,7 +1242,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 4b599a1f769..526e75aae6e 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -132,7 +132,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -171,7 +171,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Texte descripif */ - function commande_get_num($objsoc=0,$object='') + function commande_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 3c8af4cd5a0..906a36f1be6 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -125,7 +125,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -154,7 +154,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Texte descripif */ - function commande_get_num($objsoc=0,$object='') + function commande_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 7a6c7d4972d..e97ca664997 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -51,7 +51,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 06cf28daaed..d4c548b5dc8 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -209,7 +209,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; @@ -1012,7 +1012,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1366,7 +1366,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 5eeedb9dcfc..42a454a5941 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; @@ -585,7 +585,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf,$mysoc; @@ -805,7 +805,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 216bc4bde90..36aaab7da90 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -122,7 +122,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -151,7 +151,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 0d64991065a..9c3f65efb62 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -119,7 +119,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments * @param string $objforref Object for number to search * @return string Next free value */ - function payment_get_num($objsoc,$objforref) + function payment_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php index 8eb706dc0ce..29d248e1c84 100644 --- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php +++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php @@ -36,7 +36,7 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -114,7 +114,7 @@ abstract class ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 05bfe535ac7..0560d68e3aa 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -233,7 +233,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index b9f9aa39dcf..ee40b86377e 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -205,7 +205,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1169,7 +1169,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1495,7 +1495,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 847eb49958d..622cde25813 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -124,7 +124,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal * @param Propal $supplier_proposal Object commercial proposal * @return string Next value */ - function getNextValue($objsoc,$supplier_proposal) + function getNextValue($objsoc, $supplier_proposal) { global $db,$conf; @@ -165,7 +165,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index fdbd9f1f90d..e59843dfb58 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -125,7 +125,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal * @param Propal $supplier_proposal Object supplier_proposal * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$supplier_proposal) + function getNextValue($objsoc, $supplier_proposal) { global $db,$conf; diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php index b96dc2c4e12..9377f39033a 100644 --- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php +++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php @@ -50,7 +50,7 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefSupplierProposal * @param Propal $propal Object commercial proposal * @return string Valeur */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index df33a697d59..2c8045edf9a 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -102,7 +102,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface * @param string $suffixinfilename When output is a file, append this suffix into default log filename. * @return string */ - private function getFilename($suffixinfilename='') + private function getFilename($suffixinfilename = '') { global $conf; @@ -131,7 +131,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface * @param string $suffixinfilename When output is a file, append this suffix into default log filename. * @return void */ - public function export($content, $suffixinfilename='') + public function export($content, $suffixinfilename = '') { global $conf, $dolibarr_main_prod; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 28eaf77d30b..4a57a1e12cc 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -216,7 +216,7 @@ class doc_generic_user_odt extends ModelePDFUser * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; @@ -449,7 +449,7 @@ class doc_generic_user_odt extends ModelePDFUser * @param string $array_key key for array * @return array array of substitutions */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable $array_other = array(); diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php index 3dc46707543..34356cf830f 100644 --- a/htdocs/core/modules/user/modules_user.class.php +++ b/htdocs/core/modules/user/modules_user.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFUser extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index a00bec92c96..5e1418f8ed2 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -218,7 +218,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/core/modules/usergroup/modules_usergroup.class.php b/htdocs/core/modules/usergroup/modules_usergroup.class.php index fc9648ab6e9..2bd717624d7 100644 --- a/htdocs/core/modules/usergroup/modules_usergroup.class.php +++ b/htdocs/core/modules/usergroup/modules_usergroup.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFUserGroup extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f619befab0d..47383166e97 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -121,7 +121,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -406,7 +406,7 @@ class Cronjob extends CommonObject * @param int $processing Processing or not * @return int <0 if KO, >0 if OK */ - function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1) + function fetch_all($sortorder = 'DESC', $sortfield = 't.rowid', $limit = 0, $offset = 0, $status = 1, $filter = '', $processing = -1) { // phpcs:enable global $langs; @@ -541,7 +541,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -691,7 +691,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { $error=0; @@ -852,7 +852,7 @@ class Cronjob extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1301,7 +1301,7 @@ class Cronjob extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode, $this->processing); } @@ -1315,7 +1315,7 @@ class Cronjob extends CommonObject * @param int $processing 0=Not running, 1=Running * @return string Label of status */ - function LibStatut($status, $mode=0, $processing=0) + function LibStatut($status, $mode = 0, $processing = 0) { // phpcs:enable global $langs; diff --git a/htdocs/dav/dav.class.php b/htdocs/dav/dav.class.php index b8c38773538..a577f2a7cac 100644 --- a/htdocs/dav/dav.class.php +++ b/htdocs/dav/dav.class.php @@ -56,7 +56,7 @@ class CdavLib * @param int|boolean $ouri Ouri * @return string */ - public function getSqlCalEvents($calid, $oid=false, $ouri=false) + public function getSqlCalEvents($calid, $oid = false, $ouri = false) { // TODO : replace GROUP_CONCAT by $sql = 'SELECT diff --git a/htdocs/don/class/api_donations.class.php b/htdocs/don/class/api_donations.class.php index 8d13dd2d68b..982567f269e 100644 --- a/htdocs/don/class/api_donations.class.php +++ b/htdocs/don/class/api_donations.class.php @@ -307,7 +307,7 @@ class Donations extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..4ce4fd24ff8 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -109,7 +109,7 @@ class Don extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -122,7 +122,7 @@ class Don extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable if (empty($this->labelstatut) || empty($this->labelstatutshort)) @@ -251,7 +251,7 @@ class Don extends CommonObject * @param int $minimum Minimum * @return int 0 if KO, >0 if OK */ - function check($minimum=0) + function check($minimum = 0) { global $langs; $langs->load('main'); @@ -344,7 +344,7 @@ class Don extends CommonObject * @return int <0 if KO, id of created donation if OK * TODO add numbering module for Ref */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -465,7 +465,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int >0 if OK, <0 if KO */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $langs, $conf; @@ -556,7 +556,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if not possible, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $user, $conf, $langs; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; @@ -631,7 +631,7 @@ class Don extends CommonObject * @param string $ref Ref of donation to load * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -718,7 +718,7 @@ class Don extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { return $this->valid_promesse($this->id, $user->id, $notrigger); } @@ -732,7 +732,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function valid_promesse($id, $userid, $notrigger=0) + function valid_promesse($id, $userid, $notrigger = 0) { // phpcs:enable global $langs, $user; @@ -783,7 +783,7 @@ class Don extends CommonObject * @param int $modepayment mode of payment * @return int <0 if KO, >0 if OK */ - function set_paid($id, $modepayment=0) + function set_paid($id, $modepayment = 0) { // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; @@ -915,7 +915,7 @@ class Don extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $notooltip=0) + function getNomUrl($withpicto = 0, $notooltip = 0) { global $langs; @@ -989,7 +989,7 @@ class Don extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php index e5e34f6ad1b..bcf4b4a9d59 100644 --- a/htdocs/don/class/donstats.class.php +++ b/htdocs/don/class/donstats.class.php @@ -55,7 +55,7 @@ class DonationStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -83,7 +83,7 @@ class DonationStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 662b165ddf4..ba322f9fe08 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -101,7 +101,7 @@ class PaymentDonation extends CommonObject * @param bool $notrigger false=launch triggers after, true=disable triggers * @return int <0 if KO, id of payment if OK */ - function create($user, $notrigger=false) + function create($user, $notrigger = false) { global $conf, $langs; @@ -264,7 +264,7 @@ class PaymentDonation extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -344,7 +344,7 @@ class PaymentDonation extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -467,7 +467,7 @@ class PaymentDonation extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } @@ -480,7 +480,7 @@ class PaymentDonation extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -526,7 +526,7 @@ class PaymentDonation extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $conf; @@ -629,7 +629,7 @@ class PaymentDonation extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3d1ecac9088..e689dde3142 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -230,7 +230,7 @@ class EcmDirectory // extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -375,7 +375,7 @@ class EcmDirectory // extends CommonObject * @param int $deletedirrecursive 1=Agree to delete content recursiveley (otherwise an error will be returned when trying to delete) * @return int <0 if KO, >0 if OK */ - function delete($user, $mode='all', $deletedirrecursive=0) + function delete($user, $mode = 'all', $deletedirrecursive = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -468,7 +468,7 @@ class EcmDirectory // extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $more='', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $notooltip = 0) { global $langs; @@ -501,7 +501,7 @@ class EcmDirectory // extends CommonObject * @param int $force Force reload of full arbo even if already loaded * @return string Relative physical path */ - function getRelativePath($force=0) + function getRelativePath($force = 0) { $this->get_full_arbo($force); @@ -579,7 +579,7 @@ class EcmDirectory // extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -592,7 +592,7 @@ class EcmDirectory // extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -620,7 +620,7 @@ class EcmDirectory // extends CommonObject * @param int $force Force reload of full arbo even if already loaded in cache $this->cats * @return array Tableau de array */ - function get_full_arbo($force=0) + function get_full_arbo($force = 0) { // phpcs:enable global $conf; @@ -710,7 +710,7 @@ class EcmDirectory // extends CommonObject * @param int $protection Deep counter to avoid infinite loop * @return void */ - function build_path_from_id_categ($id_categ,$protection=0) + function build_path_from_id_categ($id_categ, $protection = 0) { // phpcs:enable // Define fullpath @@ -750,7 +750,7 @@ class EcmDirectory // extends CommonObject * @param int $all 0=refresh record using this->id , 1=refresh record using this->entity * @return int -1 if KO, Nb of files in directory if OK */ - function refreshcachenboffile($all=0) + function refreshcachenboffile($all = 0) { global $conf; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index efc5af1310c..59084b1fb19 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -318,7 +318,7 @@ class EcmFiles extends CommonObject * @param string $src_object_id src_object_id to search * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref = '', $relativepath = '', $hashoffile='', $hashforshare='', $src_object_type='', $src_object_id=0) + public function fetch($id, $ref = '', $relativepath = '', $hashoffile = '', $hashforshare = '', $src_object_type = '', $src_object_id = 0) { global $conf; @@ -443,7 +443,7 @@ class EcmFiles extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -766,7 +766,7 @@ class EcmFiles extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -815,7 +815,7 @@ class EcmFiles extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -828,7 +828,7 @@ class EcmFiles extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index b6000cad923..698ddd57bfe 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -57,7 +57,7 @@ class FormEcm * @param string $module Module ('ecm', 'medias', ...) * @return string String with HTML select */ - function selectAllSections($selected=0, $select_name='', $module='ecm') + function selectAllSections($selected = 0, $select_name = '', $module = 'ecm') { global $conf, $langs; $langs->load("ecm"); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index e00adfad724..80737c4c9e5 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -407,7 +407,7 @@ class EmailCollector extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -482,7 +482,7 @@ class EmailCollector extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -495,7 +495,7 @@ class EmailCollector extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) @@ -979,7 +979,7 @@ class EmailCollector extends CommonObject * @param string $prefix prefix * @return array Array with number and object */ - function createPartArray($structure, $prefix="") + function createPartArray($structure, $prefix = "") { //print_r($structure); if (count($structure->parts) > 0) { // There some sub parts diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index ccf811f7607..dd2c781e702 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -321,7 +321,7 @@ class EmailCollectorAction extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -392,7 +392,7 @@ class EmailCollectorAction extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -405,7 +405,7 @@ class EmailCollectorAction extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index cafde3a820c..61e65245630 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -296,7 +296,7 @@ class EmailCollectorFilter extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -367,7 +367,7 @@ class EmailCollectorFilter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -380,7 +380,7 @@ class EmailCollectorFilter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 834c0bf2bda..b217c19e97f 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -493,7 +493,7 @@ class Shipments extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->expedition->creer) { throw new RestException(401); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 48e84cf1cc4..b8e3f9929f3 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -264,7 +264,7 @@ class Expedition extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si erreur, id expedition creee si ok */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $hookmanager; @@ -444,7 +444,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, line_id if OK */ - function create_line($entrepot_id, $origin_line_id, $qty,$array_options=0) + function create_line($entrepot_id, $origin_line_id, $qty, $array_options = 0) { //phpcs:enable $expeditionline = new ExpeditionLigne($this->db); @@ -470,7 +470,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function create_line_batch($line_ext,$array_options=0) + function create_line_batch($line_ext, $array_options = 0) { // phpcs:enable $error = 0; @@ -520,7 +520,7 @@ class Expedition extends CommonObject * @param string $ref_int Internal reference of other object * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { global $conf; @@ -646,7 +646,7 @@ class Expedition extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if OK, >0 if KO */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { global $conf, $langs; @@ -908,7 +908,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function addline($entrepot_id, $id, $qty,$array_options=0) + function addline($entrepot_id, $id, $qty, $array_options = 0) { global $conf, $langs; @@ -979,7 +979,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function addline_batch($dbatch,$array_options=0) + function addline_batch($dbatch, $array_options = 0) { // phpcs:enable global $conf,$langs; @@ -1048,7 +1048,7 @@ class Expedition extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf; $error=0; @@ -1593,7 +1593,7 @@ class Expedition extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $langs; @@ -1643,7 +1643,7 @@ class Expedition extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1656,7 +1656,7 @@ class Expedition extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1843,7 +1843,7 @@ class Expedition extends CommonObject * @param id $id only this carrier, all if none * @return void */ - function list_delivery_methods($id='') + function list_delivery_methods($id = '') { // phpcs:enable global $langs; @@ -1880,7 +1880,7 @@ class Expedition extends CommonObject * * @return void */ - function update_delivery_method($id='') + function update_delivery_method($id = '') { // phpcs:enable if ($id=='') @@ -1943,7 +1943,7 @@ class Expedition extends CommonObject * @param string $value Value * @return void */ - function getUrlTrackingStatus($value='') + function getUrlTrackingStatus($value = '') { if (! empty($this->shipping_method_id)) { @@ -2304,7 +2304,7 @@ class Expedition extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0,$moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2549,7 +2549,7 @@ class ExpeditionLigne extends CommonObjectLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, line id >0 if OK */ - function insert($user=null, $notrigger=0) + function insert($user = null, $notrigger = 0) { global $langs, $conf; diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 850e4c0dda3..e15e766c439 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -155,7 +155,7 @@ class ExpeditionLineBatch extends CommonObject * @param int $id_expedition rowid of shipment * @return int -1 if KO, 1 if OK */ - static function deletefromexp($db,$id_expedition) + static function deletefromexp($db, $id_expedition) { $id_expedition = (int) $id_expedition; @@ -181,7 +181,7 @@ class ExpeditionLineBatch extends CommonObject * @param int $fk_product If provided, load also detailed information of lot * @return int|array -1 if KO, array of ExpeditionLineBatch if OK */ - static function fetchAll($db, $id_line_expdet, $fk_product=0) + static function fetchAll($db, $id_line_expdet, $fk_product = 0) { $sql="SELECT"; $sql.= " eb.rowid,"; diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 26f7bda7a2a..dd18cdb4019 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -55,7 +55,7 @@ class ExpeditionStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -88,7 +88,7 @@ class ExpeditionStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 3b93cd0c0ff..de310fe0516 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -158,7 +158,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -377,7 +377,7 @@ class ExpenseReport extends CommonObject * @param User $userofexpensereport New user we want to have the expense report on. * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger = 0, $userofexpensereport=null) + function update($user, $notrigger = 0, $userofexpensereport = null) { global $langs; @@ -447,7 +447,7 @@ class ExpenseReport extends CommonObject * @param string $ref Ref {@name ref} * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -613,7 +613,7 @@ class ExpenseReport extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -626,7 +626,7 @@ class ExpenseReport extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -801,7 +801,7 @@ class ExpenseReport extends CommonObject * @param User $user User * @return int <0 if KO, >0 if OK */ - function fetch_line_by_project($projectid,$user='') + function fetch_line_by_project($projectid, $user = '') { // phpcs:enable global $conf,$db,$langs; @@ -1038,7 +1038,7 @@ class ExpenseReport extends CommonObject * @param User $fuser User that delete * @return int <0 if KO, >0 if OK */ - function delete(User $fuser=null) + function delete(User $fuser = null) { global $user,$langs,$conf; @@ -1078,7 +1078,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function setValidate($fuser, $notrigger=0) + function setValidate($fuser, $notrigger = 0) { global $conf,$langs,$user; @@ -1249,7 +1249,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function setApproved($fuser, $notrigger=0) + function setApproved($fuser, $notrigger = 0) { $now=dol_now(); $error = 0; @@ -1312,7 +1312,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int */ - function setDeny($fuser,$details,$notrigger=0) + function setDeny($fuser, $details, $notrigger = 0) { $now = dol_now(); $error = 0; @@ -1439,7 +1439,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function set_cancel($fuser,$detail, $notrigger=0) + function set_cancel($fuser, $detail, $notrigger = 0) { // phpcs:enable $error = 0; @@ -1559,7 +1559,7 @@ class ExpenseReport extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $max=0, $short=0, $moretitle='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -1623,7 +1623,7 @@ class ExpenseReport extends CommonObject * @param string $ligne_total_tva Amount of all taxes * @return void */ - function update_totaux_add($ligne_total_ht,$ligne_total_tva) + function update_totaux_add($ligne_total_ht, $ligne_total_tva) { // phpcs:enable $this->total_ht = $this->total_ht + $ligne_total_ht; @@ -1653,7 +1653,7 @@ class ExpenseReport extends CommonObject * @param string $ligne_total_tva Amount of all taxes * @return void */ - function update_totaux_del($ligne_total_ht,$ligne_total_tva) + function update_totaux_del($ligne_total_ht, $ligne_total_tva) { // phpcs:enable $this->total_ht = $this->total_ht - $ligne_total_ht; @@ -1689,7 +1689,7 @@ class ExpenseReport extends CommonObject * @param int $type Type line * @return int <0 if KO, >0 if OK */ - function addline($qty=0, $up=0, $fk_c_type_fees=0, $vatrate=0, $date='', $comments='', $fk_project=0, $fk_c_exp_tax_cat=0, $type=0) + function addline($qty = 0, $up = 0, $fk_c_type_fees = 0, $vatrate = 0, $date = '', $comments = '', $fk_project = 0, $fk_c_exp_tax_cat = 0, $type = 0) { global $conf,$langs,$mysoc; @@ -1783,7 +1783,7 @@ class ExpenseReport extends CommonObject * @param string $seller seller, but actually he is unknown * @return true or false */ - function checkRules($type=0, $seller='') + function checkRules($type = 0, $seller = '') { global $user,$conf,$db,$langs; @@ -1939,7 +1939,7 @@ class ExpenseReport extends CommonObject * @param int $fk_c_exp_tax_cat id of category of car * @return int <0 if KO, >0 if OK */ - function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat=0) + function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat = 0) { global $user, $mysoc; @@ -2046,7 +2046,7 @@ class ExpenseReport extends CommonObject * @param User $fuser User * @return int <0 if KO, >0 if OK */ - function deleteline($rowid, $fuser='') + function deleteline($rowid, $fuser = '') { $this->db->begin(); @@ -2179,7 +2179,7 @@ class ExpenseReport extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2207,7 +2207,7 @@ class ExpenseReport extends CommonObject * @param int $active Active or not * @return array */ - function listOfTypes($active=1) + function listOfTypes($active = 1) { global $langs; $ret=array(); @@ -2278,7 +2278,7 @@ class ExpenseReport extends CommonObject * @param string $option 'topay' or 'toapprove' * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user, $option='topay') + function load_board($user, $option = 'topay') { // phpcs:enable global $conf, $langs; @@ -2557,7 +2557,7 @@ class ExpenseReportLine * @param bool $fromaddline false=keep default behavior, true=exclude the update_price() of parent object * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0,$fromaddline=false) + function insert($notrigger = 0, $fromaddline = false) { global $langs,$user,$conf; @@ -2638,7 +2638,7 @@ class ExpenseReportLine * @param string $mode day|EX_DAY / month|EX_MON / year|EX_YEA to get amount * @return amount */ - public function getExpAmount(ExpenseReportRule $rule, $fk_user, $mode='day') + public function getExpAmount(ExpenseReportRule $rule, $fk_user, $mode = 'day') { $amount = 0; @@ -2769,7 +2769,7 @@ class ExpenseReportLine * @param int $useshortlabel Use short labels * @return string HTML select with status */ -function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempty=1, $useshortlabel=0) +function select_expensereport_statut($selected = '', $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0) { // phpcs:enable global $db, $langs; @@ -2806,7 +2806,7 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt * @param int $active 1=Active only, 0=Unactive only, -1=All * @return string Select html */ -function select_type_fees_id($selected='',$htmlname='type',$showempty=0, $active=1) +function select_type_fees_id($selected = '', $htmlname = 'type', $showempty = 0, $active = 1) { // phpcs:enable global $db,$langs,$user; diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 9eaa8970a5b..70bc3fd6c26 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -102,7 +102,7 @@ class ExpenseReportIk extends CoreObject * @param int $mode 1=only active; 2=only inactive; other value return all * @return array of category */ - public static function getTaxCategories($mode=1) + public static function getTaxCategories($mode = 1) { global $db; @@ -155,7 +155,7 @@ class ExpenseReportIk extends CoreObject * @param int $active active * @return array */ - public static function getRangesByCategory($fk_c_exp_tax_cat, $active=1) + public static function getRangesByCategory($fk_c_exp_tax_cat, $active = 1) { global $db; @@ -237,7 +237,7 @@ class ExpenseReportIk extends CoreObject * @param int $default_c_exp_tax_cat id * @return int */ - public static function getMaxRangeNumber($default_c_exp_tax_cat=0) + public static function getMaxRangeNumber($default_c_exp_tax_cat = 0) { global $db,$conf; diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 6d2a99d2101..2c25cb001d3 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -148,7 +148,7 @@ class ExpenseReportRule extends CoreObject * @param type $fk_user user of expense * @return array \ExpenseReportRule */ - public static function getAllRule($fk_c_type_fees='', $date='', $fk_user='') + public static function getAllRule($fk_c_type_fees = '', $date = '', $fk_user = '') { global $db; diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index 7901e813edc..1ad0f22bce7 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -50,7 +50,7 @@ class ExpenseReportStats extends Stats * @param int $userid Id user for filter * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf, $user; @@ -107,7 +107,7 @@ class ExpenseReportStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(".$this->db->ifsql('e.date_valid IS NULL','e.date_create','e.date_valid').") as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -129,7 +129,7 @@ class ExpenseReportStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(".$this->db->ifsql('e.date_valid IS NULL','e.date_create','e.date_valid').",'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index ae55432a4b8..b18eae8c514 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -258,7 +258,7 @@ class PaymentExpenseReport extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -345,7 +345,7 @@ class PaymentExpenseReport extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -471,7 +471,7 @@ class PaymentExpenseReport extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } @@ -484,7 +484,7 @@ class PaymentExpenseReport extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -530,7 +530,7 @@ class PaymentExpenseReport extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $langs,$conf; @@ -663,7 +663,7 @@ class PaymentExpenseReport extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 7d908161071..af5554a26a9 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -78,7 +78,7 @@ class Export * @param string $filter Load a particular dataset only * @return int <0 if KO, >0 if OK */ - function load_arrays($user,$filter='') + function load_arrays($user, $filter = '') { // phpcs:enable global $langs,$conf,$mysoc; @@ -782,7 +782,7 @@ class Export * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 52ad0486597..de029081b1f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -1293,7 +1293,7 @@ exit; // don't know why but apache hangs with php 5.3.10-1ubuntu3.12 and apache * @param string $sqlmaxforexport SQL request to parse * @return string Table name of field */ -function getablenamefromfield($code,$sqlmaxforexport) +function getablenamefromfield($code, $sqlmaxforexport) { $alias=preg_replace('/\.(.*)$/i','',$code); // Keep only 'Alias' and remove '.Fieldname' $regexstring='/([a-zA-Z_]+) as '.preg_quote($alias).'[, \)]/i'; diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php index 3f3315b6028..1d7e4b9f939 100644 --- a/htdocs/fichinter/class/api_interventions.class.php +++ b/htdocs/fichinter/class/api_interventions.class.php @@ -334,7 +334,7 @@ class Interventions extends DolibarrApi * * @return array */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->ficheinter->creer) { throw new RestException(401, "Insuffisant rights"); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e20d8e1da1a..880bf83df5b 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -179,7 +179,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -313,7 +313,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { if (! is_numeric($this->duration)) { $this->duration = 0; @@ -373,7 +373,7 @@ class Fichinter extends CommonObject * @param string $ref Ref of intervention * @return int <0 if KO, >0 if OK */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { $sql = "SELECT f.rowid, f.ref, f.description, f.fk_soc, f.fk_statut,"; $sql.= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; @@ -483,7 +483,7 @@ class Fichinter extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -625,7 +625,7 @@ class Fichinter extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -653,7 +653,7 @@ class Fichinter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -666,7 +666,7 @@ class Fichinter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable // Init/load array of translation of status @@ -716,7 +716,7 @@ class Fichinter extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $hookmanager; @@ -897,7 +897,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable trigger * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1112,7 +1112,7 @@ class Fichinter extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager; @@ -1205,7 +1205,7 @@ class Fichinter extends CommonObject * @param array $array_options Array option * @return int >0 if ok, <0 if ko */ - function addline($user,$fichinterid, $desc, $date_intervention, $duration, $array_options='') + function addline($user, $fichinterid, $desc, $date_intervention, $duration, $array_options = '') { dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration"); @@ -1443,7 +1443,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int <0 if ko, >0 if ok */ - function insert($user, $notrigger=0) + function insert($user, $notrigger = 0) { global $langs,$conf; @@ -1539,7 +1539,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int <0 if ko, >0 if ok */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $langs,$conf; @@ -1660,7 +1660,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int >0 if ok, <0 if ko */ - function deleteline($user,$notrigger=0) + function deleteline($user, $notrigger = 0) { global $langs,$conf; diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 0475a2116eb..340c59b0cb5 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -54,7 +54,7 @@ class FichinterStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -89,7 +89,7 @@ class FichinterStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -132,7 +132,7 @@ class FichinterStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 3b3ac43c496..5d9efc10425 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -96,7 +96,7 @@ class SupplierInvoices extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -296,7 +296,7 @@ class SupplierInvoices extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index ac5c825856c..a26b087cfee 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -96,7 +96,7 @@ class SupplierOrders extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -301,7 +301,7 @@ class SupplierOrders extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { throw new RestException(401); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d92159c3234..1436409d82e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -248,7 +248,7 @@ class CommandeFournisseur extends CommonOrder * @param string $ref Ref of object * @return int >0 if OK, <0 if KO, 0 if not found */ - public function fetch($id, $ref='') + public function fetch($id, $ref = '') { global $conf; @@ -382,7 +382,7 @@ class CommandeFournisseur extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable //$result=$this->fetch_lines(); @@ -492,7 +492,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function valid($user,$idwarehouse=0,$notrigger=0) + public function valid($user, $idwarehouse = 0, $notrigger = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -611,7 +611,7 @@ class CommandeFournisseur extends CommonOrder * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto * @return string Label */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode,$this->billed); } @@ -625,7 +625,7 @@ class CommandeFournisseur extends CommonOrder * @param int $billed 1=Billed * @return string Label of status */ - function LibStatut($statut,$mode=0,$billed=0) + function LibStatut($statut, $mode = 0, $billed = 0) { // phpcs:enable global $conf, $langs; @@ -719,7 +719,7 @@ class CommandeFournisseur extends CommonOrder * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chain with URL */ - public function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -879,7 +879,7 @@ class CommandeFournisseur extends CommonOrder * @param int $secondlevel 0=Standard approval, 1=Second level approval (used when option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set) * @return int <0 if KO, >0 if OK */ - public function approve($user, $idwarehouse=0, $secondlevel=0) + public function approve($user, $idwarehouse = 0, $secondlevel = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1088,7 +1088,7 @@ class CommandeFournisseur extends CommonOrder * @param int $idwarehouse Id warehouse to use for stock change (not used for supplier orders). * @return int >0 if Ok, <0 if Ko */ - function Cancel($user, $idwarehouse=-1) + function Cancel($user, $idwarehouse = -1) { // phpcs:enable global $langs,$conf; @@ -1150,7 +1150,7 @@ class CommandeFournisseur extends CommonOrder * @param string $comment Comment * @return int <0 if KO, >0 if OK */ - public function commande($user, $date, $methode, $comment='') + public function commande($user, $date, $methode, $comment = '') { global $langs; dol_syslog(get_class($this)."::commande"); @@ -1208,7 +1208,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger Disable all triggers * @return int <0 if KO, Id of supplier order if OK */ - public function create($user, $notrigger=0) + public function create($user, $notrigger = 0) { global $langs,$conf,$hookmanager; @@ -1495,7 +1495,7 @@ class CommandeFournisseur extends CommonOrder * @param int $origin_id Id of origin object * @return int <=0 if KO, >0 if OK */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $ref_supplier='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0, $fk_unit=null, $pu_ht_devise=0, $origin='', $origin_id=0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0) { global $langs,$mysoc,$conf; @@ -1754,7 +1754,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1 = notrigger * @return int <0 if KO, >0 if OK */ - public function dispatchProduct($user, $product, $qty, $entrepot, $price=0, $comment='', $eatby='', $sellby='', $batch='', $fk_commandefourndet=0, $notrigger=0) + public function dispatchProduct($user, $product, $qty, $entrepot, $price = 0, $comment = '', $eatby = '', $sellby = '', $batch = '', $fk_commandefourndet = 0, $notrigger = 0) { global $conf, $langs; @@ -1856,7 +1856,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Disable call to triggers * @return int <0 if KO, >0 if OK */ - public function deleteline($idline, $notrigger=0) + public function deleteline($idline, $notrigger = 0) { if ($this->statut == 0) { @@ -1892,7 +1892,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger=0) + public function delete(User $user, $notrigger = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2049,7 +2049,7 @@ class CommandeFournisseur extends CommonOrder * @param int $status Filter on stats (-1 = no filter, 0 = lines draft to be approved, 1 = approved lines) * @return array Array of lines */ - public function getDispachedLines($status=-1) + public function getDispachedLines($status = -1) { $ret = array(); @@ -2219,7 +2219,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if ($user->rights->fournisseur->commande->creer) @@ -2285,7 +2285,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function set_id_projet($user, $id_projet, $notrigger=0) + function set_id_projet($user, $id_projet, $notrigger = 0) { // phpcs:enable if ($user->rights->fournisseur->commande->creer) @@ -2467,7 +2467,7 @@ class CommandeFournisseur extends CommonOrder * @param string $ref_supplier Supplier ref * @return int < 0 if error, > 0 if ok */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise=0, $ref_supplier='') + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { global $mysoc, $conf; dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type, $fk_unit"); @@ -2889,7 +2889,7 @@ class CommandeFournisseur extends CommonOrder * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $langs; @@ -3014,7 +3014,7 @@ class CommandeFournisseur extends CommonOrder * @param string $comment Comment * @return int <0 if KO, 0 if not applicable, >0 if OK */ - public function calcAndSetStatusDispatch(User $user, $closeopenorder=1, $comment='') + public function calcAndSetStatusDispatch(User $user, $closeopenorder = 1, $comment = '') { global $conf, $langs; @@ -3153,7 +3153,7 @@ class CommandeFournisseur extends CommonOrder * @param int $filtre_statut Filter on shipment status * @return int <0 if KO, Nb of lines found if OK */ - function loadReceptions($filtre_statut=-1) + function loadReceptions($filtre_statut = -1) { $this->receptions = array(); @@ -3350,7 +3350,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, >0 if OK */ - public function insert($notrigger=0) + public function insert($notrigger = 0) { global $conf, $user; @@ -3476,7 +3476,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 si ko, >0 si ok */ - public function update($notrigger=0) + public function update($notrigger = 0) { global $conf,$user; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index ee4602d7093..0e1ad52d46c 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -135,7 +135,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -256,7 +256,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param string $ref Ref * @return int <0 if KO, >0 if OK */ - function fetch($id,$ref='') + function fetch($id, $ref = '') { global $langs; $sql = "SELECT"; @@ -325,7 +325,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -420,7 +420,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -534,7 +534,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -547,7 +547,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -623,7 +623,7 @@ class CommandeFournisseurDispatch extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1dab0e9f82e..6a0ca6abddf 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -547,7 +547,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref Ref supplier invoice * @return int <0 if KO, >0 if OK, 0 if not found */ - public function fetch($id='',$ref='') + public function fetch($id = '', $ref = '') { global $langs; @@ -813,7 +813,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user=null, $notrigger=0) + public function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1045,7 +1045,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger=0) + public function delete(User $user, $notrigger = 0) { global $langs,$conf; @@ -1196,7 +1196,7 @@ class FactureFournisseur extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet. * @return int <0 si ko, >0 si ok */ - function set_paid($user, $close_code='', $close_note='') + function set_paid($user, $close_code = '', $close_note = '') { // phpcs:enable global $conf,$langs; @@ -1295,7 +1295,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, =0 if nothing to do, >0 if OK */ - public function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) + public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1458,7 +1458,7 @@ class FactureFournisseur extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function set_draft($user, $idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; @@ -1557,7 +1557,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref_supplier Supplier ref * @return int >0 if OK, <0 if KO */ - public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false, $array_options=0, $fk_unit=null, $origin_id=0, $pu_ht_devise=0, $ref_supplier='') + public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '') { global $langs, $mysoc, $conf; @@ -1799,7 +1799,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref_supplier Supplier ref * @return int <0 if KO, >0 if OK */ - public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='') + public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { global $mysoc; dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); @@ -1927,7 +1927,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function deleteline($rowid, $notrigger=0) + public function deleteline($rowid, $notrigger = 0) { if (!$rowid) { $rowid = $this->id; @@ -2038,7 +2038,7 @@ class FactureFournisseur extends CommonInvoice * @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) * <0 if error */ - function list_replacable_supplier_invoices($socid=0) + function list_replacable_supplier_invoices($socid = 0) { // phpcs:enable global $conf; @@ -2090,7 +2090,7 @@ class FactureFournisseur extends CommonInvoice * @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) * <0 if error */ - function list_qualified_avoir_supplier_invoices($socid=0) + function list_qualified_avoir_supplier_invoices($socid = 0) { // phpcs:enable global $conf; @@ -2204,7 +2204,7 @@ class FactureFournisseur extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='',$max=0, $short=0, $moretitle='', $notooltip=0, $save_lastsearch_value=-1) + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -2281,7 +2281,7 @@ class FactureFournisseur extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - public function getNextNumRef($soc,$mode='next') + public function getNextNumRef($soc, $mode = 'next') { global $db, $langs, $conf; $langs->load("orders"); @@ -2335,7 +2335,7 @@ class FactureFournisseur extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - public function initAsSpecimen($option='') + public function initAsSpecimen($option = '') { global $langs,$conf; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -2481,7 +2481,7 @@ class FactureFournisseur extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int New id of clone */ - public function createFromClone($fromid,$invertdetail=0) + public function createFromClone($fromid, $invertdetail = 0) { global $user,$langs; @@ -2560,7 +2560,7 @@ class FactureFournisseur extends CommonInvoice * @param null|array $moreparams Array to provide more information * @return int <0 if KO, 0 if nothing done, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -3047,7 +3047,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @param int $notrigger 1 no triggers * @return int <0 if KO, >0 if OK */ - public function insert($notrigger=0) + public function insert($notrigger = 0) { global $user,$conf; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index d721a4a9254..1918013a966 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -224,7 +224,7 @@ class ProductFournisseur extends Product * @param string $desc_fourn Custom description for product_fourn_price * @return int <0 if KO, >=0 if OK */ - function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='') + function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges = 0, $remise_percent = 0, $remise = 0, $newnpr = 0, $delivery_time_days = 0, $supplier_reputation = '', $localtaxes_array = array(), $newdefaultvatcode = '', $multicurrency_buyprice = 0, $multicurrency_price_base_type = 'HT', $multicurrency_tx = 1, $multicurrency_code = '', $desc_fourn = '') { // phpcs:enable global $conf, $langs; @@ -542,7 +542,7 @@ class ProductFournisseur extends Product * @param int $offset Offset * @return array Array of Products with new properties to define supplier price */ - function list_product_fournisseur_price($prodid, $sortfield='', $sortorder='', $limit=0, $offset=0) + function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0) { // phpcs:enable global $conf; @@ -643,7 +643,7 @@ class ProductFournisseur extends Product * @param int $socid get min price for specific supplier * @return int <0 if KO, 0=Not found of no product id provided, >0 if OK */ - function find_min_price_product_fournisseur($prodid, $qty=0, $socid=0) + function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0) { // phpcs:enable global $conf; @@ -815,7 +815,7 @@ class ProductFournisseur extends Product * @return string String with supplier price * TODO Remove this method. Use getNomUrl directly. */ - function getSocNomUrl($withpicto=0,$option='supplier',$maxlen=0,$notooltip=0) + function getSocNomUrl($withpicto = 0, $option = 'supplier', $maxlen = 0, $notooltip = 0) { $thirdparty = new Fournisseur($this->db); $thirdparty->fetch($this->fourn_id); @@ -835,7 +835,7 @@ class ProductFournisseur extends Product * to display in table format. * @return string String with supplier price */ - function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array()) + function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array()) { // phpcs:enable global $langs; @@ -888,7 +888,7 @@ class ProductFournisseur extends Product * @param int $offset Offset * @return array Array of Log prices */ - function listProductFournisseurPriceLog($fourn_id, $sortfield='', $sortorder='', $limit=0, $offset=0) + function listProductFournisseurPriceLog($fourn_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0) { global $conf; @@ -934,7 +934,7 @@ class ProductFournisseur extends Product * to display in table format. * @return string HTML String with supplier price */ - function displayPriceProductFournisseurLog($productFournLogList=array()) + function displayPriceProductFournisseurLog($productFournLogList = array()) { global $langs; @@ -968,7 +968,7 @@ class ProductFournisseur extends Product * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ee92374149b..a7469367fb6 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -82,7 +82,7 @@ class PaiementFourn extends Paiement * @param int $fk_bank Id of bank line associated to payment * @return int <0 if KO, -2 if not found, >0 if OK */ - function fetch($id, $ref='', $fk_bank='') + function fetch($id, $ref = '', $fk_bank = '') { $error=0; @@ -145,7 +145,7 @@ class PaiementFourn extends Paiement * @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more * @return int id of created payment, < 0 if error */ - function create($user, $closepaidinvoices=0) + function create($user, $closepaidinvoices = 0) { global $langs,$conf; @@ -317,7 +317,7 @@ class PaiementFourn extends Paiement * @param int $notrigger No trigger * @return int <0 si ko, >0 si ok */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $user, $langs; @@ -463,7 +463,7 @@ class PaiementFourn extends Paiement * @param string $filter SQL filter * @return array Array of supplier invoice id */ - function getBillsArray($filter='') + function getBillsArray($filter = '') { $sql = 'SELECT fk_facturefourn'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf, '.MAIN_DB_PREFIX.'facture_fourn as f'; @@ -501,7 +501,7 @@ class PaiementFourn extends Paiement * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -514,7 +514,7 @@ class PaiementFourn extends Paiement * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -568,7 +568,7 @@ class PaiementFourn extends Paiement * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0) { global $langs; @@ -604,7 +604,7 @@ class PaiementFourn extends Paiement * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -629,7 +629,7 @@ class PaiementFourn extends Paiement * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $db, $langs; $langs->load("bills"); @@ -715,7 +715,7 @@ class PaiementFourn extends Paiement * @param null|array $moreparams Array to provide more information * @return int <0 if KO, 0 if nothing done, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -781,7 +781,7 @@ class PaiementFourn extends Paiement * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index fd2e5e80772..449be9daccf 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -698,7 +698,7 @@ $db->close(); * @param integer $ftp_passive Use a passive mode * @return int <0 if OK, >0 if KO */ -function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive=0) +function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive = 0) { global $langs, $conf; @@ -798,7 +798,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect * @param string $dir Directory * @return int 1=directory, 0=not a directory */ -function ftp_isdir($connect_id,$dir) +function ftp_isdir($connect_id, $dir) { if (@ftp_chdir($connect_id,$dir)) { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index f5761876795..6248b3d0bce 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -250,7 +250,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf; $error=0; @@ -336,7 +336,7 @@ class Holiday extends CommonObject * @param string $ref Ref object * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; @@ -420,7 +420,7 @@ class Holiday extends CommonObject * @param string $filter SQL Filter * @return int -1 if KO, 1 if OK, 2 if no result */ - function fetchByUser($user_id, $order='', $filter='') + function fetchByUser($user_id, $order = '', $filter = '') { global $langs, $conf; @@ -548,7 +548,7 @@ class Holiday extends CommonObject * @param string $filter SQL Filter * @return int -1 if KO, 1 if OK, 2 if no result */ - function fetchAll($order,$filter) + function fetchAll($order, $filter) { global $langs; @@ -674,7 +674,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function validate($user=null, $notrigger=0) + function validate($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -745,7 +745,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function approve($user=null, $notrigger=0) + function approve($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -858,7 +858,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -972,7 +972,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1030,7 +1030,7 @@ class Holiday extends CommonObject * @return boolean False = New range overlap an existing holiday, True = no overlapping (is never on holiday during checked period). * @see verifDateHolidayForTimestamp */ - function verifDateHolidayCP($fk_user, $dateStart, $dateEnd, $halfday=0) + function verifDateHolidayCP($fk_user, $dateStart, $dateEnd, $halfday = 0) { $this->fetchByUser($fk_user,'',''); @@ -1112,7 +1112,7 @@ class Holiday extends CommonObject * @return array array('morning'=> ,'afternoon'=> ), Boolean is true if user is available for day timestamp. * @see verifDateHolidayCP */ - function verifDateHolidayForTimestamp($fk_user, $timestamp, $status='-1') + function verifDateHolidayForTimestamp($fk_user, $timestamp, $status = '-1') { global $langs, $conf; @@ -1175,7 +1175,7 @@ class Holiday extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) { global $langs; @@ -1211,7 +1211,7 @@ class Holiday extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode, $this->date_debut); } @@ -1225,7 +1225,7 @@ class Holiday extends CommonObject * @param date $startdate Date holiday should start * @return string Label */ - function LibStatut($statut, $mode=0, $startdate='') + function LibStatut($statut, $mode = 0, $startdate = '') { // phpcs:enable global $langs; @@ -1290,7 +1290,7 @@ class Holiday extends CommonObject * @param string $htmlname Name of HTML select field * @return string Show select of status */ - function selectStatutCP($selected='', $htmlname='select_statut') + function selectStatutCP($selected = '', $htmlname = 'select_statut') { global $langs; @@ -1324,7 +1324,7 @@ class Holiday extends CommonObject * @param string $value vrai si mise à jour OK sinon faux * @return boolean ok or ko */ - function updateConfCP($name,$value) + function updateConfCP($name, $value) { $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; @@ -1348,7 +1348,7 @@ class Holiday extends CommonObject * @param string $createifnotfound 'stringvalue'=Create entry with string value if not found. For example 'YYYYMMDDHHMMSS'. * @return string Value of parameter. Example: 'YYYYMMDDHHMMSS' or < 0 if error */ - function getConfCP($name, $createifnotfound='') + function getConfCP($name, $createifnotfound = '') { $sql = "SELECT value"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; @@ -1403,7 +1403,7 @@ class Holiday extends CommonObject * @param int $fk_type Type of vacation * @return int 0=Nothing done, 1=OK, -1=KO */ - function updateSoldeCP($userID='',$nbHoliday='', $fk_type='') + function updateSoldeCP($userID = '', $nbHoliday = '', $fk_type = '') { global $user, $langs; @@ -1579,7 +1579,7 @@ class Holiday extends CommonObject * @param int $userid Id user * @return void */ - function createCPusers($single=false,$userid='') + function createCPusers($single = false, $userid = '') { // Si c'est l'ensemble des utilisateurs à ajouter if (! $single) @@ -1631,7 +1631,7 @@ class Holiday extends CommonObject * @param int $fk_type Filter on type * @return float Retourne le solde de congés payés de l'utilisateur */ - function getCPforUser($user_id, $fk_type=0) + function getCPforUser($user_id, $fk_type = 0) { $sql = "SELECT nb_holiday"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users"; @@ -1661,7 +1661,7 @@ class Holiday extends CommonObject * @param string $filters Filters * @return array|string|int Return an array */ - function fetchUsers($stringlist=true, $type=true, $filters='') + function fetchUsers($stringlist = true, $type = true, $filters = '') { global $conf; @@ -2045,7 +2045,7 @@ class Holiday extends CommonObject * @param string $filter Filtre de séléction * @return int -1 si erreur, 1 si OK et 2 si pas de résultat */ - function fetchLog($order,$filter) + function fetchLog($order, $filter) { global $langs; @@ -2122,7 +2122,7 @@ class Holiday extends CommonObject * @param int $affect Filter on affect (a request will change sold or not). -1 = Both * @return array Return array with list of types */ - function getTypes($active=-1, $affect=-1) + function getTypes($active = -1, $affect = -1) { global $mysoc; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 4153972d27c..7e967176582 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -296,7 +296,7 @@ class Establishment extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -309,7 +309,7 @@ class Establishment extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -396,7 +396,7 @@ class Establishment extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @return string String with URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index a0d33d4c28a..441535d11fd 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -73,7 +73,7 @@ class Import * @param string $filter Load a particular dataset only. Index will start to 0. * @return int <0 if KO, >0 if OK */ - function load_arrays($user,$filter='') + function load_arrays($user, $filter = '') { // phpcs:enable global $langs,$conf; @@ -196,7 +196,7 @@ class Import * @param string $datatoimport Dataset to import * @return string <0 if KO, >0 if OK */ - function build_example_file($model, $headerlinefields, $contentlinevalues,$datatoimport) + function build_example_file($model, $headerlinefields, $contentlinevalues, $datatoimport) { // phpcs:enable global $conf,$langs; @@ -316,7 +316,7 @@ class Import * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 04fc651685f..b1d59b648b3 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1925,7 +1925,7 @@ $db->close(); * @param int $nostyle Hide style * @return void */ -function show_elem($fieldssource,$pos,$key,$var,$nostyle='') +function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') { global $langs,$bc; @@ -1997,7 +1997,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='') * @param array $listofkey Array of keys * @return integer */ -function getnewkey(&$fieldssource,&$listofkey) +function getnewkey(&$fieldssource, &$listofkey) { $i=count($fieldssource)+1; // Max number of key diff --git a/htdocs/index.php b/htdocs/index.php index 1ef48ea9bae..3a6802abbf8 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -696,7 +696,7 @@ $db->close(); * @param string $options More parameters on img tag * @return string Return img tag of weather */ -function showWeather($totallate,$text,$options) +function showWeather($totallate, $text, $options) { global $conf; diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 54b34b89e8c..6c2cdcead72 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -374,7 +374,7 @@ function conf($dolibarr_main_document_root) * @param string $csstable Css for table * @return void */ -function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='',$csstable='main-inside') +function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl = '', $csstable = 'main-inside') { global $conf; global $langs; @@ -451,7 +451,7 @@ function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='',$css * @param integer $withpleasewait Add also please wait tags * @return void */ -function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) +function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleasewait = 0) { global $conf,$langs; @@ -508,7 +508,7 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) * @param int $level Level of log * @return void */ -function dolibarr_install_syslog($message, $level=LOG_DEBUG) +function dolibarr_install_syslog($message, $level = LOG_DEBUG) { if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6); dol_syslog($message,$level); diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 48fdb15b655..a55c14195e5 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -816,7 +816,7 @@ if ($ret) exit($ret); * @param string $main_dir Full path name to main.inc.php file * @return void */ -function write_main_file($mainfile,$main_dir) +function write_main_file($mainfile, $main_dir) { $fp = @fopen("$mainfile", "w"); if($fp) @@ -837,7 +837,7 @@ function write_main_file($mainfile,$main_dir) * @param string $main_dir Full path name to master.inc.php file * @return void */ -function write_master_file($masterfile,$main_dir) +function write_master_file($masterfile, $main_dir) { $fp = @fopen("$masterfile", "w"); if($fp) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cf6cbf28e45..acddde53988 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -590,7 +590,7 @@ if ($ret) exit($ret); * @param Conf $conf Object conf * @return void */ -function migrate_paiements($db,$langs,$conf) +function migrate_paiements($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -684,7 +684,7 @@ function migrate_paiements($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiements_orphelins_1($db,$langs,$conf) +function migrate_paiements_orphelins_1($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -811,7 +811,7 @@ function migrate_paiements_orphelins_1($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiements_orphelins_2($db,$langs,$conf) +function migrate_paiements_orphelins_2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -954,7 +954,7 @@ function migrate_paiements_orphelins_2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_det($db,$langs,$conf) +function migrate_contracts_det($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1052,7 +1052,7 @@ function migrate_contracts_det($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_links_transfert($db,$langs,$conf) +function migrate_links_transfert($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1136,7 +1136,7 @@ function migrate_links_transfert($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_date1($db,$langs,$conf) +function migrate_contracts_date1($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1167,7 +1167,7 @@ function migrate_contracts_date1($db,$langs,$conf) /* * Mise a jour date contrat avec date min effective mise en service si inferieur */ -function migrate_contracts_date2($db,$langs,$conf) +function migrate_contracts_date2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1236,7 +1236,7 @@ function migrate_contracts_date2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_date3($db,$langs,$conf) +function migrate_contracts_date3($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1263,7 +1263,7 @@ function migrate_contracts_date3($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_open($db,$langs,$conf) +function migrate_contracts_open($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1322,7 +1322,7 @@ function migrate_contracts_open($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiementfourn_facturefourn($db,$langs,$conf) +function migrate_paiementfourn_facturefourn($db, $langs, $conf) { global $bc; @@ -1439,7 +1439,7 @@ function migrate_paiementfourn_facturefourn($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_facture($db,$langs,$conf) +function migrate_price_facture($db, $langs, $conf) { $err=0; @@ -1558,7 +1558,7 @@ function migrate_price_facture($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_propal($db,$langs,$conf) +function migrate_price_propal($db, $langs, $conf) { $tmpmysoc=new Societe($db); $tmpmysoc->setMysoc($conf); @@ -1666,7 +1666,7 @@ function migrate_price_propal($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_contrat($db,$langs,$conf) +function migrate_price_contrat($db, $langs, $conf) { $db->begin(); @@ -1755,7 +1755,7 @@ function migrate_price_contrat($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_commande($db,$langs,$conf) +function migrate_price_commande($db, $langs, $conf) { $db->begin(); @@ -1872,7 +1872,7 @@ function migrate_price_commande($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_commande_fournisseur($db,$langs,$conf) +function migrate_price_commande_fournisseur($db, $langs, $conf) { $db->begin(); @@ -1989,7 +1989,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_modeles($db,$langs,$conf) +function migrate_modeles($db, $langs, $conf) { //print '<br>'; //print '<b>'.$langs->trans('UpdateModelsTable')."</b><br>\n"; @@ -2047,7 +2047,7 @@ function migrate_modeles($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_expedition($db,$langs,$conf) +function migrate_commande_expedition($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_expedition"); @@ -2124,7 +2124,7 @@ function migrate_commande_expedition($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_livraison($db,$langs,$conf) +function migrate_commande_livraison($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_livraison"); @@ -2217,7 +2217,7 @@ function migrate_commande_livraison($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_detail_livraison($db,$langs,$conf) +function migrate_detail_livraison($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_detail_livraison"); @@ -2338,7 +2338,7 @@ function migrate_detail_livraison($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_stocks($db,$langs,$conf) +function migrate_stocks($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_stocks"); @@ -2412,7 +2412,7 @@ function migrate_stocks($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_menus($db,$langs,$conf) +function migrate_menus($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_menus"); @@ -2494,7 +2494,7 @@ function migrate_menus($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_deliveryaddress($db,$langs,$conf) +function migrate_commande_deliveryaddress($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_deliveryaddress"); @@ -2578,7 +2578,7 @@ function migrate_commande_deliveryaddress($db,$langs,$conf) * @param Conf $conf Object conf * @return integer|null */ -function migrate_restore_missing_links($db,$langs,$conf) +function migrate_restore_missing_links($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_restore_missing_links"); @@ -2734,7 +2734,7 @@ function migrate_restore_missing_links($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_project_user_resp($db,$langs,$conf) +function migrate_project_user_resp($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_user_resp"); @@ -2831,7 +2831,7 @@ function migrate_project_user_resp($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_project_task_actors($db,$langs,$conf) +function migrate_project_task_actors($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_task_actors"); @@ -2928,7 +2928,7 @@ function migrate_project_task_actors($db,$langs,$conf) * @param string $targettype Type of element target * @return void */ -function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcetype,$fk_target,$targettype) +function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $sourcetype, $fk_target, $targettype) { print '<tr><td colspan="4">'; @@ -3024,7 +3024,7 @@ function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcet * @param Conf $conf Object conf * @return void */ -function migrate_project_task_time($db,$langs,$conf) +function migrate_project_task_time($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_task_time"); @@ -3145,7 +3145,7 @@ function migrate_project_task_time($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_customerorder_shipping($db,$langs,$conf) +function migrate_customerorder_shipping($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3246,7 +3246,7 @@ function migrate_customerorder_shipping($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_shipping_delivery($db,$langs,$conf) +function migrate_shipping_delivery($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3358,7 +3358,7 @@ function migrate_shipping_delivery($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_shipping_delivery2($db,$langs,$conf) +function migrate_shipping_delivery2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3442,7 +3442,7 @@ function migrate_shipping_delivery2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_actioncomm_element($db,$langs,$conf) +function migrate_actioncomm_element($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3508,7 +3508,7 @@ function migrate_actioncomm_element($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_mode_reglement($db,$langs,$conf) +function migrate_mode_reglement($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3608,7 +3608,7 @@ function migrate_mode_reglement($db,$langs,$conf) * @param string $versionto Version target * @return void */ -function migrate_clean_association($db,$langs,$conf,$versionto) +function migrate_clean_association($db, $langs, $conf, $versionto) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association"); if ($result) // result defined for version 3.2 or - @@ -3695,7 +3695,7 @@ function migrate_clean_association($db,$langs,$conf,$versionto) * @param Conf $conf Object conf * @return void */ -function migrate_categorie_association($db,$langs,$conf) +function migrate_categorie_association($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3788,7 +3788,7 @@ function migrate_categorie_association($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_event_assignement($db,$langs,$conf) +function migrate_event_assignement($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3865,7 +3865,7 @@ function migrate_event_assignement($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_event_assignement_contact($db,$langs,$conf) +function migrate_event_assignement_contact($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3943,7 +3943,7 @@ function migrate_event_assignement_contact($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_reset_blocked_log($db,$langs,$conf) +function migrate_reset_blocked_log($db, $langs, $conf) { global $user; @@ -4061,7 +4061,7 @@ function migrate_reset_blocked_log($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_remise_entity($db,$langs,$conf) +function migrate_remise_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4138,7 +4138,7 @@ function migrate_remise_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_remise_except_entity($db,$langs,$conf) +function migrate_remise_except_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4250,7 +4250,7 @@ function migrate_remise_except_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_user_rights_entity($db,$langs,$conf) +function migrate_user_rights_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4326,7 +4326,7 @@ function migrate_user_rights_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_usergroup_rights_entity($db,$langs,$conf) +function migrate_usergroup_rights_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4536,7 +4536,7 @@ function migrate_delete_old_dir($db, $langs, $conf) * @param int $force 1=Reload module even if not already loaded * @return void */ -function migrate_reload_modules($db, $langs, $conf, $listofmodule=array(), $force=0) +function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $force = 0) { if (count($listofmodule) == 0) return; @@ -4786,7 +4786,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule=array(), $forc * @param string $versionto Version target * @return void */ -function migrate_reload_menu($db,$langs,$conf,$versionto) +function migrate_reload_menu($db, $langs, $conf, $versionto) { global $conf; dolibarr_install_syslog("upgrade2::migrate_reload_menu"); diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 9968f4d3d38..db1f81be705 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -554,7 +554,7 @@ class Livraison extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function update_line($id, $array_options=0) + function update_line($id, $array_options = 0) { // phpcs:enable global $conf; @@ -716,7 +716,7 @@ class Livraison extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) { global $langs; @@ -811,7 +811,7 @@ class Livraison extends CommonObject * @param int $mode Mode * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -824,7 +824,7 @@ class Livraison extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1035,7 +1035,7 @@ class Livraison extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 3805704fbb9..09fddcb5599 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -393,7 +393,7 @@ class Loan extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function getLibStatut($mode=0,$alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paid,$mode,$alreadypaid); } @@ -407,7 +407,7 @@ class Loan extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function LibStatut($statut,$mode=0,$alreadypaid=-1) + function LibStatut($statut, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -460,7 +460,7 @@ class Loan extends CommonObject * @param int $maxlen Label max length * @return string Chaine with URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index 7373bfb4ab1..09adf4b3e16 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -270,7 +270,7 @@ class LoanSchedule extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user=0, $notrigger=0) + public function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -354,7 +354,7 @@ class LoanSchedule extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function delete($user, $notrigger=0) + public function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index b9cbe0d6b58..f11842bf0c1 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -273,7 +273,7 @@ class PaymentLoan extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -361,7 +361,7 @@ class PaymentLoan extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -546,7 +546,7 @@ class PaymentLoan extends CommonObject * @param int $maxlen Max length label * @return string Chaine with URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 213febdc4b5..fadf6ecf778 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -321,7 +321,7 @@ class MailmanSpip * @param array $listes To force mailing-list (string separated with ,) * @return int <0 if KO, >=0 if OK */ - function add_to_mailman($object,$listes='') + function add_to_mailman($object, $listes = '') { // phpcs:enable global $conf,$langs,$user; @@ -395,7 +395,7 @@ class MailmanSpip * @param array $listes To force mailing-list (string separated with ,) * @return int <0 if KO, >=0 if OK */ - function del_to_mailman($object,$listes='') + function del_to_mailman($object, $listes = '') { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e7bdbe07f67..2fd75e4f4c6 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1074,7 +1074,7 @@ if (! function_exists("llxHeader")) * @param string $replacemainareaby Replace call to main_area() by a print of this string * @return void */ - function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='') + function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '') { global $conf; @@ -1112,7 +1112,7 @@ if (! function_exists("llxHeader")) * @param int $forcenocache Force disabling of cache for the page * @return void */ -function top_httphead($contenttype='text/html', $forcenocache=0) +function top_httphead($contenttype = 'text/html', $forcenocache = 0) { global $db, $conf, $hookmanager; @@ -1178,7 +1178,7 @@ function top_httphead($contenttype='text/html', $forcenocache=0) * @param int $disablenofollow Disable no follow tag * @return void */ -function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0, $disablenofollow=0) +function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $disablejmobile = 0, $disablenofollow = 0) { global $db, $conf, $langs, $user, $hookmanager; @@ -1501,7 +1501,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs * For other external page: http://server/url * @return void */ -function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $helppagename='') +function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $helppagename = '') { global $user, $conf, $langs, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1706,7 +1706,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a * @param string $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) * @return void */ -function left_menu($menu_array_before, $helppagename='', $notused='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='', $acceptdelayedhtml=0) +function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_array_after = '', $leftmenuwithoutmainarea = 0, $title = '', $acceptdelayedhtml = 0) { global $user, $conf, $langs, $db, $form; global $hookmanager, $menumanager; @@ -1883,7 +1883,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra * @param string $title Title * @return void */ -function main_area($title='') +function main_area($title = '') { global $conf, $langs; @@ -1904,7 +1904,7 @@ function main_area($title='') * @param Translate $langs Language * @return array Array of help urls */ -function getHelpParamFor($helppagename,$langs) +function getHelpParamFor($helppagename, $langs) { $helpbaseurl=''; $helppage=''; @@ -1957,7 +1957,7 @@ function getHelpParamFor($helppagename,$langs) * @param string $autofocus Set autofocus on field * @return string */ -function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey='', $prefhtmlinputname='',$img='', $showtitlebefore=0, $autofocus=0) +function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey = '', $prefhtmlinputname = '', $img = '', $showtitlebefore = 0, $autofocus = 0) { global $conf,$langs,$user; @@ -1994,7 +1994,7 @@ if (! function_exists("llxFooter")) * @param int $disabledoutputofmessages Clear all messages stored into session without diplaying them * @return void */ - function llxFooter($comment='',$zone='private', $disabledoutputofmessages=0) + function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0) { global $conf, $langs, $user, $object; global $delayedhtmlcontent; diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 64076e07359..9143d8bf273 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -76,7 +76,7 @@ class ActionsMyModule * =0 if OK but we want to process standard actions too, * >0 if OK and we want to replace standard actions. */ - function getNomUrl($parameters,&$object,&$action) + function getNomUrl($parameters, &$object, &$action) { global $db,$langs,$conf,$user; $this->resprints = ''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 6f3b76a4f1b..b1ebc9759d9 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -340,7 +340,7 @@ class MyObject extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return array|int int <0 if KO, array of pages if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { global $conf; @@ -442,7 +442,7 @@ class MyObject extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -512,7 +512,7 @@ class MyObject extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -525,7 +525,7 @@ class MyObject extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php index 460df7e96bf..c9364284f0a 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php @@ -192,7 +192,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets * @param string $option Options * @return int Nb of recipients or -1 if KO */ - function getNbOfRecipients($filter=1,$option='') + function getNbOfRecipients($filter = 1, $option = '') { $a=parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''"); diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 5781b93e94d..279411c33c2 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -309,7 +309,7 @@ class modMyModule extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { $result=$this->_load_tables('/mymodule/sql/'); if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index 549f0fd411a..e1a68a18acd 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -519,7 +519,7 @@ class MultiCurrency extends CommonObject * @return array [0] => id currency * [1] => rate */ - public static function getIdAndTxFromCode(&$db, $code, $date_document='') + public static function getIdAndTxFromCode(&$db, $code, $date_document = '') { global $conf; @@ -556,7 +556,7 @@ class MultiCurrency extends CommonObject * @param string $table facture or facture_fourn * @return double amount converted */ - public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture') + public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture') { global $db; @@ -577,7 +577,7 @@ class MultiCurrency extends CommonObject * @param string $table facture or facture_fourn * @return bool */ - public static function getInvoiceRate($fk_facture, $table='facture') + public static function getInvoiceRate($fk_facture, $table = 'facture') { global $db; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 807d550e35c..fa114b1e8ea 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -121,7 +121,7 @@ class Opensurveysondage extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create(User $user, $notrigger=0) + function create(User $user, $notrigger = 0) { $error=0; @@ -208,7 +208,7 @@ class Opensurveysondage extends CommonObject * @param string $numsurvey Ref of survey (admin or not) * @return int <0 if KO, >0 if OK */ - function fetch($id, $numsurvey='') + function fetch($id, $numsurvey = '') { $sql = "SELECT"; $sql.= " t.id_sondage,"; @@ -283,7 +283,7 @@ class Opensurveysondage extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -356,7 +356,7 @@ class Opensurveysondage extends CommonObject * @param string $numsondage Num sondage admin to delete * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0, $numsondage='') + function delete(User $user, $notrigger = 0, $numsondage = '') { global $conf, $langs; $error=0; @@ -424,7 +424,7 @@ class Opensurveysondage extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -637,7 +637,7 @@ class Opensurveysondage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode) + function LibStatut($status, $mode) { // phpcs:enable global $langs, $conf; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 3df5b37c88f..e0cce1ae150 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -69,7 +69,7 @@ function opensurvey_prepare_head(Opensurveysondage $object) * @param array $arrayofcss Array of complementary css files * @return void */ -function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') +function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { global $conf, $mysoc; diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 849d8a7129c..5ccc09b6bc3 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -36,7 +36,7 @@ * @param string $TAG Full tag * @return int 1 if OK, -1 if ERROR */ -function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) +function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) { global $conf, $langs, $db; diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 37cc2fdbeba..5dcf57dca66 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -62,7 +62,7 @@ function paypaladmin_prepare_head() * @param string $ref Ref of object * @return string Url string */ -function showPaypalPaymentUrl($type,$ref) +function showPaypalPaymentUrl($type, $ref) { global $conf, $langs; @@ -88,7 +88,7 @@ function showPaypalPaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_free_tag') +function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -194,7 +194,7 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f * @param string $tag Full tag * @return string No return (a redirect is done) if OK, or Error message if KO */ -function print_paypal_redirect($paymentAmount,$currencyCodeType,$paymentType,$returnURL,$cancelURL,$tag) +function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag) { //declaring of global variables global $conf, $langs; @@ -330,7 +330,7 @@ function print_paypal_redirect($paymentAmount,$currencyCodeType,$paymentType,$re * @param string $desc Description * @return array Array */ -function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum, $email='', $desc='') +function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum, $email = '', $desc = '') { //------------------------------------------------------------------------------------------------------------------------------------ // Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation @@ -583,7 +583,7 @@ function DirectPayment($paymentType, $paymentAmount, $creditCardType, $creditCar * @param string $nvpStr is nvp string. * @return array returns an associtive array containing the response from the server. */ -function hash_call($methodName,$nvpStr) +function hash_call($methodName, $nvpStr) { //declaring of global variables global $conf, $langs; diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index cf9fcff98c8..897f9e98c6b 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -73,7 +73,7 @@ class ActionsCardProduct * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $limit, $offset, $sortfield, $sortorder; diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7ba746af06e..fefa1f4da1f 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -48,7 +48,7 @@ class ActionsCardService * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($db,$targetmodule,$canvas,$card) + function __construct($db, $targetmodule, $canvas, $card) { $this->db = $db; $this->targetmodule = $targetmodule; @@ -72,7 +72,7 @@ class ActionsCardService * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $limit, $offset, $sortfield, $sortorder; diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index afacbb158b5..c0e0b485d71 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -68,7 +68,7 @@ class Products extends DolibarrApi * @throws 403 * @throws 404 */ - function get($id, $ref='', $ref_ext='', $barcode='', $includestockdata=0) + function get($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0) { if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 9a22c93d042..4ddda70c7c0 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -69,7 +69,7 @@ class FormProduct * @param array $exclude warehouses ids to exclude * @return int Nb of loaded lines, 0 if already loaded, <0 if KO */ - function loadWarehouses($fk_product=0, $batch = '', $status='', $sumStock = true, $exclude='') + function loadWarehouses($fk_product = 0, $batch = '', $status = '', $sumStock = true, $exclude = '') { global $conf, $langs; @@ -173,7 +173,7 @@ class FormProduct * @param String $final_label full label with all parents, separated by ' >> ' (completed on each call) * @return String full label with all parents, separated by ' >> ' */ - private function get_parent_path($tab, $final_label='') + private function get_parent_path($tab, $final_label = '') { //phpcs:enable if(empty($final_label)) $final_label = $tab['label']; @@ -210,7 +210,7 @@ class FormProduct * @param int $showfullpath 1=Show full path of name (parent ref into label), 0=Show only ref of current warehouse * @return string HTML select */ - function selectWarehouses($selected='',$htmlname='idwarehouse',$filterstatus='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='minwidth200', $exclude='', $showfullpath=1) + function selectWarehouses($selected = '', $htmlname = 'idwarehouse', $filterstatus = '', $empty = 0, $disabled = 0, $fk_product = 0, $empty_label = '', $showstock = 0, $forcecombo = 0, $events = array(), $morecss = 'minwidth200', $exclude = '', $showfullpath = 1) { global $conf,$langs,$user; @@ -255,7 +255,7 @@ class FormProduct * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectWarehouses($page, $selected='', $htmlname='warehouse_id', $addempty=0) + function formSelectWarehouses($page, $selected = '', $htmlname = 'warehouse_id', $addempty = 0) { global $langs; if ($htmlname != "none") { @@ -291,7 +291,7 @@ class FormProduct * @param int $adddefault Add empty unit called "Default" * @return void */ - function select_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0) + function select_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0) { //phpcs:enable print $this->load_measuring_units($name, $measuring_style, $default, $adddefault); @@ -308,7 +308,7 @@ class FormProduct * @param int $adddefault Add empty unit called "Default" * @return string */ - function load_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0) + function load_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0) { //phpcs:enable global $langs,$conf,$mysoc; @@ -358,7 +358,7 @@ class FormProduct * * @return string HTML select */ - function selectLotStock($selected='',$htmlname='batch_id',$filterstatus='',$empty=0,$disabled=0,$fk_product=0,$fk_entrepot=0,$objectLines = array(),$empty_label='', $forcecombo=0, $events=array(), $morecss='minwidth200') + function selectLotStock($selected = '', $htmlname = 'batch_id', $filterstatus = '', $empty = 0, $disabled = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array(), $empty_label = '', $forcecombo = 0, $events = array(), $morecss = 'minwidth200') { global $langs; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e299921488b..8eae7052a74 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -423,7 +423,7 @@ class Product extends CommonObject * @param int $notrigger Disable triggers * @return int Id of product/service if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -727,7 +727,7 @@ class Product extends CommonObject * -2 ErrorBarCodeRequired * -3 ErrorBarCodeAlreadyUsed */ - function check_barcode($valuetotest,$typefortest) + function check_barcode($valuetotest, $typefortest) { // phpcs:enable global $conf; @@ -764,7 +764,7 @@ class Product extends CommonObject * @param string $action Current action for hookmanager ('add' or 'update') * @return int 1 if OK, -1 if ref already exists, -2 if other error */ - function update($id, $user, $notrigger=false, $action='update') + function update($id, $user, $notrigger = false, $action = 'update') { global $langs, $conf, $hookmanager; @@ -1056,7 +1056,7 @@ class Product extends CommonObject * @param int $notrigger Do not execute trigger * @return int < 0 if KO, 0 = Not possible, > 0 if OK */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { // Deprecation warning if ($id > 0) { @@ -1466,7 +1466,7 @@ class Product extends CommonObject * @param int $level price level to change * @return int <0 if KO, >0 if OK */ - function _log_price($user,$level=0) + function _log_price($user, $level = 0) { // phpcs:enable global $conf; @@ -1536,7 +1536,7 @@ class Product extends CommonObject * @return array Array of price information * @see get_buyprice() */ - function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp=0) + function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp = 0) { global $conf, $db; @@ -1648,7 +1648,7 @@ class Product extends CommonObject * @return int <-1 if KO, -1 if qty not enough, 0 if OK but nothing found, id_product if OK and found. May also initialize some properties like (->ref_supplier, buyprice, fourn_pu, vatrate_supplier...) * @see getSellPrice() */ - function get_buyprice($prodfournprice, $qty, $product_id=0, $fourn_ref='', $fk_soc=0) + function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref = '', $fk_soc = 0) { // phpcs:enable global $conf; @@ -1798,7 +1798,7 @@ class Product extends CommonObject * @param string $newdefaultvatcode Default vat code * @return int <0 if KO, >0 if OK */ - function updatePrice($newprice, $newpricebase, $user, $newvat='',$newminprice=0, $level=0, $newnpr=0, $newpbq=0, $ignore_autogen=0, $localtaxes_array=array(), $newdefaultvatcode='') + function updatePrice($newprice, $newpricebase, $user, $newvat = '', $newminprice = 0, $level = 0, $newnpr = 0, $newpbq = 0, $ignore_autogen = 0, $localtaxes_array = array(), $newdefaultvatcode = '') { global $conf,$langs; @@ -1980,7 +1980,7 @@ class Product extends CommonObject * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id='', $ref='', $ref_ext='', $barcode='', $ignore_expression=0) + function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -2333,7 +2333,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_propale($socid=0) + function load_stats_propale($socid = 0) { // phpcs:enable global $conf; @@ -2380,7 +2380,7 @@ class Product extends CommonObject * @param int $socid Id thirdparty * @return array Tableau des stats */ - function load_stats_proposal_supplier($socid=0) + function load_stats_proposal_supplier($socid = 0) { // phpcs:enable global $conf; @@ -2429,7 +2429,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Array of stats (nb=nb of order, qty=qty ordered) */ - function load_stats_commande($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2524,7 +2524,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_commande_fournisseur($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2572,7 +2572,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_sending($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2624,7 +2624,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_reception($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2670,7 +2670,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_contrat($socid=0) + function load_stats_contrat($socid = 0) { // phpcs:enable global $conf; @@ -2716,7 +2716,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_facture($socid=0) + function load_stats_facture($socid = 0) { // phpcs:enable global $conf; @@ -2762,7 +2762,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_facture_fournisseur($socid=0) + function load_stats_facture_fournisseur($socid = 0) { // phpcs:enable global $conf; @@ -2810,7 +2810,7 @@ class Product extends CommonObject * @param int $year Year (0=current year) * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function _get_stats($sql, $mode, $year=0) + function _get_stats($sql, $mode, $year = 0) { // phpcs:enable $resql = $this->db->query($sql); @@ -2876,7 +2876,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_vente($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -2921,7 +2921,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_achat($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -2965,7 +2965,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_propal($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -3009,7 +3009,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_propalsupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -3053,7 +3053,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_order($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf, $user; @@ -3096,7 +3096,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_ordersupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf, $user; @@ -3138,7 +3138,7 @@ class Product extends CommonObject * @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease * @return int < 0 if KO, > 0 if OK */ - function add_sousproduit($id_pere, $id_fils, $qty, $incdec=1) + function add_sousproduit($id_pere, $id_fils, $qty, $incdec = 1) { // phpcs:enable // Clean parameters @@ -3196,7 +3196,7 @@ class Product extends CommonObject * @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease * @return int < 0 if KO, > 0 if OK */ - function update_sousproduit($id_pere, $id_fils, $qty, $incdec=1) + function update_sousproduit($id_pere, $id_fils, $qty, $incdec = 1) { // phpcs:enable // Clean parameters @@ -3543,7 +3543,7 @@ class Product extends CommonObject * @param int $id_parent Id parent * @return void */ - function fetch_prod_arbo($prod, $compl_path="", $multiply=1, $level=1, $id_parent=0) + function fetch_prod_arbo($prod, $compl_path = "", $multiply = 1, $level = 1, $id_parent = 0) { // phpcs:enable global $conf,$langs; @@ -3600,7 +3600,7 @@ class Product extends CommonObject * @param int $multiply Because each sublevel must be multiplicated by parent nb * @return array $this->res */ - function get_arbo_each_prod($multiply=1) + function get_arbo_each_prod($multiply = 1) { // phpcs:enable $this->res = array(); @@ -3735,7 +3735,7 @@ class Product extends CommonObject * @param int $level Level of recursing call (start to 1) * @return array Return array(prodid=>array(0=prodid, 1=>qty, 2=> ...) */ - public function getChildsArbo($id, $firstlevelonly=0, $level=1) + public function getChildsArbo($id, $firstlevelonly = 0, $level = 1) { global $alreadyfound; @@ -3823,7 +3823,7 @@ class Product extends CommonObject * @param int $notooltip No tooltip * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -3965,7 +3965,7 @@ class Product extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; @@ -3994,7 +3994,7 @@ class Product extends CommonObject * @param int $type 0=Sell, 1=Buy, 2=Batch Number management * @return string Label of status */ - public function getLibStatut($mode=0, $type=0) + public function getLibStatut($mode = 0, $type = 0) { switch ($type) { @@ -4019,7 +4019,7 @@ class Product extends CommonObject * @param int $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch" * @return string Label of status */ - function LibStatut($status,$mode=0,$type=0) + function LibStatut($status, $mode = 0, $type = 0) { // phpcs:enable global $conf, $langs; @@ -4122,7 +4122,7 @@ class Product extends CommonObject * @param int $origin_id Origin id of element * @return int <0 if KO, >0 if OK */ - function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $inventorycode='', $origin_element='', $origin_id=null) + function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null) { // phpcs:enable if ($id_entrepot) { @@ -4170,7 +4170,7 @@ class Product extends CommonObject * @param int $origin_id Origin id of element * @return int <0 if KO, >0 if OK */ - function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $dlc='', $dluo='',$lot='', $inventorycode='', $origin_element='', $origin_id=null) + function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null) { // phpcs:enable if ($id_entrepot) { @@ -4210,7 +4210,7 @@ class Product extends CommonObject * @return int < 0 if KO, > 0 if OK * @see load_virtual_stock(), loadBatchInfo() */ - function load_stock($option='') + function load_stock($option = '') { // phpcs:enable global $conf; @@ -4477,7 +4477,7 @@ class Product extends CommonObject * @param int $nbmax Nombre maximum de photos (0=pas de max) * @return array Tableau de photos */ - function liste_photos($dir,$nbmax=0) + function liste_photos($dir, $nbmax = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -4648,7 +4648,7 @@ class Product extends CommonObject * @param string $type Barcode type (ean, isbn, ...) * @return void */ - function get_barcode($object,$type='') + function get_barcode($object, $type = '') { // phpcs:enable global $conf; @@ -4724,7 +4724,7 @@ class Product extends CommonObject * @param string $type Label type (long or short) * @return string|int <0 if ko, label if ok */ - function getLabelOfUnit($type='long') + function getLabelOfUnit($type = 'long') { global $langs; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index d16c6ccc6ec..5dd1fbbb0d4 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -70,7 +70,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -201,7 +201,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -271,7 +271,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -420,7 +420,7 @@ class Productbatch extends CommonObject * @param string $batch_number batch number for object * @return int <0 if KO, >0 if OK */ - function find($fk_product_stock=0, $eatby='',$sellby='',$batch_number='') + function find($fk_product_stock = 0, $eatby = '', $sellby = '', $batch_number = '') { global $langs; $where = array(); @@ -480,7 +480,7 @@ class Productbatch extends CommonObject * @param int $fk_product If set to a product id, get eatby and sellby from table llx_product_lot * @return array <0 if KO, array of batch */ - public static function findAll($db, $fk_product_stock, $with_qty=0, $fk_product=0) + public static function findAll($db, $fk_product_stock, $with_qty = 0, $fk_product = 0) { global $langs; $ret = array(); diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 3aeae37249c..f487a909b82 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -72,7 +72,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -228,7 +228,7 @@ class Propalmergepdfproduct extends CommonObject * @param string $lang Lang string code * @return int <0 if KO, >0 if OK */ - function fetch_by_product($product_id, $lang='') + function fetch_by_product($product_id, $lang = '') { // phpcs:enable global $langs,$conf; @@ -303,7 +303,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -440,7 +440,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete_by_product($user, $product_id, $lang_id='', $notrigger=0) + function delete_by_product($user, $product_id, $lang_id = '', $notrigger = 0) { // phpcs:enable global $conf, $langs; diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 6b73b413522..f02aa4a1fd1 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -75,7 +75,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -257,7 +257,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -317,7 +317,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { $error=0; diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index 4cd900979ab..f93b0f3d708 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -81,7 +81,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -182,7 +182,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -242,7 +242,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { $error=0; diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index c4dda3481bb..bf770ed97bf 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -93,7 +93,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -202,7 +202,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -265,7 +265,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { $error=0; @@ -569,7 +569,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_next_update($next_update, $user=0, $notrigger=0) + function update_next_update($next_update, $user = 0, $notrigger = 0) { // phpcs:enable $error=0; @@ -615,7 +615,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_status($last_status, $user=0, $notrigger=0) + function update_status($last_status, $user = 0, $notrigger = 0) { // phpcs:enable $error=0; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 076e3392bc0..691d08ec970 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -321,7 +321,7 @@ class Inventory extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -370,7 +370,7 @@ class Inventory extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -383,7 +383,7 @@ class Inventory extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/product/inventory/lib/inventory.lib.php b/htdocs/product/inventory/lib/inventory.lib.php index d6230e4f3e7..175c772cb61 100644 --- a/htdocs/product/inventory/lib/inventory.lib.php +++ b/htdocs/product/inventory/lib/inventory.lib.php @@ -64,7 +64,7 @@ function inventoryAdminPrepareHead() * * @return array Array of head */ -function inventoryPrepareHead(&$inventory, $title='Inventory', $get='') +function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '') { global $langs; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 9bc0fd8477f..454f7870bcf 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -252,7 +252,7 @@ class Entrepot extends CommonObject * @param int $notrigger 1=No trigger * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { $this->db->begin(); @@ -323,7 +323,7 @@ class Entrepot extends CommonObject * @param string $ref Warehouse label * @return int >0 if OK, <0 if KO */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -434,7 +434,7 @@ class Entrepot extends CommonObject * @param int $status Status * @return array Array list of warehouses */ - function list_array($status=1) + function list_array($status = 1) { // phpcs:enable $liste = array(); @@ -535,7 +535,7 @@ class Entrepot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -548,7 +548,7 @@ class Entrepot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -599,7 +599,7 @@ class Entrepot extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='',$showfullpath=0, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $showfullpath = 0, $notooltip = 0) { global $conf, $langs; $langs->load("stocks"); @@ -747,7 +747,7 @@ class Entrepot extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e19df0aaa1a..82fc8cb7561 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -111,7 +111,7 @@ class MouvementStock extends CommonObject * @param int $id_product_batch Id product_batch (when skip_batch is false and we already know which record of product_batch to use) * @return int <0 if KO, 0 if fk_product is null, >0 if OK */ - function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='', $datem='',$eatby='',$sellby='',$batch='',$skip_batch=false, $id_product_batch=0) + function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0) { global $conf, $langs; @@ -640,7 +640,7 @@ class MouvementStock extends CommonObject * @param string $inventorycode Inventory code * @return int <0 if KO, 0 if OK */ - function _createSubProduct($user, $idProduct, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='') + function _createSubProduct($user, $idProduct, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '') { global $langs; @@ -712,7 +712,7 @@ class MouvementStock extends CommonObject * @param int $id_product_batch Id product_batch * @return int <0 if KO, >0 if OK */ - function livraison($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $datem='', $eatby='', $sellby='', $batch='', $id_product_batch=0) + function livraison($user, $fk_product, $entrepot_id, $qty, $price = 0, $label = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $id_product_batch = 0) { global $conf; @@ -735,7 +735,7 @@ class MouvementStock extends CommonObject * @param string $batch batch number * @return int <0 if KO, >0 if OK */ - function reception($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $eatby='', $sellby='', $batch='') + function reception($user, $fk_product, $entrepot_id, $qty, $price = 0, $label = '', $eatby = '', $sellby = '', $batch = '') { return $this->_create($user, $fk_product, $entrepot_id, $qty, 3, $price, $label, '', '', $eatby, $sellby, $batch); } @@ -994,7 +994,7 @@ class MouvementStock extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; @@ -1027,7 +1027,7 @@ class MouvementStock extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($mode); } @@ -1039,7 +1039,7 @@ class MouvementStock extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($mode=0) + function LibStatut($mode = 0) { // phpcs:enable global $langs; @@ -1076,7 +1076,7 @@ class MouvementStock extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 60ce7bc02d2..287a8f9f1d6 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -485,7 +485,7 @@ class Productlot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut(0,$mode); } @@ -498,7 +498,7 @@ class Productlot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -521,7 +521,7 @@ class Productlot extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index c5c66ad8d50..9acf70a3bed 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -166,7 +166,7 @@ class ProductStockEntrepot extends CommonObject * @param int $fk_entrepot Id warehouse * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $fk_product=0, $fk_entrepot=0) + public function fetch($id, $fk_product = 0, $fk_entrepot = 0) { if(empty($id) && (empty($fk_product) || empty($fk_entrepot))) return -1; @@ -237,7 +237,7 @@ class ProductStockEntrepot extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($fk_product='', $fk_entrepot='', $sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($fk_product = '', $fk_entrepot = '', $sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -478,7 +478,7 @@ class ProductStockEntrepot extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -512,7 +512,7 @@ class ProductStockEntrepot extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -525,7 +525,7 @@ class ProductStockEntrepot extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index a1f2ce6d26c..3afccd3c129 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -215,7 +215,7 @@ class Projects extends DolibarrApi * * @url GET {id}/tasks */ - function getLines($id, $includetimespent=0) + function getLines($id, $includetimespent = 0) { if(! DolibarrApiAccess::$user->rights->projet->lire) { throw new RestException(401); @@ -258,7 +258,7 @@ class Projects extends DolibarrApi * * @return int */ - function getRoles($id, $userid=0) + function getRoles($id, $userid = 0) { global $db; @@ -503,7 +503,7 @@ class Projects extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->projet->creer) { throw new RestException(401); diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 050e7313e95..e64c9fed7a1 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -64,7 +64,7 @@ class Tasks extends DolibarrApi * * @throws RestException */ - function get($id, $includetimespent=0) + function get($id, $includetimespent = 0) { if(! DolibarrApiAccess::$user->rights->projet->lire) { throw new RestException(401); @@ -265,7 +265,7 @@ class Tasks extends DolibarrApi * * @return int */ - function getRoles($id, $userid=0) + function getRoles($id, $userid = 0) { global $db; @@ -505,7 +505,7 @@ class Tasks extends DolibarrApi * * @return array */ - function addTimeSpent($id, $date, $duration, $user_id=0, $note='') + function addTimeSpent($id, $date, $duration, $user_id = 0, $note = '') { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6cb54cfb572..454ccf446e0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -170,7 +170,7 @@ class Project extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, id of created project if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -299,7 +299,7 @@ class Project extends CommonObject * @param int $notrigger 1=Disable all triggers * @return int <=0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $langs, $conf; @@ -431,7 +431,7 @@ class Project extends CommonObject * @param string $ref Ref of project * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -515,7 +515,7 @@ class Project extends CommonObject * @param int $socid To filter on a particular third party * @return array List of projects */ - function liste_array($socid='') + function liste_array($socid = '') { // phpcs:enable global $conf; @@ -563,7 +563,7 @@ class Project extends CommonObject * @param string $projectkey Equivalent key to fk_projet for actual type * @return mixed Array list of object ids linked to project, < 0 or string if error */ - function get_element_list($type, $tablename, $datefieldname='', $dates='', $datee='', $projectkey='fk_projet') + function get_element_list($type, $tablename, $datefieldname = '', $dates = '', $datee = '', $projectkey = 'fk_projet') { // phpcs:enable $elements = array(); @@ -647,7 +647,7 @@ class Project extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if not possible, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $langs, $conf; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; @@ -811,7 +811,7 @@ class Project extends CommonObject * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { global $langs, $conf; @@ -937,7 +937,7 @@ class Project extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode); } @@ -950,7 +950,7 @@ class Project extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut, $mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -1013,7 +1013,7 @@ class Project extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='', $sep=' - ', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user, $hookmanager; @@ -1147,7 +1147,7 @@ class Project extends CommonObject * @param string $mode Type of permission we want to know: 'read', 'write' * @return int >0 if user has permission, <0 if user has no permission */ - function restrictedProjectArea($user, $mode='read') + function restrictedProjectArea($user, $mode = 'read') { // To verify role of users $userAccess = 0; @@ -1200,7 +1200,7 @@ class Project extends CommonObject * @param string $filter additionnal filter on project (statut, ref, ...) * @return array or string Array of projects id, or string with projects id separated with "," if list is 1 */ - function getProjectsAuthorizedForUser($user, $mode=0, $list=0, $socid=0, $filter='') + function getProjectsAuthorizedForUser($user, $mode = 0, $list = 0, $socid = 0, $filter = '') { $projects = array(); $temp = array(); @@ -1300,7 +1300,7 @@ class Project extends CommonObject * @param int $newthirdpartyid New thirdparty id * @return int New id of clone */ - function createFromClone($fromid,$clone_contact=false,$clone_task=true,$clone_project_file=false,$clone_task_file=false,$clone_note=true,$move_date=true,$notrigger=0,$newthirdpartyid=0) + function createFromClone($fromid, $clone_contact = false, $clone_task = true, $clone_project_file = false, $clone_task_file = false, $clone_note = true, $move_date = true, $notrigger = 0, $newthirdpartyid = 0) { global $user,$langs,$conf; @@ -1693,7 +1693,7 @@ class Project extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; @@ -1725,7 +1725,7 @@ class Project extends CommonObject * @param int $userid Time spent by a particular user * @return int <0 if OK, >0 if KO */ - public function loadTimeSpent($datestart, $taskid=0, $userid=0) + public function loadTimeSpent($datestart, $taskid = 0, $userid = 0) { $error=0; diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index ae30ac43dae..5f771574dc7 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -193,7 +193,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -222,7 +222,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; @@ -253,7 +253,7 @@ class ProjectStats extends Stats * @param int $wonlostfilter Add a filter on status won/lost * @return array Array of values */ - function getWeightedAmountByMonthWithPrevYear($endyear,$startyear,$cachedelay=0,$wonlostfilter=1) + function getWeightedAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $wonlostfilter = 1) { global $conf,$user,$langs; @@ -346,7 +346,7 @@ class ProjectStats extends Stats * @param int $wonlostfilter Add a filter on status won/lost * @return array Array with amount by month */ - function getWeightedAmountByMonth($year, $wonlostfilter=1) + function getWeightedAmountByMonth($year, $wonlostfilter = 1) { global $user; @@ -456,7 +456,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getTransformRateByMonth($year, $format=0) + function getTransformRateByMonth($year, $format = 0) { global $user; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 49e0c34a0dc..b7fd084e2fd 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -132,7 +132,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -231,7 +231,7 @@ class Task extends CommonObject * @param int $loadparentdata Also load parent data * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id, $ref='', $loadparentdata=0) + function fetch($id, $ref = '', $loadparentdata = 0) { global $langs, $conf; @@ -333,7 +333,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -444,7 +444,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; @@ -643,7 +643,7 @@ class Task extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='',$mode='task', $addlabel=0, $sep=' - ', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $mode = 'task', $addlabel = 0, $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -731,7 +731,7 @@ class Task extends CommonObject * @param string $filterontaskuser Filter on user assigned to task * @return array Array of tasks */ - function getTasksArray($usert=null, $userp=null, $projectid=0, $socid=0, $mode=0, $filteronproj='', $filteronprojstatus='-1', $morewherefilter='',$filteronprojuser=0,$filterontaskuser=0) + function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0) { global $conf; @@ -890,7 +890,7 @@ class Task extends CommonObject * @param integer $filteronprojstatus Filter on project status if userp is set. Not used if userp not defined. * @return array Array (projectid => 'list of roles for project' or taskid => 'list of roles for task') */ - function getUserRolesForProjectsOrTasks($userp, $usert, $projectid='', $taskid=0, $filteronprojstatus=-1) + function getUserRolesForProjectsOrTasks($userp, $usert, $projectid = '', $taskid = 0, $filteronprojstatus = -1) { $arrayroles = array(); @@ -967,7 +967,7 @@ class Task extends CommonObject * @param string $source Source * @return array Array of id of contacts */ - function getListContactId($source='internal') + function getListContactId($source = 'internal') { $contactAlreadySelected = array(); $tab = $this->liste_contact(-1,$source); @@ -991,7 +991,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function addTimeSpent($user, $notrigger=0) + function addTimeSpent($user, $notrigger = 0) { global $conf,$langs; @@ -1096,7 +1096,7 @@ class Task extends CommonObject * @param string $morewherefilter Add more filter into where SQL request (must start with ' AND ...') * @return array Array of info for task array('min_date', 'max_date', 'total_duration', 'total_amount', 'nblines', 'nblinesnull') */ - function getSummaryOfTimeSpent($userobj=null, $morewherefilter='') + function getSummaryOfTimeSpent($userobj = null, $morewherefilter = '') { global $langs; @@ -1159,7 +1159,7 @@ class Task extends CommonObject * @param string $datee End date (ex 23:59:59) * @return array Array of info for task array('amount','nbseconds','nblinesnull') */ - function getSumOfAmount($fuser='', $dates='', $datee='') + function getSumOfAmount($fuser = '', $dates = '', $datee = '') { global $langs; @@ -1266,7 +1266,7 @@ class Task extends CommonObject * @param string $morewherefilter Add more filter into where SQL request (must start with ' AND ...') * @return int <0 if KO, array of time spent if OK */ - function fetchAllTimeSpent(User $userobj, $morewherefilter='') + function fetchAllTimeSpent(User $userobj, $morewherefilter = '') { global $langs; @@ -1356,7 +1356,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function updateTimeSpent($user, $notrigger=0) + function updateTimeSpent($user, $notrigger = 0) { global $conf,$langs; @@ -1441,7 +1441,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delTimeSpent($user, $notrigger=0) + function delTimeSpent($user, $notrigger = 0) { global $conf, $langs; @@ -1516,7 +1516,7 @@ class Task extends CommonObject * @param bool $clone_prog clone progress of project * @return int New id of clone */ - function createFromClone($fromid,$project_id,$parent_task_id,$clone_change_dt=false,$clone_affectation=false,$clone_time=false,$clone_file=false,$clone_note=false,$clone_prog=false) + function createFromClone($fromid, $project_id, $parent_task_id, $clone_change_dt = false, $clone_affectation = false, $clone_time = false, $clone_file = false, $clone_note = false, $clone_prog = false) { global $user,$langs,$conf; @@ -1743,7 +1743,7 @@ class Task extends CommonObject * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->fk_statut, $mode); } @@ -1756,7 +1756,7 @@ class Task extends CommonObject * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut, $mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable // list of Statut of the task @@ -1844,7 +1844,7 @@ class Task extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php index 4164c1427b6..c71a2ea0746 100644 --- a/htdocs/projet/class/taskstats.class.php +++ b/htdocs/projet/class/taskstats.class.php @@ -166,7 +166,7 @@ class TaskStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php index dc76e098b59..c1c38e1ae66 100644 --- a/htdocs/projet/ganttchart.inc.php +++ b/htdocs/projet/ganttchart.inc.php @@ -168,7 +168,7 @@ else * @param int $project_id Id of project * @return void */ -function constructGanttLine($tarr, $task, $task_dependencies, $level=0, $project_id=null) +function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $project_id = null) { global $langs; global $dateformatinput2; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 79485ee9820..669c64877ba 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -91,7 +91,7 @@ $user->loadDefaultValues(); * @param array $arrayofcss Array of complementary css files * @return void */ -function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { global $user, $conf, $langs, $mysoc; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 4cddbb1134e..8f3c45b3128 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -176,7 +176,7 @@ class Reception extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si erreur, id reception creee si ok */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $hookmanager; @@ -358,7 +358,7 @@ class Reception extends CommonObject * @param string $ref_int Internal reference of other object * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { global $conf; @@ -488,7 +488,7 @@ class Reception extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if OK, >0 if KO */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { global $conf, $langs; @@ -712,7 +712,7 @@ class Reception extends CommonObject * @param string $batch Lot number * @return int <0 if KO, >0 if OK */ - function addline($entrepot_id, $id, $qty, $array_options=0, $comment='', $eatby='', $sellby='', $batch='') + function addline($entrepot_id, $id, $qty, $array_options = 0, $comment = '', $eatby = '', $sellby = '', $batch = '') { global $conf, $langs, $user; @@ -763,7 +763,7 @@ class Reception extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf; $error=0; @@ -1082,7 +1082,7 @@ class Reception extends CommonObject * @param int $notooltip 1=No tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$option=0,$max=0,$short=0,$notooltip=0) + function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0) { global $langs; $result=''; @@ -1123,7 +1123,7 @@ class Reception extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1136,7 +1136,7 @@ class Reception extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1322,7 +1322,7 @@ class Reception extends CommonObject * @param int $id only this carrier, all if none * @return void */ - function list_delivery_methods($id='') + function list_delivery_methods($id = '') { // phpcs:enable global $langs; @@ -1359,7 +1359,7 @@ class Reception extends CommonObject * * @return void */ - function update_delivery_method($id='') + function update_delivery_method($id = '') { // phpcs:enable if ($id=='') @@ -1422,7 +1422,7 @@ class Reception extends CommonObject * @param string $value Value * @return void */ - function getUrlTrackingStatus($value='') + function getUrlTrackingStatus($value = '') { if (! empty($this->shipping_method_id)) { @@ -1935,7 +1935,7 @@ class Reception extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 3f60a9846fb..9a25d5944d1 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -52,7 +52,7 @@ class ReceptionStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index ec184cd856d..6cc403b9ade 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -77,7 +77,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -181,7 +181,7 @@ class Dolresource extends CommonObject * @param string $ref Ref of object * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; $sql = "SELECT"; @@ -242,7 +242,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -405,7 +405,7 @@ class Dolresource extends CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete($rowid, $notrigger=0) + function delete($rowid, $notrigger = 0) { global $user,$langs,$conf; @@ -495,7 +495,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all($sortorder, $sortfield, $limit, $offset, $filter='') + function fetch_all($sortorder, $sortfield, $limit, $offset, $filter = '') { // phpcs:enable global $conf; @@ -592,7 +592,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter='') + function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter = '') { // phpcs:enable global $conf; @@ -670,7 +670,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all_used($sortorder, $sortfield, $limit, $offset=1, $filter='') + function fetch_all_used($sortorder, $sortfield, $limit, $offset = 1, $filter = '') { // phpcs:enable global $conf; @@ -769,7 +769,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_element_resource($user=null, $notrigger=0) + function update_element_resource($user = null, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -839,7 +839,7 @@ class Dolresource extends CommonObject * @param string $resource_type Type * @return array Aray of resources */ - function getElementResources($element,$element_id,$resource_type='') + function getElementResources($element, $element_id, $resource_type = '') { // Links beetween objects are stored in this table $sql = 'SELECT rowid, resource_id, resource_type, busy, mandatory'; @@ -878,7 +878,7 @@ class Dolresource extends CommonObject * * @return int */ - function fetchElementResources($element,$element_id) + function fetchElementResources($element, $element_id) { $resources = $this->getElementResources($element,$element_id); $i=0; @@ -941,7 +941,7 @@ class Dolresource extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$option='', $get_params='', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0) { global $langs; @@ -973,7 +973,7 @@ class Dolresource extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -986,7 +986,7 @@ class Dolresource extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index c118643aa7d..6d641aedce7 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -75,7 +75,7 @@ class FormResource * @param int $limit Limit number of answers * @return string HTML string with */ - function select_resource_list($selected='',$htmlname='fk_resource',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array(), $filterkey='', $outputmode=0, $limit=20) + function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20) { // phpcs:enable global $conf,$user,$langs; @@ -168,7 +168,7 @@ class FormResource * @param int $maxlength Max length of label * @return void */ - function select_types_resource($selected='',$htmlname='type_resource',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0) + function select_types_resource($selected = '', $htmlname = 'type_resource', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0) { // phpcs:enable global $langs,$user; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index ffcd7c7a00f..3b2fd88c6c6 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -61,7 +61,7 @@ abstract class ActionsCardCommon * @param ref $ref Object ref * @return object Object loaded */ - protected function getObject($id,$ref='') + protected function getObject($id, $ref = '') { //$ret = $this->getInstanceDao(); @@ -79,7 +79,7 @@ abstract class ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs, $user, $mysoc, $canvas; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index c8b1a296e24..5184fa36264 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -76,7 +76,7 @@ class ActionsCardCompany extends ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs, $user, $mysoc; @@ -215,7 +215,7 @@ class ActionsCardCompany extends ActionsCardCommon * @param string $dbt_select Field name for select if not rowid. (optional) * @return int 1 */ - function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index 6107d8ac8b1..842cc096a71 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -93,7 +93,7 @@ class ActionsCardIndividual extends ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs; @@ -132,7 +132,7 @@ class ActionsCardIndividual extends ActionsCardCommon * @param string $dbt_select Field name for select if not rowid. (optional) * @return int 1 */ - function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index b381e7cf8a2..90ec5911dd0 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -85,7 +85,7 @@ class Address * @param User $user Object user making creation * @return int 0 if OK, < 0 if KO */ - function create($socid, $user='') + function create($socid, $user = '') { global $langs,$conf; @@ -175,7 +175,7 @@ class Address * @param User $user Utilisateur qui demande la mise a jour * @return int <0 if KO, >=0 if OK */ - function update($id, $socid, $user='') + function update($id, $socid, $user = '') { global $langs; @@ -251,7 +251,7 @@ class Address * @param User $user Objet de l'utilisateur * @return int >0 si ok, <0 si ko */ - function fetch_lines($socid, $user=null) + function fetch_lines($socid, $user = null) { // phpcs:enable global $langs, $conf; @@ -346,7 +346,7 @@ class Address * @param User $user Objet de l'utilisateur * @return int >0 si ok, <0 si ko */ - function fetch_address($id, $user=null) + function fetch_address($id, $user = null) { // phpcs:enable global $langs; @@ -415,7 +415,7 @@ class Address * @param int $socid id third party * @return <0 KO >0 OK */ - function delete($id,$socid) + function delete($id, $socid) { dol_syslog("Address::Delete"); @@ -440,7 +440,7 @@ class Address * @param string $option Where the link point to * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 50d9710be40..08d61651e68 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -117,7 +117,7 @@ class Thirdparties extends DolibarrApi * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.nom:like:'TheCompany%') and (t.date_creation:<:'20160101')" * @return array Array of thirdparty objects */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $mode=0, $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $sqlfilters = '') { global $db, $conf; @@ -739,7 +739,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingProposals($id, $mode='customer') + function getOutStandingProposals($id, $mode = 'customer') { $obj_ret = array(); @@ -783,7 +783,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingOrder($id, $mode='customer') + function getOutStandingOrder($id, $mode = 'customer') { $obj_ret = array(); @@ -826,7 +826,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingInvoices($id, $mode='customer') + function getOutStandingInvoices($id, $mode = 'customer') { $obj_ret = array(); @@ -872,7 +872,7 @@ class Thirdparties extends DolibarrApi * @throws 404 * @throws 503 */ - function getFixedAmountDiscounts($id, $filter="none", $sortfield = "f.type", $sortorder = 'ASC') + function getFixedAmountDiscounts($id, $filter = "none", $sortfield = "f.type", $sortorder = 'ASC') { $obj_ret = array(); @@ -1281,7 +1281,7 @@ class Thirdparties extends DolibarrApi * * @url GET {id}/gateways/ */ - function getSocieteAccounts($id, $site=null) + function getSocieteAccounts($id, $site = null) { global $db, $conf; diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 39a90c43eb9..fb1110e52ac 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -98,7 +98,7 @@ class Client extends Societe * @param int $active 1=Active only, 0=Not active only, -1=All * @return int <0 if KO, >0 if OK */ - function loadCacheOfProspStatus($active=1) + function loadCacheOfProspStatus($active = 1) { global $langs; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 2891724ac7e..bd41e5edad7 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -67,7 +67,7 @@ class CompanyBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user = null, $notrigger=0) + function create(User $user = null, $notrigger = 0) { $now = dol_now(); $error = 0; @@ -201,7 +201,7 @@ class CompanyBankAccount extends Account * @param int $type If id of company filled, we say if we want record of this type only * @return int <0 if KO, >0 if OK */ - function fetch($id, $socid=0, $default=1, $type='ban') + function fetch($id, $socid = 0, $default = 1, $type = 'ban') { if (empty($id) && empty($socid)) return -1; @@ -263,7 +263,7 @@ class CompanyBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >0 if OK */ - function delete(User $user = null, $notrigger=0) + function delete(User $user = null, $notrigger = 0) { global $conf; @@ -333,7 +333,7 @@ class CompanyBankAccount extends Account * @param int $rib RIB id * @return int 0 if KO, 1 if OK */ - function setAsDefault($rib=0) + function setAsDefault($rib = 0) { $sql1 = "SELECT rowid as id, fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; $sql1.= " WHERE rowid = ".($rib?$rib:$this->id); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 3594773e7f8..9b41d666cdf 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -349,7 +349,7 @@ class CompanyPaymentMode extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -407,7 +407,7 @@ class CompanyPaymentMode extends CommonObject * @param string $alltypes 1=The default is for all payment types instead of per type * @return int 0 if KO, 1 if OK */ - function setAsDefault($id=0, $alltypes=0) + function setAsDefault($id = 0, $alltypes = 0) { $sql1 = "SELECT rowid as id, fk_soc, type FROM ".MAIN_DB_PREFIX."societe_rib"; $sql1.= " WHERE rowid = ".($id?$id:$this->id); @@ -467,7 +467,7 @@ class CompanyPaymentMode extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -480,7 +480,7 @@ class CompanyPaymentMode extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1e152331aff..0c68562cb75 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -812,7 +812,7 @@ class Societe extends CommonObject * @param int $nosyncmember Do not synchronize info of linked member * @return int <0 if KO, >=0 if OK */ - function update($id, $user='', $call_trigger=1, $allowmodcodeclient=0, $allowmodcodefournisseur=0, $action='update', $nosyncmember=1) + function update($id, $user = '', $call_trigger = 1, $allowmodcodeclient = 0, $allowmodcodefournisseur = 0, $action = 'update', $nosyncmember = 1) { global $langs,$conf,$hookmanager; @@ -1224,7 +1224,7 @@ class Societe extends CommonObject * @param string $ref_alias Name_alias of third party (Warning, this can return several records) * @return int >0 if OK, <0 if KO or if two records found for same ref or idprof, 0 if not found. */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='',$idprof5='',$idprof6='', $email='', $ref_alias='') + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $idprof1 = '', $idprof2 = '', $idprof3 = '', $idprof4 = '', $idprof5 = '', $idprof6 = '', $email = '', $ref_alias = '') { global $langs; global $conf; @@ -1449,7 +1449,7 @@ class Societe extends CommonObject * @param int $call_trigger 0=No, 1=yes * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function delete($id, User $fuser=null, $call_trigger=1) + function delete($id, User $fuser = null, $call_trigger = 1) { global $langs, $conf, $user; @@ -1745,7 +1745,7 @@ class Societe extends CommonObject * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, id of discount record if OK */ - function set_remise_except($remise, User $user, $desc, $tva_tx=0, $discount_type=0) + function set_remise_except($remise, User $user, $desc, $tva_tx = 0, $discount_type = 0) { // phpcs:enable global $langs; @@ -1805,7 +1805,7 @@ class Societe extends CommonObject * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, Credit note amount otherwise */ - function getAvailableDiscounts($user='',$filter='',$maxvalue=0,$discount_type=0) + function getAvailableDiscounts($user = '', $filter = '', $maxvalue = 0, $discount_type = 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -1829,7 +1829,7 @@ class Societe extends CommonObject * @param int $mode 0=Array with properties, 1=Array of id. * @return array Array of sales representatives of third party */ - function getSalesRepresentatives(User $user, $mode=0) + function getSalesRepresentatives(User $user, $mode = 0) { global $conf; @@ -2000,7 +2000,7 @@ class Societe extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $hookmanager; @@ -2195,7 +2195,7 @@ class Societe extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -2208,7 +2208,7 @@ class Societe extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -2258,7 +2258,7 @@ class Societe extends CommonObject * @param int $addthirdparty 1=Add also a record for thirdparty email * @return array Array of contacts emails */ - function thirdparty_and_contact_email_array($addthirdparty=0) + function thirdparty_and_contact_email_array($addthirdparty = 0) { // phpcs:enable global $langs; @@ -2303,7 +2303,7 @@ class Societe extends CommonObject * @param int $hidedisabled 1=Hide contact if disabled * @return array Array of contacts emails or mobile. Example: array(id=>'Name <email>') */ - function contact_property_array($mode='email', $hidedisabled=0) + function contact_property_array($mode = 'email', $hidedisabled = 0) { // phpcs:enable global $langs; @@ -2444,7 +2444,7 @@ class Societe extends CommonObject * @param string $mode 'email' or 'mobile' * @return string Email of contact with format: "Full name <email>" */ - function contact_get_property($rowid,$mode) + function contact_get_property($rowid, $mode) { // phpcs:enable $contact_property=''; @@ -2483,7 +2483,7 @@ class Societe extends CommonObject * @param string $mode 'label' or 'rum' or 'format' * @return string Bank number */ - function display_rib($mode='label') + function display_rib($mode = 'label') { // phpcs:enable require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; @@ -2553,7 +2553,7 @@ class Societe extends CommonObject * @param int $type Should be 0 to say customer * @return void */ - function get_codeclient($objsoc=0,$type=0) + function get_codeclient($objsoc = 0, $type = 0) { // phpcs:enable global $conf; @@ -2585,7 +2585,7 @@ class Societe extends CommonObject * @param int $type Should be 1 to say supplier * @return void */ - function get_codefournisseur($objsoc=0,$type=1) + function get_codefournisseur($objsoc = 0, $type = 1) { // phpcs:enable global $conf; @@ -2884,7 +2884,7 @@ class Societe extends CommonObject * @param int $socid Id of thirdparty to exclude (if update) * @return boolean True if exists, False if not */ - function id_prof_exists($idprof, $value, $socid=0) + function id_prof_exists($idprof, $value, $socid = 0) { // phpcs:enable $field = $idprof; @@ -2944,7 +2944,7 @@ class Societe extends CommonObject * @return int <=0 if KO, >0 if OK * TODO better to have this in a lib than into a business class */ - function id_prof_check($idprof,$soc) + function id_prof_check($idprof, $soc) { // phpcs:enable global $conf; @@ -3095,7 +3095,7 @@ class Societe extends CommonObject * @return string Url or empty string if no URL known * TODO better in a lib than into business class */ - function id_prof_url($idprof,$thirdparty) + function id_prof_url($idprof, $thirdparty) { // phpcs:enable global $conf,$langs,$hookmanager; @@ -3310,7 +3310,7 @@ class Societe extends CommonObject * @param string $customercode Customer code * @return int <0 if KO, id of created account if OK */ - function create_from_member(Adherent $member, $socname='', $socalias='', $customercode='') + function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '') { // phpcs:enable global $user,$langs; @@ -3508,7 +3508,7 @@ class Societe extends CommonObject * @param int $localTaxNum To get info for only localtax1 or localtax2 * @return boolean true or false */ - function useLocalTax($localTaxNum=0) + function useLocalTax($localTaxNum = 0) { $sql = "SELECT t.localtax1, t.localtax2"; $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; @@ -3627,7 +3627,7 @@ class Societe extends CommonObject * @param string $label Label to use for status for added status * @return string Libelle */ - function getLibProspCommStatut($mode=0, $label='') + function getLibProspCommStatut($mode = 0, $label = '') { return $this->LibProspCommStatut($this->stcomm_id, $mode, $label); } @@ -3641,7 +3641,7 @@ class Societe extends CommonObject * @param string $label Label to use for status for added status * @return string Libelle du statut */ - function LibProspCommStatut($statut, $mode=0, $label='') + function LibProspCommStatut($statut, $mode = 0, $label = '') { // phpcs:enable global $langs; @@ -3707,7 +3707,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingProposals($mode='customer') + function getOutstandingProposals($mode = 'customer') { $table='propal'; if ($mode == 'supplier') $table = 'supplier_proposal'; @@ -3747,7 +3747,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingOrders($mode='customer') + function getOutstandingOrders($mode = 'customer') { $table='commande'; if ($mode == 'supplier') $table = 'commande_fournisseur'; @@ -3787,7 +3787,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingBills($mode='customer') + function getOutstandingBills($mode = 'customer') { $table='facture'; if ($mode == 'supplier') $table = 'facture_fourn'; @@ -3942,7 +3942,7 @@ class Societe extends CommonObject * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$user,$langs; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 153959938e5..a1a713d334c 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -288,7 +288,7 @@ class SocieteAccount extends CommonObject * @param int $status Status (0=test, 1=live) * @return string Stripe customer ref 'cu_xxxxxxxxxxxxx' or '' */ - public function getCustomerAccount($id, $site, $status=0) + public function getCustomerAccount($id, $site, $status = 0) { $sql = "SELECT sa.key_account as key_account, sa.entity"; $sql.= " FROM " . MAIN_DB_PREFIX . "societe_account as sa"; @@ -348,7 +348,7 @@ class SocieteAccount extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -407,7 +407,7 @@ class SocieteAccount extends CommonObject * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { return 'todo'; } @@ -418,7 +418,7 @@ class SocieteAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -431,7 +431,7 @@ class SocieteAccount extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index d8e7168e5c0..55d989a7075 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -80,7 +80,7 @@ class Stripe extends CommonObject * @param string $mode 'StripeTest' or 'StripeLive' * @return string Stripe account 'acc_....' or '' if no OAuth token found */ - public function getStripeAccount($mode='StripeTest') + public function getStripeAccount($mode = 'StripeTest') { global $conf; @@ -120,7 +120,7 @@ class Stripe extends CommonObject * @param int $status Status * @return string Stripe customer ref 'cu_xxxxxxxxxxxxx' or '' */ - public function getStripeCustomerAccount($id, $status=0) + public function getStripeCustomerAccount($id, $status = 0) { include_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; $societeaccount = new SocieteAccount($this->db); @@ -137,7 +137,7 @@ class Stripe extends CommonObject * @param int $createifnotlinkedtostripe 1=Create the stripe customer and the link if the thirdparty is not yet linked to a stripe customer * @return \Stripe\StripeCustomer|null Stripe Customer or null if not found */ - public function customerStripe(Societe $object, $key='', $status=0, $createifnotlinkedtostripe=0) + public function customerStripe(Societe $object, $key = '', $status = 0, $createifnotlinkedtostripe = 0) { global $conf, $user; @@ -248,7 +248,7 @@ class Stripe extends CommonObject * @param int $createifnotlinkedtostripe 1=Create the stripe card and the link if the card is not yet linked to a stripe card * @return \Stripe\StripeCard|null Stripe Card or null if not found */ - public function cardStripe($cu, CompanyPaymentMode $object, $stripeacc='', $status=0, $createifnotlinkedtostripe=0) + public function cardStripe($cu, CompanyPaymentMode $object, $stripeacc = '', $status = 0, $createifnotlinkedtostripe = 0) { global $conf, $user; @@ -358,7 +358,7 @@ class Stripe extends CommonObject * @param boolean $capture Set capture flag to true (take payment) or false (wait) * @return Stripe */ - public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status=0, $usethirdpartyemailforreceiptemail=0, $capture=true) + public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status = 0, $usethirdpartyemailforreceiptemail = 0, $capture = true) { global $conf; diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index fbafd47c3ab..bafa83c21cf 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -60,7 +60,7 @@ function stripeadmin_prepare_head() * @param string $ref Ref of object * @return string Url string */ -function showStripePaymentUrl($type,$ref) +function showStripePaymentUrl($type, $ref) { global $conf, $langs; @@ -87,7 +87,7 @@ function showStripePaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getStripePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_free_tag') +function getStripePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -140,7 +140,7 @@ function getStripePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f * @param Translate $langs Output language * @return void */ -function html_print_stripe_footer($fromcompany,$langs) +function html_print_stripe_footer($fromcompany, $langs) { global $conf; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a32b973d00a..4582d2582b0 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -211,7 +211,7 @@ class SupplierProposal extends CommonObject * @param int $socid Id third party * @param int $supplier_proposalid Id supplier_proposal */ - function __construct($db, $socid="", $supplier_proposalid=0) + function __construct($db, $socid = "", $supplier_proposalid = 0) { global $conf,$langs; @@ -237,7 +237,7 @@ class SupplierProposal extends CommonObject * TODO Remplacer les appels a cette fonction par generation objet Ligne * insere dans tableau $this->products */ - function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent = 0) { // phpcs:enable global $conf, $mysoc; @@ -394,7 +394,7 @@ class SupplierProposal extends CommonObject * * @see add_product */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_supplier='', $fk_unit='', $origin='', $origin_id=0, $pu_ht_devise=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $pu_ttc = 0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $array_option = 0, $ref_supplier = '', $fk_unit = '', $origin = '', $origin_id = 0, $pu_ht_devise = 0) { global $mysoc, $conf; @@ -656,7 +656,7 @@ class SupplierProposal extends CommonObject * @param int $fk_unit Id of the unit to use. * @return int 0 if OK, <0 if KO */ - function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_supplier='', $fk_unit='') + function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $array_option = 0, $ref_supplier = '', $fk_unit = '') { global $conf,$user,$langs, $mysoc; @@ -841,7 +841,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $langs, $conf, $mysoc, $hookmanager; $error=0; @@ -1119,7 +1119,7 @@ class SupplierProposal extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$langs,$conf,$hookmanager; @@ -1214,7 +1214,7 @@ class SupplierProposal extends CommonObject * @param string $ref Ref of proposal * @return int >0 if OK, <0 if KO */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { global $conf; @@ -1424,7 +1424,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1643,7 +1643,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $statut, $note='', $notrigger=0) + function reopen($user, $statut, $note = '', $notrigger = 0) { global $langs,$conf; @@ -1912,7 +1912,7 @@ class SupplierProposal extends CommonObject * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datec', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC') { // phpcs:enable global $conf,$user; @@ -1983,7 +1983,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2156,7 +2156,7 @@ class SupplierProposal extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -2169,7 +2169,7 @@ class SupplierProposal extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=1) + function LibStatut($statut, $mode = 1) { // phpcs:enable // Init/load array of translation of status @@ -2214,7 +2214,7 @@ class SupplierProposal extends CommonObject * @param int $mode "opened" for askprice to close, "signed" for proposal to invoice * @return int <0 if KO, >0 if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $user, $langs; @@ -2480,7 +2480,7 @@ class SupplierProposal extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; @@ -2638,7 +2638,7 @@ class SupplierProposal extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $langs; @@ -2941,7 +2941,7 @@ class SupplierProposalLine extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0) + function insert($notrigger = 0) { global $conf,$langs,$user; @@ -3126,7 +3126,7 @@ class SupplierProposalLine extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function update($notrigger=0) + function update($notrigger = 0) { global $conf,$langs,$user; diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index c1cf83097b6..9b975db5dc3 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -201,7 +201,7 @@ function conf($dolibarr_main_document_root) * @param string $action Action code * @return void */ -function pHeader($soutitre,$next,$action='none') +function pHeader($soutitre, $next, $action = 'none') { global $conf; global $langs; @@ -241,7 +241,7 @@ function pHeader($soutitre,$next,$action='none') * @param string $setuplang Language code * @return void */ -function pFooter($nonext=0,$setuplang='') +function pFooter($nonext = 0, $setuplang = '') { global $langs; $langs->load("main"); diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index e67cd7a313c..b4a106d48e5 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -109,7 +109,7 @@ class ActionsTicket * @param Ticket $object Object Ticket * @return int 0 */ - public function doActions(&$action = '', Ticket $object=null) + public function doActions(&$action = '', Ticket $object = null) { global $conf, $user, $langs, $mysoc; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 43002f30f99..28ba0ce4938 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1329,7 +1329,7 @@ class Ticket extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2c189ad07d1..8a7c778ad0e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -219,7 +219,7 @@ class User extends CommonObject * @param int $entity If a value is >= 0, we force the search on a specific entity. If -1, means search depens on default setup. * @return int <0 if KO, 0 not found, >0 if OK */ - function fetch($id='', $login='', $sid='', $loadpersonalconf=0, $entity=-1) + function fetch($id = '', $login = '', $sid = '', $loadpersonalconf = 0, $entity = -1) { global $conf, $user; @@ -501,7 +501,7 @@ class User extends CommonObject * @return int > 0 if OK, < 0 if KO * @see clearrights, delrights, getrights */ - function addrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0) + function addrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { global $conf, $user, $langs; @@ -627,7 +627,7 @@ class User extends CommonObject * @return int > 0 if OK, < 0 if OK * @see clearrights, addrights, getrights */ - function delrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0) + function delrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { global $conf, $user, $langs; @@ -762,7 +762,7 @@ class User extends CommonObject * @return void * @see clearrights, delrights, addrights */ - function getrights($moduletag='', $forcereload=0) + function getrights($moduletag = '', $forcereload = 0) { global $conf; @@ -1102,7 +1102,7 @@ class User extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int <0 if KO, id of created user if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; global $mysoc; @@ -1236,7 +1236,7 @@ class User extends CommonObject * @param string $password Password to force * @return int <0 if error, if OK returns id of created user */ - function create_from_contact($contact,$login='',$password='') + function create_from_contact($contact, $login = '', $password = '') { // phpcs:enable global $conf,$user,$langs; @@ -1316,7 +1316,7 @@ class User extends CommonObject * @param string $login Login to force * @return int <0 if KO, if OK, return id of created account */ - function create_from_member($member,$login='') + function create_from_member($member, $login = '') { // phpcs:enable global $conf,$user,$langs; @@ -1438,7 +1438,7 @@ class User extends CommonObject * @param int $nosynccontact 0=Synchronize linked contact, 1=Do not synchronize linked contact * @return int <0 si KO, >=0 si OK */ - function update($user, $notrigger=0, $nosyncmember=0, $nosyncmemberpass=0, $nosynccontact=0) + function update($user, $notrigger = 0, $nosyncmember = 0, $nosyncmemberpass = 0, $nosynccontact = 0) { global $conf, $langs; @@ -1777,7 +1777,7 @@ class User extends CommonObject * @param int $nosyncmember Do not synchronize linked member * @return string If OK return clear password, 0 if no change, < 0 if error */ - function setPassword($user, $password='', $changelater=0, $notrigger=0, $nosyncmember=0) + function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT .'/core/lib/security2.lib.php'; @@ -1909,7 +1909,7 @@ class User extends CommonObject * @param int $changelater 0=Send clear passwod into email, 1=Change password only after clicking on confirm email. @TODO Add method 2 = Send link to reset password * @return int < 0 si erreur, > 0 si ok */ - function send_password($user, $password='', $changelater=0) + function send_password($user, $password = '', $changelater = 0) { // phpcs:enable global $conf, $langs; @@ -2102,7 +2102,7 @@ class User extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function SetInGroup($group, $entity, $notrigger=0) + function SetInGroup($group, $entity, $notrigger = 0) { // phpcs:enable global $conf, $langs, $user; @@ -2164,7 +2164,7 @@ class User extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function RemoveFromGroup($group, $entity, $notrigger=0) + function RemoveFromGroup($group, $entity, $notrigger = 0) { // phpcs:enable global $conf,$langs,$user; @@ -2224,7 +2224,7 @@ class User extends CommonObject * @param string $imagesize 'mini', 'small' or '' (original) * @return string String with URL link */ - function getPhotoUrl($width, $height, $cssclass='', $imagesize='') + function getPhotoUrl($width, $height, $cssclass = '', $imagesize = '') { $result ='<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">'; $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass, $imagesize); @@ -2248,7 +2248,7 @@ class User extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpictoimg = 0, $option = '', $infologin = 0, $notooltip = 0, $maxlen = 24, $hidethirdpartylogo = 0, $mode = '', $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db, $hookmanager, $user; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -2385,7 +2385,7 @@ class User extends CommonObject * @param string $option Sur quoi pointe le lien * @return string Chaine avec URL */ - function getLoginUrl($withpicto=0,$option='') + function getLoginUrl($withpicto = 0, $option = '') { global $langs, $user; @@ -2422,7 +2422,7 @@ class User extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -2435,7 +2435,7 @@ class User extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -2484,7 +2484,7 @@ class User extends CommonObject * 2=Return key only (RDN) (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -2735,7 +2735,7 @@ class User extends CommonObject * @param int $admin Filter on admin tag * @return int Number of users */ - function getNbOfUsers($limitTo, $option='', $admin=-1) + function getNbOfUsers($limitTo, $option = '', $admin = -1) { global $conf; @@ -2891,7 +2891,7 @@ class User extends CommonObject * @param string $filter SQL filter on users * @return array Array of users $this->users. Note: $this->parentof is also set. */ - function get_full_tree($deleteafterid=0, $filter='') + function get_full_tree($deleteafterid = 0, $filter = '') { // phpcs:enable global $conf, $user; @@ -2993,7 +2993,7 @@ class User extends CommonObject * @return array Array of user id lower than user (all levels under user). This overwrite this->users. * @see get_children */ - function getAllChildIds($addcurrentuser=0) + function getAllChildIds($addcurrentuser = 0) { $childids=array(); @@ -3031,7 +3031,7 @@ class User extends CommonObject * @param int $protection Deep counter to avoid infinite loop (no more required, a protection is added with array useridfound) * @return int < 0 if KO (infinit loop), >= 0 if OK */ - function build_path_from_id_user($id_user,$protection=0) + function build_path_from_id_user($id_user, $protection = 0) { // phpcs:enable dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG); @@ -3134,7 +3134,7 @@ class User extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -3166,7 +3166,7 @@ class User extends CommonObject * @param string $mode 'email' or 'mobile' * @return string Email of user with format: "Full name <email>" */ - function user_get_property($rowid,$mode) + function user_get_property($rowid, $mode) { // phpcs:enable $user_property=''; @@ -3208,7 +3208,7 @@ class User extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return int <0 if KO, >0 if OK */ - function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter=array(), $filtermode='AND') + function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array(), $filtermode = 'AND') { global $conf; diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index 7870fe9c35e..d18ece1f89e 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -62,7 +62,7 @@ class UserBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user=null, $notrigger=0) + function create(User $user = null, $notrigger = 0) { $now=dol_now(); @@ -92,7 +92,7 @@ class UserBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <=0 if KO, >0 if OK */ - function update(User $user=null, $notrigger=0) + function update(User $user = null, $notrigger = 0) { global $conf; @@ -139,7 +139,7 @@ class UserBankAccount extends Account * @param int $userid User id * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='', $userid=0) + function fetch($id, $ref = '', $userid = 0) { if (empty($id) && empty($ref) && empty($userid)) return -1; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index f70f61e2ed6..0695e1b84bb 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -107,7 +107,7 @@ class UserGroup extends CommonObject * @param boolean $load_members Load all members of the group * @return int <0 if KO, >0 if OK */ - function fetch($id='', $groupname='', $load_members = true) + function fetch($id = '', $groupname = '', $load_members = true) { global $conf; @@ -224,7 +224,7 @@ class UserGroup extends CommonObject * @param int $mode 0=Return array of user instance, 1=Return array of users id only * @return mixed Array of users or -1 on error */ - function listUsersForGroup($excludefilter='', $mode=0) + function listUsersForGroup($excludefilter = '', $mode = 0) { global $conf, $user; @@ -289,7 +289,7 @@ class UserGroup extends CommonObject * @param int $entity Entity to use * @return int > 0 if OK, < 0 if KO */ - function addrights($rid, $allmodule='', $allperms='', $entity=0) + function addrights($rid, $allmodule = '', $allperms = '', $entity = 0) { global $conf, $user, $langs; @@ -415,7 +415,7 @@ class UserGroup extends CommonObject * @param int $entity Entity to use * @return int > 0 if OK, < 0 if OK */ - function delrights($rid, $allmodule='', $allperms='', $entity=0) + function delrights($rid, $allmodule = '', $allperms = '', $entity = 0) { global $conf, $user, $langs; @@ -537,7 +537,7 @@ class UserGroup extends CommonObject * @param string $moduletag Name of module we want permissions ('' means all) * @return int <0 if KO, >0 if OK */ - function getrights($moduletag='') + function getrights($moduletag = '') { global $conf; @@ -676,7 +676,7 @@ class UserGroup extends CommonObject * @param int $notrigger 0=triggers enabled, 1=triggers disabled * @return int <0 if KO, >=0 if OK */ - function create($notrigger=0) + function create($notrigger = 0) { global $user, $conf, $langs, $hookmanager; @@ -747,7 +747,7 @@ class UserGroup extends CommonObject * @param int $notrigger 0=triggers enabled, 1=triggers disabled * @return int <0 if KO, >=0 if OK */ - function update($notrigger=0) + function update($notrigger = 0) { global $user, $conf, $langs, $hookmanager; @@ -817,7 +817,7 @@ class UserGroup extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut(0,$mode); } @@ -830,7 +830,7 @@ class UserGroup extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -849,7 +849,7 @@ class UserGroup extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -925,7 +925,7 @@ class UserGroup extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -1011,7 +1011,7 @@ class UserGroup extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$user,$langs; diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index a9edcb0557a..763dd500366 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -244,7 +244,7 @@ $server->register( * @param int $id Id of object * @return mixed */ -function getActionComm($authentication,$id) +function getActionComm($authentication, $id) { global $db,$conf,$langs; @@ -408,7 +408,7 @@ function getListActionCommType($authentication) * @param ActionComm $actioncomm $actioncomm * @return array Array result */ -function createActionComm($authentication,$actioncomm) +function createActionComm($authentication, $actioncomm) { global $db,$conf,$langs; @@ -491,7 +491,7 @@ function createActionComm($authentication,$actioncomm) * @param ActionComm $actioncomm $actioncomm * @return array Array result */ -function updateActionComm($authentication,$actioncomm) +function updateActionComm($authentication, $actioncomm) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index a941c2aceff..491122f748c 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -186,7 +186,7 @@ $server->register( * @param int $id Id of object * @return mixed */ -function getCategory($authentication,$id) +function getCategory($authentication, $id) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index edb429af0d3..8143b4cd178 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -235,7 +235,7 @@ $server->register( * @param string $ref_ext Ref external of object * @return mixed */ -function getContact($authentication,$id,$ref_ext) +function getContact($authentication, $id, $ref_ext) { global $db,$conf,$langs; @@ -352,7 +352,7 @@ function getContact($authentication,$id,$ref_ext) * @param Contact $contact $contact * @return array Array result */ -function createContact($authentication,$contact) +function createContact($authentication, $contact) { global $db,$conf,$langs; @@ -463,7 +463,7 @@ function createContact($authentication,$contact) * @param int $idthirdparty Id thirdparty * @return array Array result */ -function getContactsForThirdParty($authentication,$idthirdparty) +function getContactsForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -595,7 +595,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) * @param Contact $contact Contact * @return array Array result */ -function updateContact($authentication,$contact) +function updateContact($authentication, $contact) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index 4e8d3ec41d8..8287d3bff48 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -286,7 +286,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getInvoice($authentication,$id='',$ref='',$ref_ext='') +function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -399,7 +399,7 @@ function getInvoice($authentication,$id='',$ref='',$ref_ext='') * @param int $idthirdparty Id thirdparty * @return array Array result */ -function getInvoicesForThirdParty($authentication,$idthirdparty) +function getInvoicesForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -534,7 +534,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty) * @param Facture $invoice Invoice * @return array Array result */ -function createInvoice($authentication,$invoice) +function createInvoice($authentication, $invoice) { global $db,$conf,$langs; @@ -654,7 +654,7 @@ function createInvoice($authentication,$invoice) * @param string $ref_ext_order ref_ext of order to copy invoice from * @return array Array result */ -function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='') +function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '', $ref_ext_order = '') { global $db,$conf; @@ -740,7 +740,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re * @param Facture $invoice Invoice * @return array Array result */ -function updateInvoice($authentication,$invoice) +function updateInvoice($authentication, $invoice) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index c74b5660873..0d38d601b99 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -344,7 +344,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getOrder($authentication,$id='',$ref='',$ref_ext='') +function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -496,7 +496,7 @@ function getOrder($authentication,$id='',$ref='',$ref_ext='') * @param int $idthirdparty Id of thirdparty * @return array Array result */ -function getOrdersForThirdParty($authentication,$idthirdparty) +function getOrdersForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -655,7 +655,7 @@ function getOrdersForThirdParty($authentication,$idthirdparty) * @param array $order Order info * @return int Id of new order */ -function createOrder($authentication,$order) +function createOrder($authentication, $order) { global $db,$conf,$langs; @@ -795,7 +795,7 @@ function createOrder($authentication,$order) * @param int $id_warehouse Id of warehouse to use for stock decrease * @return array Array result */ -function validOrder($authentication,$id='',$id_warehouse=0) +function validOrder($authentication, $id = '', $id_warehouse = 0) { global $db,$conf,$langs; @@ -875,7 +875,7 @@ function validOrder($authentication,$id='',$id_warehouse=0) * @param array $order Order info * @return array Array result */ -function updateOrder($authentication,$order) +function updateOrder($authentication, $order) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 895e5d55af4..6037b5285e0 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -181,7 +181,7 @@ function getVersions($authentication) * @param string $refname Ref of object to check permission for external users (autodetect if not provided) * @return void */ -function getDocument($authentication, $modulepart, $file, $refname='') +function getDocument($authentication, $modulepart, $file, $refname = '') { global $db,$conf,$langs,$mysoc; diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 1e301350063..93e85827c14 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -333,7 +333,7 @@ $server->register( * @param string $lang Lang to force * @return mixed */ -function getProductOrService($authentication,$id='',$ref='',$ref_ext='',$lang='') +function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '', $lang = '') { global $db,$conf,$langs; @@ -467,7 +467,7 @@ function getProductOrService($authentication,$id='',$ref='',$ref_ext='',$lang='' * @param Product $product Product * @return array Array result */ -function createProductOrService($authentication,$product) +function createProductOrService($authentication, $product) { global $db,$conf,$langs; @@ -635,7 +635,7 @@ function createProductOrService($authentication,$product) * @param Product $product Product * @return array Array result */ -function updateProductOrService($authentication,$product) +function updateProductOrService($authentication, $product) { global $db,$conf,$langs; @@ -823,7 +823,7 @@ function updateProductOrService($authentication,$product) * @param string $listofidstring List of id with comma * @return array Array result */ -function deleteProductOrService($authentication,$listofidstring) +function deleteProductOrService($authentication, $listofidstring) { global $db,$conf,$langs; @@ -920,7 +920,7 @@ function deleteProductOrService($authentication,$listofidstring) * @param array $filterproduct Filter fields * @return array Array result */ -function getListOfProductsOrServices($authentication,$filterproduct) +function getListOfProductsOrServices($authentication, $filterproduct) { global $db,$conf,$langs; @@ -997,7 +997,7 @@ function getListOfProductsOrServices($authentication,$filterproduct) * @param $lang $lang Force lang * @return array Array result */ -function getProductsForCategory($authentication,$id,$lang='') +function getProductsForCategory($authentication, $id, $lang = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_project.php b/htdocs/webservices/server_project.php index 822081011aa..a064eff1ebc 100644 --- a/htdocs/webservices/server_project.php +++ b/htdocs/webservices/server_project.php @@ -329,7 +329,7 @@ function createProject($authentication, $project) * @param string $ref internal reference * @return array Array result */ -function getProject($authentication,$id='',$ref='') +function getProject($authentication, $id = '', $ref = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index 50e5498dbe1..c5005dab24d 100644 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -223,7 +223,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getSupplierInvoice($authentication,$id='',$ref='',$ref_ext='') +function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -333,7 +333,7 @@ function getSupplierInvoice($authentication,$id='',$ref='',$ref_ext='') * @return array Array result * */ -function getSupplierInvoicesForThirdParty($authentication,$idthirdparty) +function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 7f0b590ee9a..1587a403940 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -283,7 +283,7 @@ $server->register( * @param string $ref_ext external reference * @return array Array result */ -function getThirdParty($authentication,$id='',$ref='',$ref_ext='') +function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -399,7 +399,7 @@ function getThirdParty($authentication,$id='',$ref='',$ref_ext='') * @param Societe $thirdparty Thirdparty * @return array Array result */ -function createThirdParty($authentication,$thirdparty) +function createThirdParty($authentication, $thirdparty) { global $db,$conf,$langs; @@ -525,7 +525,7 @@ function createThirdParty($authentication,$thirdparty) * @param Societe $thirdparty Thirdparty * @return array Array result */ -function updateThirdParty($authentication,$thirdparty) +function updateThirdParty($authentication, $thirdparty) { global $db,$conf,$langs; @@ -655,7 +655,7 @@ function updateThirdParty($authentication,$thirdparty) * @param array $filterthirdparty Filter fields (key=>value to filer on. For example 'client'=>2, 'supplier'=>1, 'category'=>idcateg, 'name'=>'searchstring', ...) * @return array Array result */ -function getListOfThirdParties($authentication,$filterthirdparty) +function getListOfThirdParties($authentication, $filterthirdparty) { global $db,$conf,$langs; @@ -760,7 +760,7 @@ function getListOfThirdParties($authentication,$filterthirdparty) * @param string $ref_ext external reference * @return array Array result */ -function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='') +function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 81702c55456..5bc8350d563 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -301,7 +301,7 @@ $server->register( * @param string $ref_ext Ref external of object * @return mixed */ -function getUser($authentication,$id,$ref='',$ref_ext='') +function getUser($authentication, $id, $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -473,7 +473,7 @@ function getListOfGroups($authentication) * @param array $thirdpartywithuser Datas * @return mixed */ -function createUserFromThirdparty($authentication,$thirdpartywithuser) +function createUserFromThirdparty($authentication, $thirdpartywithuser) { global $db,$conf,$langs; @@ -681,7 +681,7 @@ function createUserFromThirdparty($authentication,$thirdpartywithuser) * @param array $shortuser Array of login/password info * @return mixed */ -function setUserPassword($authentication,$shortuser) +function setUserPassword($authentication, $shortuser) { global $db,$conf,$langs; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 0e6ee83aa9d..e0cd985ced1 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -301,7 +301,7 @@ class Website extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -517,7 +517,7 @@ class Website extends CommonObject * @param string $newlang New language * @return mixed New object created, <0 if KO */ - public function createFromClone($user, $fromid, $newref, $newlang='') + public function createFromClone($user, $fromid, $newref, $newlang = '') { global $hookmanager, $langs; global $dolibarr_main_data_root; @@ -671,7 +671,7 @@ class Website extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -707,7 +707,7 @@ class Website extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -720,7 +720,7 @@ class Website extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -1094,7 +1094,7 @@ class Website extends CommonObject * @param string $htmlname Suffix for HTML name * @return string HTML select component */ - public function componentSelectLang($languagecodes, $weblangs, $morecss='', $htmlname='') + public function componentSelectLang($languagecodes, $weblangs, $morecss = '', $htmlname = '') { global $websitepagefile, $website; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index ffa2176f142..778998f8ac2 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -256,7 +256,7 @@ class WebsitePage extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return array|int int <0 if KO, array of pages if OK */ - public function fetchAll($websiteid, $sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND') + public function fetchAll($websiteid, $sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -407,7 +407,7 @@ class WebsitePage extends CommonObject * @param int $keeptitleunchanged 1=Keep title unchanged * @return mixed New object created, <0 if KO */ - public function createFromClone(User $user, $fromid, $newref, $newlang='', $istranslation=0, $newwebsite=0, $keeptitleunchanged=0) + public function createFromClone(User $user, $fromid, $newref, $newlang = '', $istranslation = 0, $newwebsite = 0, $keeptitleunchanged = 0) { global $hookmanager, $langs; @@ -472,7 +472,7 @@ class WebsitePage extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -507,7 +507,7 @@ class WebsitePage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -520,7 +520,7 @@ class WebsitePage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 43a0b2524e6..9e51804857c 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -220,7 +220,7 @@ else * @param int $duration_value duration value * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget,$duration_value) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $duration_value) { global $conf,$langs; diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index a23652a779f..8ee56ddf2eb 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -187,7 +187,7 @@ else * @param int $duration_value duration value * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresentative,$duration_value) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative, $duration_value) { global $conf,$langs; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 873fc0ae9fb..228f130dbb3 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -255,7 +255,7 @@ exit(0); * @param string $script_file filename * @return void */ -function usage($path,$script_file) +function usage($path, $script_file) { global $conf; diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 57fdeeed76f..23026336347 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -218,7 +218,7 @@ else * @param string $oldtarget Target name * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) { global $conf,$langs; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 37b421bcefd..d79d402863e 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -192,7 +192,7 @@ else * @param string $oldsalerepresentative Old sale representative * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresentative) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative) { global $conf,$langs; diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 07d728eb0ec..432c3556ff0 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -171,7 +171,7 @@ class FactureRecTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index cb23c7d092e..abf1f286a90 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -349,7 +349,7 @@ class FactureTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 9b8e5217183..58e08affb69 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -321,7 +321,7 @@ class UserTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); From b8ec33d29b7c8e3707eec2b47c6dfe3cc9e69feb Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 17:28:18 +0100 Subject: [PATCH 36/39] fix translations --- .../core/modules/expedition/modules_expedition.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index a22ae0d0f99..583e315d564 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com> + * Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Return list of active generation modules + * Return list of active generation models * * @param DoliDB $db Database handler * @param integer $maxfilenamelength Max length of value to show @@ -56,12 +56,12 @@ abstract class ModelePdfExpedition extends CommonDocGenerator global $conf; $type='shipping'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db,$type,$maxfilenamelength); + $list=getListOfModels($db,$type,$maxfilenamelength); - return $liste; + return $list; } } @@ -112,7 +112,7 @@ abstract class ModelNumRefExpedition /** * Test if existing numbers make problems with numbering * - * @return boolean false if conflit, true if ok + * @return boolean false if conflict, true if ok */ function canBeActivated() { From d59097f65c25c9b8529a402475f1ac211aaed850 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 17:40:56 +0100 Subject: [PATCH 37/39] Fix upload of module file --- htdocs/admin/modules.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index ae87a19e433..7a9241fb9d4 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -141,6 +141,12 @@ if ($action=='install') setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors'); $error++; } + if (empty($_FILES['fileinstall']['tmp_name'])) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); + $error++; + } } if (! $error) @@ -151,14 +157,14 @@ if ($action=='install') dol_mkdir($conf->admin->dir_temp.'/'.$original_file); } - $tmpdir=preg_replace('/\.zip$/','',$original_file).'.dir'; + $tmpdir=preg_replace('/\.zip$/i','',$original_file).'.dir'; if ($tmpdir) { @dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$tmpdir); dol_mkdir($conf->admin->dir_temp.'/'.$tmpdir); } - $result=dol_move_uploaded_file($_FILES['fileinstall']['tmp_name'],$newfile,1,0,$_FILES['fileinstall']['error']); + $result=dol_move_uploaded_file($_FILES['fileinstall']['tmp_name'], $newfile, 1, 0, $_FILES['fileinstall']['error']); if ($result > 0) { $result=dol_uncompress($newfile,$conf->admin->dir_temp.'/'.$tmpdir); @@ -206,6 +212,7 @@ if ($action=='install') } else { + setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors'); $error++; } } @@ -1002,6 +1009,7 @@ if ($mode == 'deploy') print '<br>'; print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">'; + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="install">'; print '<input type="hidden" name="mode" value="deploy">'; @@ -1027,6 +1035,20 @@ if ($mode == 'deploy') print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">'; + if (! empty($conf->global->MAIN_UPLOAD_DOC)) + { + if ($user->admin) + { + $langs->load('other'); + print ' '; + print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1); + } + } + else + { + print ' ('.$langs->trans("UploadDisabled").')'; + } + print '</form>'; print '<br>'; From 56838bc6598a568e5154a06f222fbe8ee04815a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 18:11:18 +0100 Subject: [PATCH 38/39] Fix missing field into migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 83a34b80db5..2d2fc43e1ef 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -90,3 +90,7 @@ ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type); ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; + + +ALTER TABLE llx_don ADD COLUMN fk_soc integer NULL; + From 97545af1fde0d59ba5f3de0d40387d0722becb9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 18:26:18 +0100 Subject: [PATCH 39/39] Translation --- build/exe/doliwamp/Languages/MyEnglish.isl | 6 +++--- build/exe/doliwamp/Languages/MyFrench.isl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/exe/doliwamp/Languages/MyEnglish.isl b/build/exe/doliwamp/Languages/MyEnglish.isl index 8a8ced59ddb..18068087804 100644 --- a/build/exe/doliwamp/Languages/MyEnglish.isl +++ b/build/exe/doliwamp/Languages/MyEnglish.isl @@ -11,9 +11,9 @@ LaunchProgram=Launch %1 AssocFileExtension=&Associate %1 with the %2 file extension AssocingFileExtension=Associating %1 with the %2 file extension... -YouWillInstallDoliWamp=You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer. -ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage. -IfYouHaveTechnicalKnowledge=If you are looking for a hosted version in the Cloud, you should look at https://saas.dolibarr.org. If you have technical knowledge and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation. +YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer. +ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org). +IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP. ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way... DoYouWantToStart=Do you want to start installation/upgrade process ? diff --git a/build/exe/doliwamp/Languages/MyFrench.isl b/build/exe/doliwamp/Languages/MyFrench.isl index 1caaf25b693..2e93a44081e 100644 --- a/build/exe/doliwamp/Languages/MyFrench.isl +++ b/build/exe/doliwamp/Languages/MyFrench.isl @@ -11,10 +11,10 @@ LaunchProgram=Ex AssocFileExtension=&Associer %1 avec l'extension de fichier %2 AssocingFileExtension=Associe %1 avec l'extension de fichier %2... -YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur. -ThisAssistantInstallOrUpgrade=Cet assistant installe ou met à jour Dolibarr ERP-CRM et tous ses composants prérequis (Apache, Mysql et PHP) optimisés pour une utilisation de Dolibarr. -IfYouHaveTechnicalKnowledge=Si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant. -ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée, vous êtes sur la bonne voie... +YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp sur votre ordinateur (donc Dolibarr + tous ses composants prérequis comme Apache, Mysql et PHP). +ThisAssistantInstallOrUpgrade=AVERTISSEMENT: L'utilisation d'un ERP CRM installé sur un ordinateur local peut être dangereuse: si votre ordinateur tombe en panne, vous pouvez perdre toutes vos données. Faites-le si vous êtes prêt à gérer les sauvegardes vous-même sérieusement. Sinon, utilisez plutôt une installation en Saas (voir https://saas.dolibarr.org). +IfYouHaveTechnicalKnowledge=De plus, si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d''autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un serveur existant équipé de Apache, Mysql et PHP. +ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée sur une poste local, vous êtes sur la bonne voie... DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ? TechnicalParameters=Paramètres techniques
TakePOS Marketplace'.$langs->trans("WebSiteDesc").''.$langs->trans("URL").'
TakePOS for mobile devices'.$langs->trans("DolistorePosCategory").''.$url.'
' . $line->product_label . $line->desc . '' . $line->product_label . $line->desc . '' . $line->qty . '' . price($line->total_ttc) . '
'; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) + elseif (! empty($tabhelp[$id][$value])) { if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover @@ -552,7 +552,7 @@ foreach ($fieldsforcontent as $tmpfieldlist) if ($tmpfieldlist == 'topic') { print ''; } - else if ($tmpfieldlist == 'joinfiles') { + elseif ($tmpfieldlist == 'joinfiles') { print ''; } else diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 6e5f0d77b4b..d85218dbd5a 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -42,7 +42,7 @@ if ($action == 'activate_hidemenu') header("Location: ".$_SERVER["PHP_SELF"]); exit; } -else if ($action == 'disable_hidemenu') +elseif ($action == 'disable_hidemenu') { dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4694021c233..4f24862e34c 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -244,7 +244,7 @@ if ($action == 'set' && $user->admin) header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y?'&page_y='.$page_y:'')); exit; } -else if ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') +elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') { $result=unActivateModule($value); if ($result) setEventMessages($result, null, 'errors'); @@ -698,7 +698,7 @@ if ($mode == 'common') { print $langs->trans("Disabled"); } - else if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) + elseif (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used"); else { @@ -761,7 +761,7 @@ if ($mode == 'common') } print "'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'"; if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey}); - else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); + elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); else print ${$newkey}; if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')'; print ""; if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey}); - else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); - else if ($newkey == 'dolibarr_main_document_root_alt') + elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); + elseif ($newkey == 'dolibarr_main_document_root_alt') { $tmparray=explode(',',${$newkey}); $i=0; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 55be556afb9..d74afcc90bc 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -166,7 +166,7 @@ print '
';
diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 90220f1bb23..e1357a39fb5 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -106,7 +106,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'

';
@@ -164,7 +164,7 @@ if (in_array($type, array('mysql', 'mysqli')))
diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index 0dc6b16b8e7..353cd6b6b98 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -48,17 +48,17 @@ if (isset($_POST['caching'])) { } else { eaccelerator_caching(true); } -} else if (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) { +} elseif (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) { if ($info['optimizer']) { eaccelerator_optimizer(false); } else { eaccelerator_optimizer(true); } -} else if (isset($_POST['clear'])) { +} elseif (isset($_POST['clear'])) { eaccelerator_clear(); -} else if (isset($_POST['clean'])) { +} elseif (isset($_POST['clean'])) { eaccelerator_clean(); -} else if (isset($_POST['purge'])) { +} elseif (isset($_POST['purge'])) { eaccelerator_purge(); } $info = eaccelerator_info(); @@ -81,7 +81,7 @@ function compare($x, $y) if ( $x[$sortby] == $y[$sortby] ) { return 0; - } else if ($x[$sortby] < $y[$sortby]) { + } elseif ($x[$sortby] < $y[$sortby]) { return -1; } else { return 1; @@ -101,7 +101,7 @@ function revcompare($x, $y) if ($x[$sortby] == $y[$sortby]) { return 0; - } else if ($x[$sortby] < $y[$sortby]) { + } elseif ($x[$sortby] < $y[$sortby]) { return 1; } else { return -1; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 7cbb82fbe6e..759bf1dfc48 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -115,7 +115,7 @@ if ($action == 'purge') $formquestion=array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } -else if ($action == 'lock') +elseif ($action == 'lock') { $formquestion=array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 37b6bb5cc52..f857ab7ed11 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -543,7 +543,7 @@ if ($mode == 'searchkey') $htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]); print $form->textwithpicto('', $htmltext, 1, 'info'); } - else if (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) + elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { //print $key.'-'.$val; print '' . img_edit_add($langs->trans("Overwrite")) . ''; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6d6ef4578cd..816992a80e9 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -230,7 +230,7 @@ class DolibarrApi if (preg_match('/&/', $resource)) { $featuresarray = explode("&", $resource); } - else if (preg_match('/\|/', $resource)) { + elseif (preg_match('/\|/', $resource)) { $featuresarray = explode("|", $resource); } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 498abb61a7b..e9d69728979 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -202,7 +202,7 @@ class Setup extends DolibarrApi if ($country->fetch($id) < 0) { throw new RestException(503, 'Error when retrieving country : '.$country->error); } - else if ($country->fetch($id) == 0) { + elseif ($country->fetch($id) == 0) { throw new RestException(404, 'country not found'); } diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 7ce4ef04303..c899e9d78c2 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -105,7 +105,7 @@ if ($action === 'downloadblockchain') { exit; } -else if (GETPOST('downloadcsv','alpha')) +elseif (GETPOST('downloadcsv','alpha')) { $error = 0; diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 0d0fc183b6c..e08daf0b9b2 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -161,7 +161,7 @@ class BlockedLogAuthority $sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b"; if ($id) $sql.= " WHERE b.rowid = ". $id; - else if($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ; + elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index bc65c72260d..17931e14457 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -208,7 +208,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment') { + elseif($this->element === 'payment') { require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $object = new Paiement($this->db); @@ -219,7 +219,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_supplier') { + elseif($this->element === 'payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $object = new PaiementFourn($this->db); @@ -230,7 +230,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_donation') { + elseif($this->element === 'payment_donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; $object = new PaymentDonation($this->db); @@ -241,7 +241,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_various') { + elseif($this->element === 'payment_various') { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; $object = new PaymentVarious($this->db); @@ -252,7 +252,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'don' || $this->element === 'donation') { + elseif($this->element === 'don' || $this->element === 'donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $object = new Don($this->db); @@ -263,7 +263,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'subscription') { + elseif($this->element === 'subscription') { require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $object = new Subscription($this->db); @@ -274,7 +274,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'cashcontrol') { + elseif($this->element === 'cashcontrol') { require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; $object = new CashControl($this->db); @@ -285,11 +285,11 @@ class BlockedLog $this->error++; } } - else if ($this->action == 'MODULE_SET') + elseif ($this->action == 'MODULE_SET') { return 'System to track events into unalterable logs were enabled'; } - else if ($this->action == 'MODULE_RESET') + elseif ($this->action == 'MODULE_RESET') { if ($this->signature == '0000000000') { @@ -469,7 +469,7 @@ class BlockedLog } } } - else if (!is_object($value)) $this->object_data->{$key} = $value; + elseif (!is_object($value)) $this->object_data->{$key} = $value; } if (! empty($object->newref)) $this->object_data->ref = $object->newref; @@ -984,11 +984,11 @@ class BlockedLog $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; } - else if ($element=='not_certified') { + elseif ($element=='not_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 0"; } - else if ($element=='just_certified') { + elseif ($element=='just_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 1"; } diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index ea6ac7a47bd..436f8135efc 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -290,7 +290,7 @@ class Facturation { return $this->id; } - else if ( $aId == 'RESET' ) + elseif ( $aId == 'RESET' ) { $this->id = null; @@ -315,7 +315,7 @@ class Facturation { return $this->ref; } - else if ( $aRef == 'RESET' ) + elseif ( $aRef == 'RESET' ) { $this->ref = null; } @@ -337,7 +337,7 @@ class Facturation { return $this->qte; } - else if ( $aQte == 'RESET' ) + elseif ( $aQte == 'RESET' ) { $this->qte = null; @@ -361,7 +361,7 @@ class Facturation { return $this->stock; } - else if ( $aStock == 'RESET' ) + elseif ( $aStock == 'RESET' ) { $this->stock = null; } @@ -384,7 +384,7 @@ class Facturation { return $this->remise_percent; } - else if ($aRemisePercent == 'RESET') + elseif ($aRemisePercent == 'RESET') { $this->remise_percent = null; } @@ -406,7 +406,7 @@ class Facturation if (is_null($aMontantRemise)) { return $this->montant_remise; - } else if ( $aMontantRemise == 'RESET' ) { + } elseif ( $aMontantRemise == 'RESET' ) { $this->montant_remise = null; } else { @@ -427,7 +427,7 @@ class Facturation if (is_null($aPrix)) { return $this->prix; - } else if ( $aPrix == 'RESET' ) { + } elseif ( $aPrix == 'RESET' ) { $this->prix = null; } else { @@ -447,7 +447,7 @@ class Facturation if (is_null($aTva)) { return $this->tva; - } else if ( $aTva == 'RESET' ) { + } elseif ( $aTva == 'RESET' ) { $this->tva = null; } else { @@ -467,7 +467,7 @@ class Facturation if (is_null($aNumFacture)) { return $this->num_facture; - } else if ( $aNumFacture == 'RESET' ) { + } elseif ( $aNumFacture == 'RESET' ) { $this->num_facture = null; } else { @@ -488,7 +488,7 @@ class Facturation if (is_null($aModeReglement)) { return $this->mode_reglement; - } else if ( $aModeReglement == 'RESET' ) { + } elseif ( $aModeReglement == 'RESET' ) { $this->mode_reglement = null; } else { @@ -509,7 +509,7 @@ class Facturation if (is_null($aMontantEncaisse)) { return $this->montant_encaisse; - } else if ( $aMontantEncaisse == 'RESET' ) { + } elseif ( $aMontantEncaisse == 'RESET' ) { $this->montant_encaisse = null; } else { @@ -530,7 +530,7 @@ class Facturation if (is_null($aMontantRendu)) { return $this->montant_rendu; - } else if ( $aMontantRendu == 'RESET' ) { + } elseif ( $aMontantRendu == 'RESET' ) { $this->montant_rendu = null; } else { @@ -550,7 +550,7 @@ class Facturation if (is_null($aPaiementLe)) { return $this->paiement_le; - } else if ( $aPaiementLe == 'RESET' ) { + } elseif ( $aPaiementLe == 'RESET' ) { $this->paiement_le = null; } else { @@ -570,7 +570,7 @@ class Facturation if (is_null($aTotalHt)) { return $this->prix_total_ht; - } else if ( $aTotalHt == 'RESET' ) { + } elseif ( $aTotalHt == 'RESET' ) { $this->prix_total_ht = null; } else { @@ -590,7 +590,7 @@ class Facturation if (is_null($aMontantTva)) { return $this->montant_tva; - } else if ( $aMontantTva == 'RESET' ) { + } elseif ( $aMontantTva == 'RESET' ) { $this->montant_tva = null; } else { diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 4ca8a562659..ac78883bc4f 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -138,7 +138,7 @@ if ( $nbr_enreg > 1 ) $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } } -else if ( $nbr_enreg == 1 ) +elseif ( $nbr_enreg == 1 ) { $top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound"). ' -----'; } diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 6aa81d991df..960ddddb18a 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -51,7 +51,7 @@ switch($action) { $sql.= " AND p.rowid = ".$_POST['selProduit']; } - else if ( $_POST['hdnSource'] == 'REF' ) + elseif ( $_POST['hdnSource'] == 'REF' ) { $sql.= " AND p.ref = '".$_POST['txtRef']."'"; } @@ -163,7 +163,7 @@ switch($action) { $filtre = $ret['ref']; } - else if ( $_POST['hdnSource'] == 'REF' ) + elseif ( $_POST['hdnSource'] == 'REF' ) { $filtre = $_POST['txtRef']; } diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index e69ec4a852d..1cc510ee27f 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -89,32 +89,32 @@ if ($action == 'add' && $user->rights->categorie->creer) header("Location: ".$urlfrom); exit; } - else if ($idProdOrigin) + elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type); exit; } - else if ($idCompanyOrigin) + elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type); exit; } - else if ($idSupplierOrigin) + elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type); exit; } - else if ($idMemberOrigin) + elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type); exit; } - else if ($idContactOrigin) + elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type); exit; } - else if ($idProjectOrigin) + elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type); exit; @@ -179,32 +179,32 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr header("Location: ".$backtopage); exit; } - else if ($idProdOrigin) + elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idCompanyOrigin) + elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idSupplierOrigin) + elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idMemberOrigin) + elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idContactOrigin) + elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idProjectOrigin) + elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index e4d95d490ed..da6c7c20a5c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1397,7 +1397,7 @@ class Categorie extends CommonObject { if ($mode == 'id') { $cats[] = $obj->rowid; - } else if ($mode == 'label') { + } elseif ($mode == 'label') { $cats[] = $obj->label; } else { $cat = new Categorie($this->db); @@ -1427,7 +1427,7 @@ class Categorie extends CommonObject { if ($mode == 'id') { $cats[] = $obj->rowid; - } else if ($mode == 'label') { + } elseif ($mode == 'label') { $cats[] = $obj->label; } else { $cat = new Categorie($this->db); @@ -1747,7 +1747,7 @@ class Categorie extends CommonObject return -1; } } - else if (isset($this->multilangs["$key"])) + elseif (isset($this->multilangs["$key"])) { if ($this->db->num_rows($result)) // si aucune ligne dans la base { diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 6783b565b99..f683a791e72 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -270,7 +270,7 @@ if ($action == 'edit') print ''; } -else if ($action != 'add') +elseif ($action != 'add') { if ($cnt_trans) print '
'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 37bf6ed60a3..c2b94fcc473 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -86,40 +86,40 @@ if ($id > 0 && $removeelem > 0) $result = $tmpobject->fetch($removeelem); $elementtype = 'product'; } - else if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) + elseif ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'supplier'; } - else if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) + elseif ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'customer'; } - else if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) + elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $tmpobject = new Adherent($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'member'; } - else if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { + elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'contact'; } - else if ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) + elseif ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $tmpobject = new Account($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'account'; } - else if ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) + elseif ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $tmpobject = new Project($db); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d087655a9bd..0c2bbb2e10f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -791,11 +791,11 @@ if ($action == 'create') print '
'; $percent=-1; if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status'); - else if (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage'); + elseif (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage'); else { if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0'; - else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; + elseif (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; } $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print '
'; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max); - else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); + elseif (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); else print $langs->trans("BoxTitleLastModifiedCustomers",$max); print ''.$langs->trans("FullList").'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("BankAccountCountry").''; $conciliate=$object->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; - else if ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; + elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; else print ($object->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')')); print '
'.$langs->trans("Country").''; $conciliate=$object->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; - else if ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; + elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; else print ' 0)?'':' checked="checked"').'"> '.$langs->trans("DisableConciliation"); print '
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'; } - else if ($nbbyrow < 0) $return .= '
'; + elseif ($nbbyrow < 0) $return .= '
'; $return.= "\n"; @@ -6821,7 +6821,7 @@ abstract class CommonObject $return.= '
'; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) + elseif ($disabledtask) { $titleassigntask = $langs->trans("AssignTaskToMe"); if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); @@ -1383,7 +1383,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ // Warning print ''; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) + elseif ($disabledtask) { $titleassigntask = $langs->trans("AssignTaskToMe"); if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index c7d59db13da..a54ed1af8c1 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -125,12 +125,12 @@ function dol_hash($chain, $type='0') if (! empty($conf->global->MAIN_SECURITY_SALT)) $chain=$conf->global->MAIN_SECURITY_SALT.$chain; if ($type == '1' || $type == 'sha1') return sha1($chain); - else if ($type == '2' || $type == 'sha1md5') return sha1(md5($chain)); - else if ($type == '3' || $type == 'md5') return md5($chain); - else if ($type == '4' || $type == 'md5openldap') return '{md5}'.base64_encode(mhash(MHASH_MD5,$chain)); // For OpenLdap with md5 (based on an unencrypted password in base) - else if ($type == '5') return hash('sha256',$chain); - else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain); - else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain)); + elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain)); + elseif ($type == '3' || $type == 'md5') return md5($chain); + elseif ($type == '4' || $type == 'md5openldap') return '{md5}'.base64_encode(mhash(MHASH_MD5,$chain)); // For OpenLdap with md5 (based on an unencrypted password in base) + elseif ($type == '5') return hash('sha256',$chain); + elseif (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain); + elseif (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain)); // No particular encoding defined, use default return md5($chain); @@ -153,8 +153,8 @@ function dol_verifyHash($chain, $hash, $type='0') if ($type == '0' && ! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) { if ($hash[0] == '$') return password_verify($chain, $hash); - else if(strlen($hash) == 32) return dol_verifyHash($chain, $hash, '3'); // md5 - else if(strlen($hash) == 40) return dol_verifyHash($chain, $hash, '2'); // sha1md5 + elseif(strlen($hash) == 32) return dol_verifyHash($chain, $hash, '3'); // md5 + elseif(strlen($hash) == 40) return dol_verifyHash($chain, $hash, '2'); // sha1md5 return false; } @@ -199,7 +199,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu // Features/modules to check $featuresarray = array($features); if (preg_match('/&/', $features)) $featuresarray = explode("&", $features); - else if (preg_match('/\|/', $features)) $featuresarray = explode("|", $features); + elseif (preg_match('/\|/', $features)) $featuresarray = explode("|", $features); // More subfeatures to check if (! empty($feature2)) $feature2 = explode("|", $feature2); @@ -227,34 +227,34 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->lire && ! $user->rights->fournisseur->lire) { $readok=0; $nbko++; } } - else if ($feature == 'contact') + elseif ($feature == 'contact') { if (! $user->rights->societe->contact->lire) { $readok=0; $nbko++; } } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->lire && ! $user->rights->service->lire) { $readok=0; $nbko++; } } - else if ($feature == 'prelevement') + elseif ($feature == 'prelevement') { if (! $user->rights->prelevement->bons->lire) { $readok=0; $nbko++; } } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) { $readok=0; $nbko++; } } - else if ($feature == 'projet') + elseif ($feature == 'projet') { if (! $user->rights->projet->lire && ! $user->rights->projet->all->lire) { $readok=0; $nbko++; } } - else if (! empty($feature2)) // This should be used for future changes + elseif (! empty($feature2)) // This should be used for future changes { $tmpreadok=1; foreach($feature2 as $subfeature) { if ($subfeature == 'user' && $user->id == $objectid) continue; // A user can always read its own card if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok=0; } - else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; } + elseif (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; } else { $tmpreadok=1; break; } // Break is to bypass second test if the first is ok } if (! $tmpreadok) // We found a test on feature that is ko @@ -263,7 +263,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu $nbko++; } } - else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions + elseif (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions { if (empty($user->rights->$feature->lire) && empty($user->rights->$feature->read) @@ -287,27 +287,27 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->contact->creer) { $createok=0; $nbko++; } } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->creer && ! $user->rights->service->creer) { $createok=0; $nbko++; } } - else if ($feature == 'prelevement') + elseif ($feature == 'prelevement') { if (! $user->rights->prelevement->bons->creer) { $createok=0; $nbko++; } } - else if ($feature == 'commande_fournisseur') + elseif ($feature == 'commande_fournisseur') { if (! $user->rights->fournisseur->commande->creer) { $createok=0; $nbko++; } } - else if ($feature == 'banque') + elseif ($feature == 'banque') { if (! $user->rights->banque->modifier) { $createok=0; $nbko++; } } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) { $createok=0; $nbko++; } } - else if (! empty($feature2)) // This should be used + elseif (! empty($feature2)) // This should be used { foreach($feature2 as $subfeature) { @@ -317,7 +317,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu else { $createok=1; break; } // Break to bypass second test if the first is ok } } - else if (! empty($feature)) // This is for old permissions ('creer' or 'write') + elseif (! empty($feature)) // This is for old permissions ('creer' or 'write') { //print '
feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; if (empty($user->rights->$feature->creer) @@ -353,38 +353,38 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->contact->supprimer) $deleteok=0; } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->supprimer && ! $user->rights->service->supprimer) $deleteok=0; } - else if ($feature == 'commande_fournisseur') + elseif ($feature == 'commande_fournisseur') { if (! $user->rights->fournisseur->commande->supprimer) $deleteok=0; } - else if ($feature == 'banque') + elseif ($feature == 'banque') { if (! $user->rights->banque->modifier) $deleteok=0; } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) $deleteok=0; } - else if ($feature == 'ecm') + elseif ($feature == 'ecm') { if (! $user->rights->ecm->upload) $deleteok=0; } - else if ($feature == 'ftp') + elseif ($feature == 'ftp') { if (! $user->rights->ftp->write) $deleteok=0; - }else if ($feature == 'salaries') + }elseif ($feature == 'salaries') { if (! $user->rights->salaries->delete) $deleteok=0; } - else if ($feature == 'salaries') + elseif ($feature == 'salaries') { if (! $user->rights->salaries->delete) $deleteok=0; } - else if (! empty($feature2)) // This should be used for permissions on 2 levels + elseif (! empty($feature2)) // This should be used for permissions on 2 levels { foreach($feature2 as $subfeature) { @@ -392,7 +392,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu else { $deleteok=1; break; } // For bypass the second test if the first is ok } } - else if (! empty($feature)) // This is used for permissions on 1 level + elseif (! empty($feature)) // This is used for permissions on 1 level { //print '
feature='.$feature.' creer='.$user->rights->$feature->supprimer.' write='.$user->rights->$feature->delete; if (empty($user->rights->$feature->supprimer) @@ -500,7 +500,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checksoc)) // We check feature = checksoc + elseif (in_array($feature,$checksoc)) // We check feature = checksoc { // If external user: Check permission for external users if ($user->socid > 0) @@ -508,7 +508,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh if ($user->socid <> $objectid) return false; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql.= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -519,7 +519,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(s.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -527,7 +527,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). + elseif (in_array($feature,$checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). { // If external user: Check permission for external users if ($user->socid > 0) @@ -538,7 +538,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.fk_soc = ".$user->socid; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -548,7 +548,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -556,7 +556,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checkproject)) + elseif (in_array($feature,$checkproject)) { if (! empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { @@ -574,7 +574,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checktask)) + elseif (in_array($feature,$checktask)) { if (! empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { @@ -595,7 +595,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (! in_array($feature,$nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield + elseif (! in_array($feature,$nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield { // If external user: Check permission for external users if ($user->socid > 0) @@ -607,7 +607,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.".$dbt_keyfield." = ".$user->socid; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { if (empty($dbt_keyfield)) dol_print_error('','Param dbt_keyfield is required but not defined'); $sql = "SELECT COUNT(sc.fk_soc) as nb"; @@ -621,7 +621,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND sc.fk_user = ".$user->id; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -672,7 +672,7 @@ function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymess if ($printheader) { if (function_exists("llxHeader")) llxHeader(''); - else if (function_exists("llxHeaderVierge")) llxHeaderVierge(''); + elseif (function_exists("llxHeaderVierge")) llxHeaderVierge(''); } print '
'; if (! $message) print $langs->trans("ErrorForbidden"); diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index c09cd7f78d3..1f47b4df94b 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -498,7 +498,7 @@ function getRandomPassword($generic=false, $replaceambiguouschars=null) $generated_password=str_shuffle($randomCode); } } - else if (! empty($conf->global->USER_PASSWORD_GENERATED)) + elseif (! empty($conf->global->USER_PASSWORD_GENERATED)) { $nomclass="modGeneratePass".ucfirst($conf->global->USER_PASSWORD_GENERATED); $nomfichier=$nomclass.".class.php"; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 7927bec0268..40646e07df9 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -163,7 +163,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -204,7 +204,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -311,7 +311,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -352,7 +352,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -456,7 +456,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -632,7 +632,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -673,7 +673,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -780,7 +780,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -821,7 +821,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -925,7 +925,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 533a13e1fb6..9758fbe1b8e 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -59,7 +59,7 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) $error++; $errorcode='ERROR_FETCH_USER'; $errorlabel='A technical error occurred during fetch of user'; } - else if ($result == 0) + elseif ($result == 0) { $error++; $errorcode='BAD_CREDENTIALS'; $errorlabel='Bad value for login or password'; diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index bc8d7f45122..e87a07276bb 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -90,7 +90,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) } } } - else if($openid->IsError() === true) + elseif($openid->IsError() === true) { // ON THE WAY, WE GOT SOME ERROR $error = $openid->GetError(); @@ -103,7 +103,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) return false; } } - else if ($_GET['openid_mode'] == 'cancel') + elseif ($_GET['openid_mode'] == 'cancel') { // User Canceled your Request //echo "USER CANCELED REQUEST"; diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 1ca94b38106..e925798e36e 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -112,10 +112,10 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; + elseif (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; } - else if ($showmode == 2) $classname='class="tmenu"'; + elseif ($showmode == 2) $classname='class="tmenu"'; $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu']?$newTabMenu[$i]['leftmenu']:''), $newTabMenu[$i]['position'], $id, $idsel, $classname); } @@ -550,7 +550,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print '
'."\n"; $lastlevel0='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; $lastlevel0='greyed'; @@ -583,7 +583,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM if (! strstr($menu_array[$i]['titre'],''; print ''."\n"; } - else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. + elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index f4cb98d9c4b..93f779bf5a5 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -210,7 +210,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 223cacaf26a..6226be4a145 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -341,10 +341,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; + elseif (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; } - else if ($showmode == 2) $classname='class="tmenu"'; + elseif ($showmode == 2) $classname='class="tmenu"'; $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu']?$newTabMenu[$i]['leftmenu']:''), $newTabMenu[$i]['position'], $id, $idsel, $classname); } @@ -1837,7 +1837,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''."\n"; $lastlevel0='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; $lastlevel0='greyed'; @@ -1870,7 +1870,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! strstr($menu_array[$i]['titre'],''; print ''."\n"; } - else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. + elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 4992fc6d11c..afac9a6a84b 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -225,7 +225,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 038167ae512..357bccd5d46 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -225,7 +225,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9e8d5565f67..3a37d89d136 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2109,7 +2109,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (isset($value['entity'])) { $entity = $value['entity']; } } - else if (isset($value['data']) && !is_array($value['data'])) { + elseif (isset($value['data']) && !is_array($value['data'])) { $newvalue = $value['data']; if (isset($value['entity'])) { $entity = $value['entity']; } diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed6a7635164..bcfb6686cad 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -255,7 +255,7 @@ class modTcpdfbarcode extends ModeleBarCode if (array_key_exists($dolEncodingType, $tcpdf1dEncodingTypes)) { $this->is2d = false; return $tcpdf1dEncodingTypes[$dolEncodingType]; - } else if (array_key_exists($dolEncodingType, $tcpdf2dEncodingTypes)) { + } elseif (array_key_exists($dolEncodingType, $tcpdf2dEncodingTypes)) { $this->is2d = true; return $tcpdf2dEncodingTypes[$dolEncodingType]; } else { diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 97121eebcfd..af1bb03c3c3 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -199,7 +199,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) ) { $result=-2; } diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 993f4bf9bfb..cc629b3ff34 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -112,7 +112,7 @@ class mod_contract_olive extends ModelNumRefContracts { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cac7329cf5b..92c775bf4e5 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -136,10 +136,10 @@ class html_cerfafr extends ModeleDon if ($don->modepaymentcode=='CHQ'){ $ModePaiement = '
Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire
'; if ($origin == 'commande') print $langs->trans('RefCustomerOrder'); - else if ($origin == 'propal') print $langs->trans('RefCustomerOrder'); + elseif ($origin == 'propal') print $langs->trans('RefCustomerOrder'); else print $langs->trans('RefCustomer'); print ''; print ''; @@ -1604,7 +1604,7 @@ if ($action == 'create') } } } -else if ($id || $ref) +elseif ($id || $ref) /* *************************************************************************** */ /* */ /* Edit and view mode */ @@ -2253,7 +2253,7 @@ else if ($id || $ref) print '' . $formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product). '
- ' . $langs->trans("NA") . '
'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 48e84cf1cc4..3f6cf98bf06 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2747,7 +2747,7 @@ class ExpeditionLigne extends CommonObjectLine $qty = price2num($this->detail_batch[0]->qty); } } - else if (! empty($this->detail_batch)) + elseif (! empty($this->detail_batch)) { $batch = $this->detail_batch->batch; $batch_id = $this->detail_batch->fk_origin_stock; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index f9ea697e50d..e3d1cc42e68 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -103,13 +103,13 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->expedition->creer) +elseif ($action == 'swapstatut' && $user->rights->expedition->creer) { $result=$objectsrc->swapContactStatus(GETPOST('ligne')); } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->expedition->creer) +elseif ($action == 'deletecontact' && $user->rights->expedition->creer) { $result = $objectsrc->delete_contact(GETPOST("lineid")); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 48bfd1f4ce2..584f420a8dd 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -91,7 +91,7 @@ if (empty($reshook)) } // Positionne ref commande client - else if ($action == 'setref_client' && $user->rights->commande->creer) { + elseif ($action == 'setref_client' && $user->rights->commande->creer) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 4646c8779ca..a2713bd836f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2417,7 +2417,7 @@ if ($action != 'create' && $action != 'edit') // Delete print ''; } - else if($user->rights->expensereport->supprimer && $object->fk_statut != 6) + elseif($user->rights->expensereport->supprimer && $object->fk_statut != 6) { // Delete print ''; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 52ad0486597..71b0df6a8cd 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -186,7 +186,7 @@ if ($action=='selectfield') // Selection of field at step 2 if (is_array($tmp)) $listofdependencies=$tmp; else $listofdependencies=array($tmp); } - else if (! empty($field) && ! empty($fieldsdependenciesarray[$field])) + elseif (! empty($field) && ! empty($fieldsdependenciesarray[$field])) { // We found a dependency on a dedicated field $tmp=$fieldsdependenciesarray[$field]; // $fieldsdependenciesarray=array('fd.fieldx'=>'fd.rowid') or array('fd.fieldx'=>array('fd.rowid','ab.rowid')) diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index c7f92142381..eb8e06919d3 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -63,7 +63,7 @@ if (! empty($keyforcontent)) $langs->load("errors"); print $langs->trans("ErrorBadSyntaxForParamKeyForContent", 'EXTERNAL_SITE_CONTENT_', 'EXTERNAL_SITE_URL_'); } - else if (empty($conf->global->$keyforcontent)) + elseif (empty($conf->global->$keyforcontent)) { $langs->load("errors"); print $langs->trans("ErrorVariableKeyForContentMustBeSet", 'EXTERNAL_SITE_CONTENT_'.$keyforcontent, 'EXTERNAL_SITE_URL_'.$keyforcontent); diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index e896c9682e4..837b77eb3aa 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -370,7 +370,7 @@ if ($action == 'create') { $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title, '', ''); @@ -712,7 +712,7 @@ if ($action == 'create') { $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a8ddb343a94..507ce8d01f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -180,7 +180,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) + elseif ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setDraft($user); if ($result >= 0) @@ -209,7 +209,7 @@ if (empty($reshook)) } } - else if ($action == 'add' && $user->rights->ficheinter->creer) + elseif ($action == 'add' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->duration = GETPOST('duration','int'); @@ -432,7 +432,7 @@ if (empty($reshook)) } } - else if ($action == 'update' && $user->rights->ficheinter->creer) + elseif ($action == 'update' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->fk_project = GETPOST('projectid','int'); @@ -448,20 +448,20 @@ if (empty($reshook)) } // Set into a project - else if ($action == 'classin' && $user->rights->ficheinter->creer) + elseif ($action == 'classin' && $user->rights->ficheinter->creer) { $result=$object->setProject(GETPOST('projectid','int')); if ($result < 0) dol_print_error($db,$object->error); } // Set into a contract - else if ($action == 'setcontract' && $user->rights->contrat->creer) + elseif ($action == 'setcontract' && $user->rights->contrat->creer) { $result=$object->set_contrat($user,GETPOST('contratid','int')); if ($result < 0) dol_print_error($db,$object->error); } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) { $result=$object->delete($user); if ($result<0) { @@ -472,14 +472,14 @@ if (empty($reshook)) exit; } - else if ($action == 'setdescription' && $user->rights->ficheinter->creer) + elseif ($action == 'setdescription' && $user->rights->ficheinter->creer) { $result=$object->set_description($user,GETPOST('description')); if ($result < 0) dol_print_error($db,$object->error); } // Add line - else if ($action == "addline" && $user->rights->ficheinter->creer) + elseif ($action == "addline" && $user->rights->ficheinter->creer) { if (!GETPOST('np_desc','none') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC) ) { @@ -547,7 +547,7 @@ if (empty($reshook)) } // Classify Billed - else if ($action == 'classifybilled' && $user->rights->ficheinter->creer) + elseif ($action == 'classifybilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(2); if ($result > 0) @@ -562,7 +562,7 @@ if (empty($reshook)) } // Classify unbilled - else if ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) + elseif ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(1); if ($result > 0) @@ -577,7 +577,7 @@ if (empty($reshook)) } // Classify Done - else if ($action == 'classifydone' && $user->rights->ficheinter->creer) + elseif ($action == 'classifydone' && $user->rights->ficheinter->creer) { $result=$object->setStatut(3); if ($result > 0) @@ -594,7 +594,7 @@ if (empty($reshook)) /* * Mise a jour d'une ligne d'intervention */ - else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) + elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) { $objectline = new FichinterLigne($db); if ($objectline->fetch($lineid) <= 0) @@ -650,7 +650,7 @@ if (empty($reshook)) /* * Supprime une ligne d'intervention AVEC confirmation */ - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $objectline = new FichinterLigne($db); if ($objectline->fetch($lineid) <= 0) @@ -683,7 +683,7 @@ if (empty($reshook)) * Ordonnancement des lignes */ - else if ($action == 'up' && $user->rights->ficheinter->creer) + elseif ($action == 'up' && $user->rights->ficheinter->creer) { $object->line_up($lineid); @@ -703,7 +703,7 @@ if (empty($reshook)) exit; } - else if ($action == 'down' && $user->rights->ficheinter->creer) + elseif ($action == 'down' && $user->rights->ficheinter->creer) { $object->line_down($lineid); @@ -789,13 +789,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact(GETPOST('lineid','int')); @@ -1099,7 +1099,7 @@ if ($action == 'create') print ''; } } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Affichage en mode visu diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 54ad6733e69..7da8a8aba44 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -81,13 +81,13 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->ficheinter->creer) +elseif ($action == 'swapstatut' && $user->rights->ficheinter->creer) { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->ficheinter->creer) +elseif ($action == 'deletecontact' && $user->rights->ficheinter->creer) { $result = $object->delete_contact(GETPOST('lineid','int')); diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 4edfa3d0623..472af9f14d9 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -80,7 +80,7 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do $path=$_SERVER["CONTEXT_PREFIX"]; // example '/dolibarr/' when using an apache alias. if (! preg_match('/\/$/', $path)) $path.='/'; } - else if (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) + elseif (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) { // When we ask index.php, we MUST BE SURE that $path is '' at the end. This is required to make install process // when using apache alias like '/dolibarr/' that point to htdocs. diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1dab0e9f82e..efa701712b8 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1335,7 +1335,7 @@ class FactureFournisseur extends CommonInvoice { $num = $force_number; } - else if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); } diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ee92374149b..d939260a01f 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -95,9 +95,9 @@ class PaiementFourn extends Paiement $sql.= ' WHERE p.entity IN ('.getEntity('facture_fourn').')'; if ($id > 0) $sql.= ' AND p.rowid = '.$id; - else if ($ref) + elseif ($ref) $sql.= ' AND p.rowid = '.$ref; - else if ($fk_bank) + elseif ($fk_bank) $sql.= ' AND p.fk_bank = '.$fk_bank; //print $sql; @@ -636,8 +636,8 @@ class PaiementFourn extends Paiement // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; - else if ($conf->global->SUPPLIER_PAYMENT_ADDON=='brodator') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_brodator'; - else if ($conf->global->SUPPLIER_PAYMENT_ADDON=='bronan') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; + elseif ($conf->global->SUPPLIER_PAYMENT_ADDON=='brodator') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_brodator'; + elseif ($conf->global->SUPPLIER_PAYMENT_ADDON=='bronan') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; if (! empty($conf->global->SUPPLIER_PAYMENT_ADDON)) { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d8a1c2fa51c..04835089809 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -101,7 +101,7 @@ if ($id > 0 || ! empty($ref)) $ret = $object->fetch_thirdparty(); if ($ret < 0) dol_print_error($db,$object->error); } -else if (! empty($socid) && $socid > 0) +elseif (! empty($socid) && $socid > 0) { $fourn = new Fournisseur($db); $ret=$fourn->fetch($socid); @@ -170,12 +170,12 @@ if (empty($reshook)) } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->commande->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } @@ -211,10 +211,10 @@ if (empty($reshook)) if (in_array($object->statut, array(1, 2, 3, 4, 5, 6, 7, 9))) { if ($object->statut == 1) $newstatus=0; // Validated->Draft - else if ($object->statut == 2) $newstatus=0; // Approved->Draft - else if ($object->statut == 3) $newstatus=2; // Ordered->Approved - else if ($object->statut == 4) $newstatus=3; - else if ($object->statut == 5) + elseif ($object->statut == 2) $newstatus=0; // Approved->Draft + elseif ($object->statut == 3) $newstatus=2; // Ordered->Approved + elseif ($object->statut == 4) $newstatus=3; + elseif ($object->statut == 5) { //$newstatus=2; // Ordered // TODO Can we set it to submited ? @@ -222,9 +222,9 @@ if (empty($reshook)) // TODO If there is at least one reception, we can set to Received->Received partially $newstatus=4; // Received partially } - else if ($object->statut == 6) $newstatus=2; // Canceled->Approved - else if ($object->statut == 7) $newstatus=3; // Canceled->Process running - else if ($object->statut == 9) $newstatus=1; // Refused->Validated + elseif ($object->statut == 6) $newstatus=2; // Canceled->Approved + elseif ($object->statut == 7) $newstatus=3; // Canceled->Process running + elseif ($object->statut == 9) $newstatus=1; // Refused->Validated else $newstatus = 2; //print "old status = ".$object->statut.' new status = '.$newstatus; @@ -458,7 +458,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if (empty($error)) // $price_ht is already set + elseif (empty($error)) // $price_ht is already set { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -921,7 +921,7 @@ if (empty($reshook)) setEventMessages($langs->trans("DeliveryStateSaved"), null); $action = ''; } - else if($result == -3) + elseif($result == -3) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -1235,9 +1235,9 @@ if (empty($reshook)) //Is sync supplier web services module activated? and everything filled? if (empty($conf->syncsupplierwebservices->enabled)) { setEventMessages($langs->trans("WarningModuleNotActive",$langs->transnoentities("Module2650Name")), null, 'mesgs'); - } else if (empty($ws_url) || empty($ws_key)) { + } elseif (empty($ws_url) || empty($ws_key)) { setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors'); - } else if (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) { + } elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) { setEventMessages($langs->trans("ErrorFieldsRequired"),null, 'errors'); } else @@ -1295,7 +1295,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); } - else if ($result_order["result"]["result_code"] != "OK") //Something went wrong + elseif ($result_order["result"]["result_code"] != "OK") //Something went wrong { setEventMessages($langs->trans("SOAPError")." '".$result_order["result"]["result_code"]."' - '".$result_order["result"]["result_label"]."'", null, 'errors'); } @@ -1336,13 +1336,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut' && $object->id > 0) + elseif ($action == 'swapstatut' && $object->id > 0) { $result=$object->swapContactStatus(GETPOST('ligne')); } // Efface un contact - else if ($action == 'deletecontact' && $object->id > 0) + elseif ($action == 'deletecontact' && $object->id > 0) { $result = $object->delete_contact($_GET["lineid"]); @@ -2407,7 +2407,7 @@ elseif (! empty($object->id)) { print ''.$langs->trans("ClassifyBilled").''; } - else if (!empty($object->linkedObjectsIds['invoice_supplier'])) + elseif (!empty($object->linkedObjectsIds['invoice_supplier'])) { if ($user->rights->fournisseur->facture->creer) { @@ -2575,7 +2575,7 @@ elseif (! empty($object->id)) setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors'); $mode = "init"; $error_occurred = true; //Don't allow to set the user/pass if thirdparty fields are not filled - } else if ($mode != "init" && (empty($ws_user) || empty($ws_password))) { + } elseif ($mode != "init" && (empty($ws_user) || empty($ws_password))) { setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors'); $mode = "init"; } @@ -2674,7 +2674,7 @@ elseif (! empty($object->id)) { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); } - else if ($status_code != "OK") //Something went wrong + elseif ($status_code != "OK") //Something went wrong { if ($status_code == "NOT_FOUND") { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 08e30d04b7f..2ee0890c813 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) +elseif ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) } // Deleting a contact -else if ($action == 'deletecontact' && $user->rights->fournisseur->commande->creer) +elseif ($action == 'deletecontact' && $user->rights->fournisseur->commande->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 931942debb7..a268619c84f 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -886,7 +886,7 @@ if ($id > 0 || ! empty($ref)) { } } print ''; if(!empty($reception->id)){ print $reception->getLibStatut(5); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 7129821ab56..5c616a70b0e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -245,7 +245,7 @@ if (empty($reshook)) } // Remove a product line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $result = $object->deleteline($lineid); if ($result > 0) @@ -278,7 +278,7 @@ if (empty($reshook)) } // Delete link of credit note to invoice - else if ($action == 'unlinkdiscount' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'unlinkdiscount' && $user->rights->fournisseur->facture->creer) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); @@ -336,23 +336,23 @@ if (empty($reshook)) } // payment mode - else if ($action == 'setmode' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'setmode' && $user->rights->fournisseur->facture->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->facture->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->facture->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha'))); } // bank account - else if ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } @@ -459,7 +459,7 @@ if (empty($reshook)) } } // Convertir en reduc - else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -972,7 +972,7 @@ if (empty($reshook)) $error++; } } - else if (! $error) + elseif (! $error) { $id = $object->create($user); if ($id < 0) @@ -1301,7 +1301,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if (empty($error)) // $price_ht is already set + elseif (empty($error)) // $price_ht is already set { $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); @@ -1576,7 +1576,7 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { if ($object->fetch($id)) { @@ -1589,7 +1589,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index ffd3cb00d7b..e9ec9bf95e1 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 4a1b004fed7..c5194aa7344 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -774,12 +774,12 @@ if (empty($action)) { if ($year > 0 && empty($day)) $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(p.datep, '%m') = '".$month."'"; } - else if ($year > 0) + elseif ($year > 0) { $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index fd2e5e80772..99ee657f650 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -107,7 +107,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } @@ -529,7 +529,7 @@ else // Is it a directory ? $is_directory=0; if ($file == '..') $is_directory=1; - else if (! $rawlisthasfailed) + elseif (! $rawlisthasfailed) { if (preg_match('/^d/',$vals[0])) $is_directory=1; if (preg_match('/^l/',$vals[0])) $is_link=1; @@ -586,7 +586,7 @@ else if ($file != '..') print ''.img_delete().''; else print ' '; } - else if ($is_link) + elseif ($is_link) { $newfile=$file; $newfile=preg_replace('/ ->.*/','',$newfile); @@ -671,7 +671,7 @@ if ($conn_id) { } - else if (! empty($conf->global->FTP_CONNECT_WITH_SSL)) + elseif (! empty($conf->global->FTP_CONNECT_WITH_SSL)) { ftp_close($conn_id); } @@ -719,7 +719,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect dol_syslog('Try to connect with ssh2_ftp'); $tmp_conn_id = ssh2_connect($ftp_server, $ftp_port); } - else if (! empty($conf->global->FTP_CONNECT_WITH_SSL)) + elseif (! empty($conf->global->FTP_CONNECT_WITH_SSL)) { dol_syslog('Try to connect with ftp_ssl_connect'); $conn_id = ftp_ssl_connect($ftp_server, $ftp_port, $connecttimeout); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 0f22e07245b..f6b6586a9ec 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -95,8 +95,8 @@ if ($action == 'create') $type=GETPOST('type'); $halfday=0; if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2; - else if ($starthalfday == 'afternoon') $halfday=-1; - else if ($endhalfday == 'morning') $halfday=1; + elseif ($starthalfday == 'afternoon') $halfday=-1; + elseif ($endhalfday == 'morning') $halfday=1; $valideur = GETPOST('valideur'); $description = trim(GETPOST('description')); @@ -201,8 +201,8 @@ if ($action == 'update') $endhalfday=GETPOST('endhalfday'); $halfday=0; if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2; - else if ($starthalfday == 'afternoon') $halfday=-1; - else if ($endhalfday == 'morning') $halfday=1; + elseif ($starthalfday == 'afternoon') $halfday=-1; + elseif ($endhalfday == 'morning') $halfday=1; // If no right to modify a request if (! $user->rights->holiday->write) diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 77126100068..4343e3a2c50 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -70,7 +70,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") } } -else if ($action == 'add') +elseif ($action == 'add') { if (! $cancel) { @@ -120,7 +120,7 @@ else if ($action == 'add') } // Update record -else if ($action == 'update') +elseif ($action == 'update') { $error = 0; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 7eb0bce2dde..145992c0902 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -83,7 +83,7 @@ if (versioncompare(versionphparray(),$arrayphpminversionerror) < 0) // Mi print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok=0; // 0=error, 1=warning } -else if (versioncompare(versionphparray(),$arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) +elseif (versioncompare(versionphparray(),$arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) { print 'Error '.$langs->trans("ErrorPHPVersionTooLow",versiontostring($arrayphpminversionwarning)); $checksok=0; // 0=error, 1=warning diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 54b34b89e8c..eed1cc9a48f 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -225,10 +225,10 @@ if (! defined('SYSLOG_HANDLERS')) define('SYSLOG_HANDLERS','["mod_syslog_file"]' if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined { if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log'); - else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); - else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); - else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp - else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others + elseif (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); + elseif (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); + elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp + elseif (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); @@ -331,10 +331,10 @@ function conf($dolibarr_main_document_root) if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined { if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log'); - else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); - else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); - else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp - else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others + elseif (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); + elseif (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); + elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp + elseif (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 43a6d2bce27..eb4a87ee8c2 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -62,13 +62,13 @@ function checkLinkedElements($sourcetype, $targettype) $targettable=$targettype; if ($sourcetype == 'shipping') $sourcetable = 'expedition'; - else if ($targettype == 'shipping') $targettable = 'expedition'; + elseif ($targettype == 'shipping') $targettable = 'expedition'; if ($sourcetype == 'delivery') $sourcetable = 'livraison'; - else if ($targettype == 'delivery') $targettable = 'livraison'; + elseif ($targettype == 'delivery') $targettable = 'livraison'; if ($sourcetype == 'order_supplier') $sourcetable = 'commande_fournisseur'; - else if ($targettype == 'order_supplier') $targettable = 'commande_fournisseur'; + elseif ($targettype == 'order_supplier') $targettable = 'commande_fournisseur'; if ($sourcetype == 'invoice_supplier') $sourcetable = 'facture_fourn'; - else if ($targettype == 'invoice_supplier') $targettable = 'facture_fourn'; + elseif ($targettype == 'invoice_supplier') $targettable = 'facture_fourn'; $out = $langs->trans('SourceType').': '.$sourcetype.' => '.$langs->trans('TargetType').': '.$targettype.' '; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 888daa4abe2..0994fcedd2f 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -617,32 +617,32 @@ if ($ok && GETPOST('clean_orphelin_dir','alpha')) include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance=new Facture($db); } - else if ($modulepart == 'invoice_supplier') + elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance=new FactureFournisseur($db); } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance=new Propal($db); } - else if ($modulepart == 'order') + elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance=new Commande($db); } - else if ($modulepart == 'order_supplier') + elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance=new CommandeFournisseur($db); } - else if ($modulepart == 'contract') + elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance=new Contrat($db); } - else if ($modulepart == 'tax') + elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance=new ChargeSociales($db); @@ -702,7 +702,7 @@ if ($ok && GETPOST('clean_orphelin_dir','alpha')) } print "