diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index fc3950cbeef..e1a881c9dfa 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -58,7 +58,12 @@ class AccountancyCategory // extends CommonObject public $id; public $code; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $range_account; public $sens; public $category_type; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index c9ea755870c..30f9dbb6f1d 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -96,7 +96,8 @@ class AccountingAccount extends CommonObject public $fk_user_modif; var $active; // duplicate with status - var $status; + + var $status; /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index c908b4ccb7c..f10e0d1ce01 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -30,20 +30,25 @@ class AccountingJournal extends CommonObject * @var string ID to identify managed object */ public $element='accounting_journal'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='accounting_journal'; - + public $fk_element = ''; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'generic'; - var $rowid; + public $rowid; public $code; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $nature; // 1:various operations, 2:sale, 3:purchase, 4:bank, 5:expense-report, 8:inventory, 9: has-new public $active; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 002dca8bf56..9676f050518 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -35,22 +35,22 @@ class Asset extends CommonObject * @var string ID to identify managed object */ public $element = 'asset'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'asset'; - + /** * @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var int Does asset support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; - + /** * @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png */ @@ -98,7 +98,12 @@ class Asset extends CommonObject public $rowid; public $ref; public $entity; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $amount; public $fk_soc; public $description; @@ -465,4 +470,4 @@ class Asset extends CommonObject return 0; } -} \ No newline at end of file +} diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3736ce58d5b..d846257f68d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2013-2016 Juanjo Menent - * Copyright (C) 2013-2016 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Charlie Benke @@ -51,7 +51,7 @@ class Categorie extends CommonObject const TYPE_USER = 'user'; const TYPE_PROJECT = 'project'; const TYPE_ACCOUNT = 'bank_account'; - const TYPE_BANK_LINE = 'bank_line'; + const TYPE_BANK_LINE = 'bank_line'; public $picto = 'category'; @@ -152,14 +152,19 @@ class Categorie extends CommonObject * @var string ID to identify managed object */ public $element='category'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='categorie'; public $fk_parent; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $description; /** * @var string Color diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 519d6c8c08a..f07f308e74a 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -66,7 +66,6 @@ $modulesdir = dolGetModulesDirs('/mailings'); $object = new Mailing($db); - /* * Actions */ @@ -330,16 +329,14 @@ if ($object->fetch($id) >= 0) // Si le module mailing est qualifie if ($qualified) { - $var = ! $var; - if ($allowaddtarget) { - print '
'; + print ''; print ''; } else { - print '
'; + print '
'; } print '
'; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 53711fc800c..9aefcd5d863 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -33,7 +33,11 @@ class BankCateg // extends CommonObject public $picto='generic'; public $id; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; /** diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 2f4f7bfb0df..32bd16b1aab 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -51,7 +51,12 @@ class PaymentSalary extends CommonObject public $fk_project; public $type_payment; public $num_payment; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $datesp; public $dateep; public $fk_bank; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 1c80161736c..b053e180159 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -43,22 +43,22 @@ class PaymentSocialContribution extends CommonObject public $picto = 'payment'; - var $fk_charge; - var $datec=''; - var $tms=''; - var $datep=''; + public $fk_charge; + public $datec=''; + public $tms=''; + public $datep=''; /** * @deprecated * @see amount */ - var $total; - var $amount; // Total amount of payment - var $amounts=array(); // Array of amounts - var $fk_typepaiement; - var $num_paiement; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $total; + public $amount; // Total amount of payment + public $amounts=array(); // Array of amounts + public $fk_typepaiement; + public $num_paiement; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * Constructor diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 1a3d90e9662..04252433824 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -55,13 +55,13 @@ class Contracts extends DolibarrApi } /** - * Get properties of a contrat object + * Get properties of a contract object * - * Return an array with contrat informations + * Return an array with contract informations * * @param int $id ID of contract * @return array|mixed data without useless information - * + * * @throws RestException */ function get($id) @@ -457,7 +457,7 @@ class Contracts extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - // TODO Check the lineid $lineid is a line of ojbect + // TODO Check the lineid $lineid is a line of object $updateRes = $this->contract->deleteline($lineid, DolibarrApiAccess::$user); if ($updateRes > 0) { @@ -472,7 +472,7 @@ class Contracts extends DolibarrApi /** * Update contract general fields (won't touch lines of contract) * - * @param int $id Id of contrat to update + * @param int $id Id of contract to update * @param array $request_data Datas * * @return int @@ -540,7 +540,7 @@ class Contracts extends DolibarrApi } /** - * Validate an contract + * Validate a contract * * @param int $id Contract ID * @param int $notrigger 1=Does not execute triggers, 0= execute triggers diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 7fd4d923bc1..c4316141440 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -241,8 +241,8 @@ class Contrat extends CommonObject * * @param User $user Objet User who activate contract * @param int $line_id Id of line to activate - * @param int $date Date d'ouverture - * @param int|string $date_end Date fin prevue + * @param int $date Opening date + * @param int|string $date_end Expected end date * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ @@ -263,7 +263,7 @@ class Contrat extends CommonObject * * @param User $user Objet User who close contract * @param int $line_id Id of line to close - * @param int $date_end Date end + * @param int $date_end End date * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ @@ -525,7 +525,7 @@ class Contrat extends CommonObject /** * Unvalidate a contract * - * @param User $user Objet User + * @param User $user Object User * @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @return int <0 if KO, >0 if OK */ @@ -567,7 +567,7 @@ class Contrat extends CommonObject // End call triggers } - // Set new ref and define current statut + // Set new ref and define current status if (! $error) { $this->statut=0; @@ -665,7 +665,7 @@ class Contrat extends CommonObject $this->db->free($resql); - // Retreive all extrafield + // Retreive all extrafields // fetch optionals attributes and labels $this->fetch_optionals(); @@ -727,7 +727,7 @@ class Contrat extends CommonObject $this->lines=array(); $pos = 0; - // Selectionne les lignes contrats liees a un produit + // Selects contract lines related to a product $sql = "SELECT p.label as product_label, p.description as product_desc, p.ref as product_ref,"; $sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.vat_src_code, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.localtax1_type, d.localtax2_type, d.qty, d.remise_percent, d.subprice, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht,"; $sql.= " d.total_ht,"; @@ -761,7 +761,7 @@ class Contrat extends CommonObject $line->id = $objp->rowid; $line->ref = $objp->rowid; $line->fk_contrat = $objp->fk_contrat; - $line->desc = $objp->description; // Description ligne + $line->desc = $objp->description; // Description line $line->qty = $objp->qty; $line->vat_src_code = $objp->vat_src_code ; $line->tva_tx = $objp->tva_tx; @@ -792,9 +792,9 @@ class Contrat extends CommonObject $line->fk_unit = $objp->fk_unit; $line->ref = $objp->product_ref; // deprecated - $line->product_ref = $objp->product_ref; // Ref product - $line->product_desc = $objp->product_desc; // Description product - $line->product_label = $objp->product_label; // Label product + $line->product_ref = $objp->product_ref; // Product Ref + $line->product_desc = $objp->product_desc; // Product Description + $line->product_label = $objp->product_label; // Product Label $line->description = $objp->description; @@ -812,7 +812,7 @@ class Contrat extends CommonObject $line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); $line->date_fin_reel = $this->db->jdate($objp->date_cloture); - // Retreive all extrafield for contract + // Retreive all extrafields for contract // fetch optionals attributes and labels $line->fetch_optionals(); @@ -918,7 +918,7 @@ class Contrat extends CommonObject $modCodeContract = new $module(); if (!empty($modCodeContract->code_auto)) { - // Mise a jour ref + // Update ref $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; if ($this->db->query($sql)) { @@ -942,14 +942,14 @@ class Contrat extends CommonObject } } - // Insert contacts commerciaux ('SALESREPSIGN','contrat') + // Insert business contacts ('SALESREPSIGN','contrat') if (! $error) { $result=$this->add_contact($this->commercial_signature_id,'SALESREPSIGN','internal'); if ($result < 0) $error++; } - // Insert contacts commerciaux ('SALESREPFOLL','contrat') + // Insert business contacts ('SALESREPFOLL','contrat') if (! $error) { $result=$this->add_contact($this->commercial_suivi_id,'SALESREPFOLL','internal'); diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 371f4e4aba7..d459ff6fb41 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -36,7 +36,7 @@ class Ctyperesource * @var string Id to identify managed objects */ public $element = 'ctyperesource'; - + /** * @var string Name of table without prefix where object is stored */ @@ -48,7 +48,12 @@ class Ctyperesource public $lines = array(); public $code; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $active; @@ -474,12 +479,17 @@ class CtyperesourceLine * @var int ID */ public $id; + /** * @var mixed Sample line property 1 */ - public $code; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $active; /** diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 36e13e9a48d..bbe809dcf3a 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1,9 +1,9 @@ - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2015-2017 Marcos García - * Copyright (C) 2015-2017 Nicolas ZABOURI + * Copyright (C) 2015-2017 Nicolas ZABOURI * * 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 @@ -40,50 +40,53 @@ class FormMail extends Form */ public $db; - var $withform; // 1=Include HTML form tag and show submit button, 0=Do not include form tag and submit button, -1=Do not include form tag but include submit button + public $withform; // 1=Include HTML form tag and show submit button, 0=Do not include form tag and submit button, -1=Do not include form tag but include submit button - var $fromname; - var $frommail; - var $replytoname; - var $replytomail; - var $toname; - var $tomail; - var $trackid; + public $fromname; + public $frommail; + public $replytoname; + public $replytomail; + public $toname; + public $tomail; + public $trackid; + + public $withsubstit; // Show substitution array + public $withfrom; - var $withsubstit; // Show substitution array - var $withfrom; /** * @var int * @deprecated Fill withto with array before calling method. * @see withto */ public $withtosocid; + /** * @var int|int[] */ public $withto; // Show recipient emails - var $withtofree; // Show free text for recipient emails - var $withtocc; - var $withtoccc; - var $withtopic; - var $withfile; // 0=No attaches files, 1=Show attached files, 2=Can add new attached files - var $withmaindocfile; // 1=Add a checkbox "Attach also main document" for mass actions (checked by default), -1=Add checkbox (not checked by default) - var $withbody; - var $withfromreadonly; - var $withreplytoreadonly; - var $withtoreadonly; - var $withtoccreadonly; - var $withtocccreadonly; - var $withtopicreadonly; - var $withfilereadonly; - var $withdeliveryreceipt; - var $withcancel; - var $withfckeditor; + public $withtofree; // Show free text for recipient emails + public $withtocc; + public $withtoccc; + public $withtopic; + public $withfile; // 0=No attaches files, 1=Show attached files, 2=Can add new attached files + public $withmaindocfile; // 1=Add a checkbox "Attach also main document" for mass actions (checked by default), -1=Add checkbox (not checked by default) + public $withbody; - var $substit=array(); - var $substit_lines=array(); - var $param=array(); + public $withfromreadonly; + public $withreplytoreadonly; + public $withtoreadonly; + public $withtoccreadonly; + public $withtocccreadonly; + public $withtopicreadonly; + public $withfilereadonly; + public $withdeliveryreceipt; + public $withcancel; + public $withfckeditor; + + public $substit=array(); + public $substit_lines=array(); + public $param=array(); public $withtouser=array(); public $withtoccuser=array(); @@ -1394,7 +1397,12 @@ class FormMail extends Form class ModelMail { public $id; - public $label; + + /** + * @var string proper name for given parameter + */ + public $label; + public $topic; public $content; public $content_lines; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 7dc8e810bac..02298ac53ff 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -41,7 +41,12 @@ class Link extends CommonObject public $entity; public $datea; public $url; + + /** + * @var string proper name for given parameter + */ public $label; + public $objecttype; public $objectid; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 465579bcf7d..7f38007d2d0 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -34,13 +34,21 @@ class ModeleImports * @var DoliDB Database handler. */ public $db; - + public $datatoimport; public $error=''; - public $id; // Id of driver - public $label; // Label of driver + /** + * @var int id of driver + */ + public $id; + + /** + * @var string proper name for given parameter + */ + public $label; + public $extension; // Extension of files imported by driver public $version; // Version of driver diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index bb0654c634a..002612889a9 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -248,7 +248,6 @@ class PaymentExpenseReport extends CommonObject if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif); - // Check parameters // Put here code to add control on parameters values