From a66983042703182b351fccf3a8528216ee51e1b5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 10:37:16 +0200 Subject: [PATCH 01/33] Update and standardize code --- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/compta/facture/class/paymentterm.class.php | 6 +++++- .../canvas/actions_contactcard_common.class.php | 7 +++++-- htdocs/core/class/antivir.class.php | 5 ++++- htdocs/core/class/canvas.class.php | 6 +++++- htdocs/core/class/ccountry.class.php | 6 +++++- htdocs/core/class/cstate.class.php | 6 +++++- htdocs/core/class/ctypent.class.php | 6 +++++- htdocs/core/class/dolgraph.class.php | 6 +++++- htdocs/core/class/dolreceiptprinter.class.php | 6 +++++- htdocs/core/class/events.class.php | 5 ++++- htdocs/core/class/extrafields.class.php | 6 +++++- htdocs/core/class/google.class.php | 6 +++++- htdocs/core/class/hookmanager.class.php | 6 +++++- htdocs/core/class/html.form.class.php | 7 ++++++- htdocs/core/class/html.formaccounting.class.php | 6 +++++- htdocs/core/class/html.formactions.class.php | 6 +++++- htdocs/core/class/html.formadmin.class.php | 6 +++++- htdocs/core/class/html.formbank.class.php | 6 +++++- htdocs/core/class/html.formbarcode.class.php | 6 +++++- htdocs/core/class/html.formcompany.class.php | 6 +++++- htdocs/core/class/html.formcontract.class.php | 6 +++++- htdocs/core/class/html.formcron.class.php | 6 +++++- htdocs/core/class/html.formintervention.class.php | 6 +++++- htdocs/core/class/html.formmail.class.php | 5 ++++- htdocs/core/class/html.formmargin.class.php | 6 +++++- htdocs/core/class/html.formprojet.class.php | 6 +++++- htdocs/core/class/html.formpropal.class.php | 6 +++++- htdocs/core/class/html.formsms.class.php | 5 ++++- htdocs/core/class/html.formsocialcontrib.class.php | 6 +++++- htdocs/core/class/ldap.class.php | 5 ++++- htdocs/core/class/notify.class.php | 6 +++++- htdocs/core/class/rssparser.class.php | 6 +++++- htdocs/core/modules/mailings/modules_mailings.php | 7 ++++++- htdocs/core/modules/printing/modules_printing.php | 6 +++++- htdocs/core/modules/printing/printgcp.modules.php | 10 +++++++--- htdocs/core/modules/printing/printipp.modules.php | 10 +++++++--- htdocs/ecm/class/htmlecm.form.class.php | 6 +++++- htdocs/expensereport/class/expensereport.class.php | 6 +++++- htdocs/fichinter/class/fichinter.class.php | 6 +++++- htdocs/fourn/class/fournisseur.product.class.php | 6 +++++- htdocs/imports/class/import.class.php | 5 ++++- htdocs/mailmanspip/class/mailmanspip.class.php | 6 +++++- htdocs/product/class/html.formproduct.class.php | 6 +++++- .../dynamic_price/class/price_expression.class.php | 6 +++++- .../class/price_global_variable.class.php | 10 +++++++--- .../class/price_global_variable_updater.class.php | 10 +++++++--- htdocs/resource/class/html.formresource.class.php | 5 ++++- .../class/supplier_proposal.class.php | 6 +++++- 49 files changed, 248 insertions(+), 58 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 247cecb2eea..205b59bedf2 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1633,7 +1633,11 @@ class Account extends CommonObject */ class AccountLine extends CommonObject { - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; + var $db; var $element='bank'; var $table_element='bank'; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 61d477522dc..763c4705db5 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -29,7 +29,11 @@ class PaymentTerm // extends CommonObject { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 921c9e60580..7398b427055 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -37,8 +37,11 @@ abstract class ActionsContactCardCommon var $tpl = array(); //! Object container var $object; - //! Error string - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index a530da66e3d..e82b97c73ba 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -30,7 +30,10 @@ */ class AntiVir { - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 3fed7cb722e..1a5573a7279 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -29,7 +29,11 @@ class Canvas { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 43d63ebb1d9..be5a7f2e490 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -33,7 +33,11 @@ class Ccountry // extends CommonObject { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 7a853cdf18a..e94d00bcb07 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -33,7 +33,11 @@ class Cstate // extends CommonObject { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index c69b70c7c35..35643a0733b 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -28,7 +28,11 @@ class Ctypent // extends CommonObject { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index f40d30f389e..444f9b3ea53 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -69,7 +69,11 @@ class DolGraph var $showpercent=0; var $combine=0; // 0.05 if you want to combine records < 5% into "other" var $graph; // Objet Graph (Artichow, Phplot...) - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; var $bordercolor; // array(R,G,B) var $bgcolor; // array(R,G,B) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index fbf05c99358..8aacdba4a6b 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -109,7 +109,11 @@ class dolReceiptPrinter extends Escpos var $tags; var $printer; var $template; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index abdbb1689f8..e11830aca12 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -40,7 +40,10 @@ class Events // extends CommonObject var $id; var $db; - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; var $tms; var $type; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 62122ed636c..44b38afc351 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -88,7 +88,11 @@ class ExtraFields // New array to store extrafields definition var $attributes; - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; + var $errno; diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index e923ec12252..1e2e2438114 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -27,7 +27,11 @@ class GoogleAPI { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; var $key; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 2ba7f966712..8d37d7b5c9b 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -30,7 +30,11 @@ class HookManager { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6fe2dffd3d3..77d55794a3c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -48,7 +48,12 @@ class Form { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; + var $num; // Cache arrays diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index b6030809d6f..a2e1dcc9ad9 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -36,7 +36,11 @@ class FormAccounting extends Form private $options_cache = array(); var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * Constructor diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 451ee0d700d..01316d9b452 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -30,7 +30,11 @@ class FormActions { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index fd0470c63f4..1b6266fb6e3 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -30,7 +30,11 @@ class FormAdmin { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 4ee00555b85..36eeaaacdf0 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -30,7 +30,11 @@ class FormBank { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index dba8c5d24e5..3d8f40bb2e8 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -29,7 +29,11 @@ class FormBarCode { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index f04cfad54bc..c03764c2f34 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -32,7 +32,11 @@ class FormCompany { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index a3a3696e5f4..b011d7e1b14 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -28,7 +28,11 @@ class FormContract { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 255868f02a5..99ca3924c3c 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -29,7 +29,11 @@ class FormCron extends Form { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * Constructor diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index b675ba6e674..4a65fc7eac1 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -28,7 +28,11 @@ class FormIntervention { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 4ce4bfee824..fd8940674e2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -85,7 +85,10 @@ class FormMail extends Form public $withtouser=array(); public $withtoccuser=array(); - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; public $lines_model; diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index da8acce83d4..ee88110038b 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -29,7 +29,11 @@ class FormMargin { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index dcc282794b9..e7b91e8c82d 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -30,7 +30,11 @@ class FormProjets { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index 14e1a466275..1f4d94f649a 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -28,7 +28,11 @@ class FormPropal { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 6db6f200136..850704fe42e 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -56,7 +56,10 @@ class FormSms var $substit=array(); var $param=array(); - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index 83886e63af8..636cf489d7d 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -28,7 +28,11 @@ class FormSocialContrib { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index cd1f4a64c17..71635a89233 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -29,7 +29,10 @@ */ class Ldap { - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; /** * Tableau des serveurs (IP addresses ou nom d'hotes) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index f3beece9794..22a22008d74 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -32,7 +32,11 @@ class Notify { var $id; var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 32a5842d410..d2ce6d6d5c2 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -27,7 +27,11 @@ class RssParser { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; private $_format=''; private $_urlRSS; diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 1a97f3502b7..d3ea299a86e 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; class MailingTargets // This can't be abstract as it is used for some method { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; + var $tooltip=''; diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index 4a6560b47fa..f0d96c8aea7 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; class PrintingDriver { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 8e4eafeb7b8..8e868c19a1c 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -42,12 +42,16 @@ class printing_printgcp extends PrintingDriver var $conf = array(); var $google_id = ''; var $google_secret = ''; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; + /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); var $db; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 168c411ec29..e2354870cf9 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -40,12 +40,16 @@ class printing_printipp extends PrintingDriver var $userid; /* user login */ var $user; var $password; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; + /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); var $db; diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index 3139c5f9986..db3355bce2b 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -28,7 +28,11 @@ require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; class FormEcm { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 19417d6e552..6271ef7ffdb 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2379,7 +2379,11 @@ class ExpenseReport extends CommonObject class ExpenseReportLine { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; var $rowid; var $comments; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 789a351c776..d7c2d871824 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1310,7 +1310,11 @@ class Fichinter extends CommonObject class FichinterLigne extends CommonObjectLine { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; // From llx_fichinterdet var $fk_fichinter; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index e7b3a292df1..4180ecaf3d0 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -38,7 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class. class ProductFournisseur extends Product { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; var $product_fourn_price_id; // id of ligne product-supplier diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index 875efc27410..ae7cc240695 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -43,7 +43,10 @@ class Import var $array_import_convertvalue; var $array_import_run_sql_after; - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index f7ae2608da5..1630e61ce33 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -39,7 +39,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class MailmanSpip { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; var $mladded_ok; var $mladded_ko; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index b34f4a88b2d..53368c0a114 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; class FormProduct { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; // Cache arrays var $cache_warehouses=array(); diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 039f74302e8..958647da0a6 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -30,7 +30,11 @@ class PriceExpression { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var string[] Error codes (or messages) 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 1432afcfdeb..f09fbd2643f 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -30,12 +30,16 @@ class PriceGlobalVariable { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; + /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); var $id; var $code; 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 37a3e116683..1cd6318494b 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 @@ -30,12 +30,16 @@ class PriceGlobalVariableUpdater { var $db; //!< To store db handler - var $error; //!< To return error code (or message) + + /** + * @var string Error code (or message) + */ + public $error=''; + /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); var $types=array(0, 1); //!< Updater types var $update_min = 5; //!< Minimal update rate diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index ed667fad8ab..8a6f9d96c28 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -38,7 +38,10 @@ class FormResource var $substit=array(); var $param=array(); - var $error; + /** + * @var string Error code (or message) + */ + public $error=''; /** diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 16727a781fc..1ffe4465d86 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2637,7 +2637,11 @@ class SupplierProposal extends CommonObject class SupplierProposalLine extends CommonObjectLine { var $db; - var $error; + + /** + * @var string Error code (or message) + */ + public $error=''; public $element='supplier_proposaldet'; public $table_element='supplier_proposaldet'; From 29f15b4ae6a7ba0936ad4a464f983e87723a4d6b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 10:51:55 +0200 Subject: [PATCH 02/33] Update and standardize code --- htdocs/accountancy/class/accountancysystem.class.php | 6 +++++- htdocs/accountancy/class/accountingaccount.class.php | 5 ++++- .../canvas/actions_adherentcard_common.class.php | 10 +++++----- htdocs/bookmarks/class/bookmark.class.php | 5 ++++- htdocs/comm/action/class/cactioncomm.class.php | 5 ++++- htdocs/comm/mailing/class/advtargetemailing.class.php | 10 ++++++---- .../mailing/class/html.formadvtargetemailing.class.php | 6 +++++- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/compta/facture/class/paymentterm.class.php | 5 ++++- .../prelevement/class/ligneprelevement.class.php | 6 +++++- .../prelevement/class/rejetprelevement.class.php | 6 +++++- .../canvas/actions_contactcard_common.class.php | 6 +++++- 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 +++++- htdocs/core/boxes/box_graph_invoices_permonth.php | 5 ++++- .../boxes/box_graph_invoices_supplier_permonth.php | 5 ++++- htdocs/core/boxes/box_graph_orders_permonth.php | 5 ++++- .../core/boxes/box_graph_orders_supplier_permonth.php | 5 ++++- htdocs/core/boxes/box_graph_product_distribution.php | 6 +++++- htdocs/core/boxes/box_graph_propales_permonth.php | 5 ++++- htdocs/core/boxes/box_lastlogin.php | 6 +++++- htdocs/core/boxes/box_members.php | 6 +++++- htdocs/core/boxes/box_produits.php | 6 +++++- htdocs/core/boxes/box_produits_alerte_stock.php | 6 +++++- htdocs/core/boxes/box_project.php | 7 ++++++- 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 | 6 +++++- htdocs/core/boxes/box_task.php | 7 ++++++- 45 files changed, 219 insertions(+), 52 deletions(-) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index ef13b84b4bb..7ac8c0881f9 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -28,7 +28,11 @@ */ class AccountancySystem { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + /** * @var string Error code (or message) */ diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 4eac5546d1d..4ffadb799ac 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -45,7 +45,10 @@ class AccountingAccount extends CommonObject */ public $restrictiononfksoc = 1; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index e746a4a45c3..0e9bdd326da 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -28,10 +28,10 @@ abstract class ActionsAdherentCardCommon { /** - * Database handler - * @var DoliDB + * @var DoliDB Database handler. */ - var $db; + public $db; + var $dirmodule; var $targetmodule; var $canvas; @@ -41,11 +41,11 @@ abstract class ActionsAdherentCardCommon var $tpl = array(); //! Object container var $object; + /** * @var string Error code (or message) */ - public $error=''; - + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 1beb4b36871..264f4ce9aec 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -33,7 +33,10 @@ class Bookmark extends CommonObject public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'bookmark'; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $id; var $fk_user; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 22b7b6fa26c..f0b78ca2684 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -33,7 +33,10 @@ class CActionComm */ public $error=''; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $id; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 9ef7ba75a9f..702af86708e 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -28,13 +28,15 @@ */ class AdvanceTargetingMailing extends CommonObject { - - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; + /** * @var string Error code (or message) */ - public $error=''; - + public $error=''; /** * @var string[] Error codes (or messages) diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 76054a95879..f365b231159 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -26,7 +26,11 @@ */ class FormAdvTargetEmailing extends Form { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + /** * @var string Error code (or message) */ diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 205b59bedf2..aaf525a29d8 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1638,7 +1638,11 @@ class AccountLine extends CommonObject */ public $error=''; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $element='bank'; var $table_element='bank'; var $picto = 'generic'; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 763c4705db5..a44ea24711e 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -28,7 +28,10 @@ */ class PaymentTerm // extends CommonObject { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index fa8545c4ea2..4087e1c6020 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -32,7 +32,11 @@ class LignePrelevement { var $id; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; var $statuts = array(); diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 87de138e63a..f0b6916b6fa 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -31,7 +31,11 @@ class RejetPrelevement { var $id; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 7398b427055..1276e501dc6 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -27,7 +27,11 @@ */ abstract class ActionsContactCardCommon { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $dirmodule; var $targetmodule; var $canvas; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index f6d9d03dccf..6ccf61690ed 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -37,7 +37,11 @@ class box_actions extends ModeleBoxes var $boxlabel="BoxLastActions"; var $depends = array("agenda"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 4fb8cc19c82..bd3163268ac 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -35,7 +35,11 @@ class box_activity extends ModeleBoxes var $boxlabel='BoxGlobalActivity'; var $depends = array("facture"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $enabled = 1; diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index e2a45ffab22..50cebe91b1f 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -33,7 +33,11 @@ class box_bookmarks extends ModeleBoxes var $boxlabel="BoxMyLastBookmarks"; var $depends = array("bookmark"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 7ab2de66a7b..fc31baee716 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -37,7 +37,11 @@ class box_clients extends ModeleBoxes var $boxlabel="BoxLastCustomers"; var $depends = array("societe"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $enabled = 1; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 9bbde140dbe..86660258cd0 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -37,7 +37,11 @@ class box_commandes extends ModeleBoxes var $boxlabel="BoxLastCustomerOrders"; var $depends = array("commande"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 52f8e6c7d9e..b951e0fe79b 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -38,7 +38,11 @@ class box_comptes extends ModeleBoxes var $boxlabel="BoxCurrentAccounts"; var $depends = array("banque"); // Box active if module banque active - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $enabled = 1; diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index a8dc7f1231d..37e32d07198 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -39,7 +39,11 @@ class box_contacts extends ModeleBoxes var $boxlabel="BoxLastContacts"; var $depends = array("societe"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 49d6df67d7f..027fa2cc84a 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -36,7 +36,11 @@ class box_contracts extends ModeleBoxes var $boxlabel="BoxLastContracts"; var $depends = array("contrat"); // conf->contrat->enabled - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index 01eb4ac8893..4c2ca4236ca 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -39,7 +39,11 @@ class box_external_rss extends ModeleBoxes var $boxlabel="BoxLastRssInfos"; var $depends = array("externalrss"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $paramdef; // Params of box definition (not user params) var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index a5da051d9d7..84f27257889 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -35,7 +35,11 @@ class box_factures extends ModeleBoxes var $boxlabel="BoxLastCustomerBills"; var $depends = array("facture"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 00df80f334b..011942b9cc4 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -36,7 +36,11 @@ class box_factures_fourn extends ModeleBoxes var $boxlabel="BoxLastSupplierBills"; var $depends = array("facture","fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 1f894be3309..9f696eac2b9 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -35,7 +35,11 @@ class box_factures_fourn_imp extends ModeleBoxes var $boxlabel = "BoxOldestUnpaidSupplierBills"; var $depends = array("facture","fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index ea483e223c1..1faeb789337 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -38,7 +38,11 @@ class box_factures_imp extends ModeleBoxes var $boxlabel="BoxOldestUnpaidCustomerBills"; var $depends = array("facture"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index ef7ba62c15c..a831bc163ce 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -36,7 +36,11 @@ class box_ficheinter extends ModeleBoxes var $boxlabel="BoxFicheInter"; var $depends = array("ficheinter"); // conf->contrat->enabled - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 32ffd1f5618..1bfd7d7ac16 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -36,7 +36,11 @@ class box_fournisseurs extends ModeleBoxes var $boxlabel="BoxLastSuppliers"; var $depends = array("fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 8e4ec988144..334cbc0fc56 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -38,7 +38,11 @@ class box_goodcustomers extends ModeleBoxes var $boxlabel="BoxGoodCustomers"; var $depends = array("societe"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $enabled = 1; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index abbdc7b7c71..4eb91d36e60 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -33,7 +33,10 @@ class box_graph_invoices_permonth extends ModeleBoxes var $boxlabel="BoxCustomersInvoicesPerMonth"; var $depends = array("facture"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 53d9ce08059..337b4283e94 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -33,7 +33,10 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes var $boxlabel="BoxSuppliersInvoicesPerMonth"; var $depends = array("fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 05a0ff498ec..b05395169fa 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -33,7 +33,10 @@ class box_graph_orders_permonth extends ModeleBoxes var $boxlabel="BoxCustomersOrdersPerMonth"; var $depends = array("commande"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index e88ed46be72..86a813407a6 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -33,7 +33,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes var $boxlabel="BoxSuppliersOrdersPerMonth"; var $depends = array("fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 39a7a3984d2..9ed59422466 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -33,7 +33,11 @@ class box_graph_product_distribution extends ModeleBoxes var $boxlabel="BoxProductDistribution"; var $depends = array("product|service","facture|propal|commande"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index bddf4a27e64..d608a1d1dcf 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -33,7 +33,10 @@ class box_graph_propales_permonth extends ModeleBoxes var $boxlabel="BoxProposalsPerMonth"; var $depends = array("propal"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php index 05bd3043b0a..38745616aa4 100644 --- a/htdocs/core/boxes/box_lastlogin.php +++ b/htdocs/core/boxes/box_lastlogin.php @@ -35,7 +35,11 @@ class box_lastlogin extends ModeleBoxes var $boxlabel='BoxLoginInformation'; var $depends = array("user"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $enabled = 1; diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index e5819f0f14c..063a7390808 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -37,7 +37,11 @@ class box_members extends ModeleBoxes var $boxlabel="BoxLastMembers"; var $depends = array("adherent"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $enabled = 1; diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 53449afceeb..f6e91169eae 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -38,7 +38,11 @@ class box_produits extends ModeleBoxes var $boxlabel="BoxLastProducts"; var $depends = array("produit"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index ee49e9e4534..0bd7a5e2ad7 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -40,7 +40,11 @@ class box_produits_alerte_stock extends ModeleBoxes var $boxlabel="BoxProductsAlertStock"; var $depends = array("produit"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 29bc4410b82..6c959deb303 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -34,7 +34,12 @@ class box_project extends ModeleBoxes var $boximg="object_projectpub"; var $boxlabel; //var $depends = array("projet"); - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 8dad41f64a1..a208671835f 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -37,7 +37,11 @@ class box_propales extends ModeleBoxes var $boxlabel="BoxLastProposals"; var $depends = array("propal"); // conf->propal->enabled - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 3186d0d30ce..912d0191e8d 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -39,7 +39,11 @@ class box_prospect extends ModeleBoxes var $boxlabel="BoxLastProspects"; var $depends = array("societe"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $enabled = 1; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 44a1ca020b5..38532ca3d2f 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -37,7 +37,11 @@ class box_services_contracts extends ModeleBoxes var $boxlabel="BoxLastProductsInContract"; var $depends = array("service","contrat"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 72d4390a2e2..ab5ad0c54a7 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -35,7 +35,11 @@ class box_services_expired extends ModeleBoxes var $boxlabel="BoxOldestExpiredServices"; var $depends = array("contrat"); // conf->propal->enabled - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 895f411e3d6..934be175c15 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -36,7 +36,11 @@ class box_supplier_orders extends ModeleBoxes var $boxlabel="BoxLatestSupplierOrders"; var $depends = array("fournisseur"); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $info_box_head = array(); var $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 802195ca445..7d40ee8482d 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -35,7 +35,12 @@ class box_task extends ModeleBoxes var $boximg="object_projecttask"; var $boxlabel; //var $depends = array("projet"); - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; + var $param; var $enabled = 0; // Disabled because bugged. From d91b1fd895797d4729ee9eaa71e266350297e721 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 11:06:34 +0200 Subject: [PATCH 03/33] Update and standardize code --- htdocs/core/class/antivir.class.php | 6 +++++- htdocs/core/class/canvas.class.php | 5 ++++- htdocs/core/class/ccountry.class.php | 5 ++++- htdocs/core/class/conf.class.php | 8 ++++++-- htdocs/core/class/cstate.class.php | 5 ++++- htdocs/core/class/ctypent.class.php | 5 ++++- htdocs/core/class/dolreceiptprinter.class.php | 7 ++++++- htdocs/core/class/events.class.php | 6 +++++- htdocs/core/class/extrafields.class.php | 5 ++++- htdocs/core/class/google.class.php | 5 ++++- htdocs/core/class/hookmanager.class.php | 5 ++++- htdocs/core/class/html.form.class.php | 5 ++++- htdocs/core/class/html.formaccounting.class.php | 7 +++++-- htdocs/core/class/html.formactions.class.php | 5 ++++- htdocs/core/class/html.formadmin.class.php | 5 ++++- htdocs/core/class/html.formbank.class.php | 5 ++++- htdocs/core/class/html.formbarcode.class.php | 5 ++++- htdocs/core/class/html.formcompany.class.php | 6 ++++-- htdocs/core/class/html.formcontract.class.php | 5 ++++- htdocs/core/class/html.formcron.class.php | 5 ++++- htdocs/core/class/html.formintervention.class.php | 5 ++++- htdocs/core/class/html.formmail.class.php | 5 ++++- htdocs/core/class/html.formmargin.class.php | 5 ++++- htdocs/core/class/html.formprojet.class.php | 5 ++++- htdocs/core/class/html.formpropal.class.php | 5 ++++- htdocs/core/class/html.formsms.class.php | 5 ++++- htdocs/core/class/html.formsocialcontrib.class.php | 5 ++++- htdocs/core/class/interfaces.class.php | 12 ++++++++---- htdocs/core/class/notify.class.php | 6 +++++- htdocs/core/class/rssparser.class.php | 5 ++++- htdocs/core/class/utils.class.php | 5 ++++- htdocs/core/menus/standard/auguria_menu.php | 6 +++++- htdocs/core/menus/standard/eldy_menu.php | 6 +++++- htdocs/core/menus/standard/empty.php | 6 +++++- htdocs/core/modules/action/rapport.pdf.php | 6 +++++- htdocs/core/modules/import/import_csv.modules.php | 6 +++++- htdocs/core/modules/import/import_xlsx.modules.php | 9 ++++++--- .../modules/mailings/advthirdparties.modules.php | 6 +++++- htdocs/core/modules/mailings/contacts1.modules.php | 5 ++++- htdocs/core/modules/mailings/example.modules.php | 6 +++++- htdocs/core/modules/mailings/fraise.modules.php | 5 ++++- htdocs/core/modules/mailings/modules_mailings.php | 5 ++++- htdocs/core/modules/mailings/pomme.modules.php | 5 ++++- .../core/modules/mailings/thirdparties.modules.php | 6 +++++- .../thirdparties_services_expired.modules.php | 7 ++++++- htdocs/core/modules/printing/modules_printing.php | 5 ++++- htdocs/core/modules/printing/printgcp.modules.php | 5 ++++- htdocs/core/modules/printing/printipp.modules.php | 5 ++++- .../security/generate/modGeneratePassNone.class.php | 6 +++++- .../security/generate/modGeneratePassPerso.class.php | 6 +++++- .../generate/modGeneratePassStandard.class.php | 6 +++++- 51 files changed, 231 insertions(+), 59 deletions(-) diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index e82b97c73ba..950d857000d 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -41,7 +41,11 @@ class AntiVir public $errors = array(); var $output; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** * Constructor diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 1a5573a7279..8a9b9d2f005 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -28,7 +28,10 @@ */ class Canvas { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index be5a7f2e490..01b176da165 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -32,7 +32,10 @@ */ class Ccountry // extends CommonObject { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 3b33b1f16f1..c86051d7088 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -35,8 +35,12 @@ class Conf /** \public */ //! To store properties found in conf file var $file; - //! Object with database handler - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; + //! To store properties found into database var $global; //! To store browser info diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index e94d00bcb07..e841fc581d8 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -32,7 +32,10 @@ */ class Cstate // extends CommonObject { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 35643a0733b..546b182a336 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -27,7 +27,10 @@ */ class Ctypent // extends CommonObject { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 8aacdba4a6b..78a9b2479eb 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -105,7 +105,12 @@ class dolReceiptPrinter extends Escpos const CONNECTOR_NETWORK_PRINT = 3; const CONNECTOR_WINDOWS_PRINT = 4; //const CONNECTOR_JAVA = 5; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; + var $tags; var $printer; var $template; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index e11830aca12..f300d5c49e7 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -38,7 +38,11 @@ class Events // extends CommonObject public $table_element='events'; //!< Name of table without prefix where object is stored var $id; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 44b38afc351..2d0398dae16 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -37,7 +37,10 @@ */ class ExtraFields { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; // type of element (for what object is the extrafield) // @deprecated diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index 1e2e2438114..5756acd90e0 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -26,7 +26,10 @@ */ class GoogleAPI { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 8d37d7b5c9b..9e2bd344171 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -29,7 +29,10 @@ */ class HookManager { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 77d55794a3c..52abde0c14e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -47,7 +47,10 @@ */ class Form { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index a2e1dcc9ad9..8a0073e0351 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -35,14 +35,17 @@ class FormAccounting extends Form private $options_cache = array(); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) */ public $error=''; - /** + /** * Constructor * * @param DoliDB $db Database handler diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 01316d9b452..a0468da2726 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -29,7 +29,10 @@ */ class FormActions { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 1b6266fb6e3..b52da95f967 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -29,7 +29,10 @@ */ class FormAdmin { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 36eeaaacdf0..9cf60cc45b1 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -29,7 +29,10 @@ */ class FormBank { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 3d8f40bb2e8..34d56cee853 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -28,7 +28,10 @@ */ class FormBarCode { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index c03764c2f34..d422fa379c4 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -31,7 +31,10 @@ */ class FormCompany { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) @@ -39,7 +42,6 @@ class FormCompany public $error=''; - /** * Constructor * diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index b011d7e1b14..2c45ef0266c 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -27,7 +27,10 @@ */ class FormContract { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 99ca3924c3c..92cbcc52334 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -28,7 +28,10 @@ */ class FormCron extends Form { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index 4a65fc7eac1..62950626e2d 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -27,7 +27,10 @@ */ class FormIntervention { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index fd8940674e2..73c4b036711 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -35,7 +35,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; */ class FormMail extends Form { - var $db; + /** + * @var DoliDB Database handler. + */ + 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 diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index ee88110038b..e891e3dacbe 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -28,7 +28,10 @@ */ class FormMargin { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index e7b91e8c82d..7a022c4cf52 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -29,7 +29,10 @@ */ class FormProjets { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index 1f4d94f649a..712460f530f 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -27,7 +27,10 @@ */ class FormPropal { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 850704fe42e..9db197d41b2 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -32,7 +32,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; */ class FormSms { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $fromname; var $fromsms; diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index 636cf489d7d..8c940c3898b 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -27,7 +27,10 @@ */ class FormSocialContrib { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index e6325df8836..ceb4d0c657c 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -31,13 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; */ class Interfaces { - var $db; - var $dir; // Directory with all core and external triggers files /** - * + * @var DoliDB Database handler. + */ + public $db; + + var $dir; // Directory with all core and external triggers files + + /** * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); /** * Constructor diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 22a22008d74..e77978fd62e 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/CMailFile.class.php'; class Notify { var $id; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index d2ce6d6d5c2..34738c09bf7 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -26,7 +26,10 @@ */ class RssParser { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index b9a9ad6f4bf..b7ae66da36c 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -27,7 +27,10 @@ */ class Utils { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $output; // Used by Cron method to return message var $result; // Used by Cron method to return data diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index df31b9c9d8f..33c02ce5f1c 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -28,7 +28,11 @@ */ class MenuManager { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $type_user; // Put 0 for internal users, 1 for external users var $atarget=""; // To store default target to use onto links var $name="auguria"; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 11f1de43a1f..dd919fd20a3 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -27,7 +27,11 @@ */ class MenuManager { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $type_user; // Put 0 for internal users, 1 for external users var $atarget=""; // To store default target to use onto links var $name="eldy"; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index f761b593fb7..a9d8e2f9a41 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -25,7 +25,11 @@ */ class MenuManager { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $type_user=0; // Put 0 for internal users, 1 for external users var $atarget=""; // To store default target to use onto links diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 7dec29e5189..fe7be7f3052 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -35,7 +35,11 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; */ class CommActionRapport { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $description; var $date_edition; var $year; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index aeaa6e58db2..9ea8ee25438 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -33,7 +33,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/import/modules_import.php'; */ class ImportCsv extends ModeleImports { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $datatoimport; /** diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 0c610f469b0..d9400f2738d 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -33,7 +33,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/import/modules_import.php'; */ class ImportXlsx extends ModeleImports { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $datatoimport; /** @@ -42,10 +46,9 @@ class ImportXlsx extends ModeleImports public $error=''; /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); var $id; // Id of driver var $label; // Label of driver diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 78aab1a5bd7..08249104909 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -32,7 +32,11 @@ class mailing_advthirdparties extends MailingTargets var $require_module=array("none"); // This module should not be displayed as Selector in mailling var $picto='company'; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 90d81dca4a5..af0d1103e4e 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -39,7 +39,10 @@ class mailing_contacts1 extends MailingTargets var $require_admin=0; // Module mailing actif pour user admin ou non var $picto='contact'; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index 548510f81a0..fb7b6c94519 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -37,7 +37,11 @@ class mailing_example extends MailingTargets var $require_module=array(); var $picto=''; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; // CHANGE THIS: Constructor name must be called mailing_xxx with xxx=name of your selector diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index f71b6b925f0..9d6e2505f92 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -41,7 +41,10 @@ class mailing_fraise extends MailingTargets var $require_module=array('adherent'); var $picto='user'; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * Constructor diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index d3ea299a86e..1035d3bf765 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; */ class MailingTargets // This can't be abstract as it is used for some method { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 5824f456365..b3265ac35f7 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -37,7 +37,10 @@ class mailing_pomme extends MailingTargets var $require_admin=1; // Module mailing actif pour user admin ou non var $picto='user'; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 57a69475000..f7a2ed5bc3c 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -31,7 +31,11 @@ class mailing_thirdparties extends MailingTargets var $require_module=array("societe"); // This module allows to select by categories must be also enabled if category module is not activated var $picto='company'; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 08473f3cb6d..0135227b461 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -29,7 +29,12 @@ class mailing_thirdparties_services_expired extends MailingTargets var $require_module=array('contrat'); var $picto='company'; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; + var $arrayofproducts=array(); diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index f0d96c8aea7..8205dc5a705 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; */ class PrintingDriver { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 8e868c19a1c..b85e4823bba 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -53,7 +53,10 @@ class printing_printgcp extends PrintingDriver */ public $errors = array(); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; private $OAUTH_SERVICENAME_GOOGLE = 'Google'; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index e2354870cf9..e51aa4e5c63 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -51,7 +51,10 @@ class printing_printipp extends PrintingDriver */ public $errors = array(); - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index 79cbd1ff629..e0c7714f8bb 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -34,7 +34,11 @@ class modGeneratePassNone extends ModeleGenPassword var $id; var $length; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $conf; var $lang; var $user; diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index 39b3d54ea30..f4734cd5a54 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -42,7 +42,11 @@ class modGeneratePassPerso extends ModeleGenPassword var $NbRepeat; var $WithoutAmbi; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $conf; var $lang; var $user; diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index acb44256537..4103a9cced8 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -34,7 +34,11 @@ class modGeneratePassStandard extends ModeleGenPassword var $id; var $length; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $conf; var $lang; var $user; From a36061079b99d3315e7fd0fd2d941b40878010f2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 11:11:59 +0200 Subject: [PATCH 04/33] Update and standardize code --- htdocs/ecm/class/htmlecm.form.class.php | 5 ++++- htdocs/expedition/class/expedition.class.php | 5 ++++- htdocs/expensereport/class/expensereport.class.php | 5 ++++- htdocs/exports/class/export.class.php | 5 ++++- htdocs/fichinter/class/fichinter.class.php | 5 ++++- htdocs/fourn/class/fournisseur.product.class.php | 5 ++++- htdocs/livraison/class/livraison.class.php | 5 ++++- htdocs/mailmanspip/class/mailmanspip.class.php | 5 ++++- .../mailings/mailinglist_mymodule_myobject.modules.php | 6 +++++- htdocs/product/class/html.formproduct.class.php | 5 ++++- .../product/dynamic_price/class/price_expression.class.php | 5 ++++- .../dynamic_price/class/price_global_variable.class.php | 5 ++++- .../class/price_global_variable_updater.class.php | 5 ++++- htdocs/resource/class/html.formresource.class.php | 5 ++++- htdocs/societe/canvas/actions_card_common.class.php | 6 +++++- htdocs/stripe/class/actions_stripe.class.php | 6 ++++-- htdocs/supplier_proposal/class/supplier_proposal.class.php | 5 ++++- 17 files changed, 70 insertions(+), 18 deletions(-) diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index db3355bce2b..b6000cad923 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -27,7 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; */ class FormEcm { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 448b13f43fa..e9246cbe751 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2278,7 +2278,10 @@ class ExpeditionLigne extends CommonObjectLine */ public $fk_expedition; - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; // From llx_expeditiondet var $qty; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 6271ef7ffdb..821590365d8 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2378,7 +2378,10 @@ class ExpenseReport extends CommonObject */ class ExpenseReportLine { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 050318944d6..4725ea758d5 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -30,7 +30,10 @@ */ class Export { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $array_export_code=array(); // Tableau de "idmodule_numlot" var $array_export_module=array(); // Tableau de "nom de modules" diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d7c2d871824..2c6c8fef402 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1309,7 +1309,10 @@ class Fichinter extends CommonObject */ class FichinterLigne extends CommonObjectLine { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 4180ecaf3d0..da9549bb4ce 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -37,7 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class. */ class ProductFournisseur extends Product { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 46b3c113ff2..bac832f013e 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -1057,7 +1057,10 @@ class Livraison extends CommonObject */ class LivraisonLigne extends CommonObjectLine { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; // From llx_expeditiondet var $qty; diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 1630e61ce33..683e8c25414 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -38,7 +38,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; */ class MailmanSpip { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) 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 cd8612cb7d1..533f07b3ba2 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 @@ -27,7 +27,11 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets var $enabled=0; var $require_module=array(); var $picto='mymodule@mymodule'; - var $db; + + /** + * @var DoliDB Database handler. + */ + public $db; /** diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 53368c0a114..9161581eaae 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; */ class FormProduct { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 958647da0a6..282c1eadf45 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -29,7 +29,10 @@ */ class PriceExpression { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) 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 f09fbd2643f..923c957f051 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -29,7 +29,10 @@ */ class PriceGlobalVariable { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) 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 1cd6318494b..b4fa966119b 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 @@ -29,7 +29,10 @@ */ class PriceGlobalVariableUpdater { - var $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 8a6f9d96c28..2aa19ac66b5 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -33,7 +33,10 @@ require_once DOL_DOCUMENT_ROOT ."/resource/class/dolresource.class.php"; */ class FormResource { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; var $substit=array(); var $param=array(); diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 0243bc7d719..61e0a09f556 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -27,7 +27,11 @@ */ abstract class ActionsCardCommon { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; + var $dirmodule; var $targetmodule; var $canvas; diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php index 141efcf7a47..4fa83f5fe0e 100644 --- a/htdocs/stripe/class/actions_stripe.class.php +++ b/htdocs/stripe/class/actions_stripe.class.php @@ -36,8 +36,10 @@ $langs->load("stripe@stripe"); */ class ActionsStripeconnect { - /** @var DoliDB */ - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; private $config=array(); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 1ffe4465d86..16aad03cee3 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2636,7 +2636,10 @@ class SupplierProposal extends CommonObject */ class SupplierProposalLine extends CommonObjectLine { - var $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) From 0ffad50974eeebc3880a1ece9445b85b1c9e3a3f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 11:24:31 +0200 Subject: [PATCH 05/33] Update and standardize code --- htdocs/accountancy/class/accountingaccount.class.php | 9 ++++++--- htdocs/bookmarks/class/bookmark.class.php | 6 +++++- htdocs/comm/action/class/actioncomm.class.php | 4 +++- htdocs/comm/action/class/cactioncomm.class.php | 5 ++++- htdocs/comm/mailing/class/advtargetemailing.class.php | 5 ++++- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/compta/bank/class/paymentvarious.class.php | 6 +++++- htdocs/compta/facture/class/paymentterm.class.php | 5 ++++- .../compta/prelevement/class/ligneprelevement.class.php | 5 ++++- .../compta/prelevement/class/rejetprelevement.class.php | 5 ++++- htdocs/contrat/class/contrat.class.php | 6 +++++- htdocs/core/class/ccountry.class.php | 6 +++++- htdocs/core/class/cstate.class.php | 6 +++++- htdocs/core/class/ctypent.class.php | 6 +++++- htdocs/core/class/events.class.php | 5 ++++- htdocs/core/class/notify.class.php | 5 ++++- htdocs/core/modules/export/export_csv.modules.php | 6 +++++- htdocs/core/modules/export/export_excel.modules.php | 6 +++++- htdocs/core/modules/export/export_excel2007.modules.php | 6 +++++- htdocs/core/modules/export/export_tsv.modules.php | 6 +++++- htdocs/core/modules/import/import_csv.modules.php | 6 +++++- htdocs/core/modules/import/import_xlsx.modules.php | 6 +++++- .../security/generate/modGeneratePassNone.class.php | 6 +++++- .../security/generate/modGeneratePassPerso.class.php | 6 +++++- .../security/generate/modGeneratePassStandard.class.php | 6 +++++- htdocs/ecm/class/ecmdirectory.class.php | 5 ++++- htdocs/fourn/class/fournisseur.product.class.php | 6 +++++- htdocs/product/class/productcustomerprice.class.php | 6 +++++- htdocs/product/class/propalmergepdfproduct.class.php | 5 ++++- .../dynamic_price/class/price_expression.class.php | 6 +++++- .../dynamic_price/class/price_global_variable.class.php | 6 +++++- .../class/price_global_variable_updater.class.php | 7 ++++++- .../supplier_proposal/class/supplier_proposal.class.php | 7 ++++++- 33 files changed, 157 insertions(+), 35 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 4ffadb799ac..438c7a2312a 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -53,15 +53,18 @@ class AccountingAccount extends CommonObject /** * @var string Error code (or message) */ - public $error=''; - + public $error=''; /** * @var string[] Error codes (or messages) */ public $errors = array(); - var $id; + /** + * @var int ID + */ + public $id; + var $rowid; var $datec; // Creation date var $fk_pcg_version; diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 264f4ce9aec..737ecf717d8 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -38,7 +38,11 @@ class Bookmark extends CommonObject */ public $db; - var $id; + /** + * @var int ID + */ + public $id; + var $fk_user; var $datec; var $url; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index c73216bbc22..ae4fa4d70ee 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -38,11 +38,13 @@ class ActionComm extends CommonObject public $table_element = 'actioncomm'; public $table_rowid = 'id'; public $picto='action'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user, 2=Same than 1 but accept record if fksoc is empty * @var integer @@ -53,7 +55,7 @@ class ActionComm extends CommonObject * Id of the event * @var int */ - var $id; + public $id; /** * Id of the event. Use $id as possible diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index f0b78ca2684..19f970ab9ba 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -38,7 +38,10 @@ class CActionComm */ public $db; - var $id; + /** + * @var int ID + */ + public $id; var $code; var $type; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 702af86708e..e6111038742 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -46,7 +46,10 @@ class AdvanceTargetingMailing extends CommonObject var $element='advtargetemailing'; //!< Id that identify managed objects var $table_element='advtargetemailing'; //!< Name of table without prefix where object is stored - var $id; + /** + * @var int ID + */ + public $id; var $name; var $entity; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index aaf525a29d8..e36c87ed67c 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1647,7 +1647,11 @@ class AccountLine extends CommonObject var $table_element='bank'; var $picto = 'generic'; - var $id; + /** + * @var int ID + */ + public $id; + var $ref; var $datec; var $dateo; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index fe56ea99504..05373f502a1 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -34,7 +34,11 @@ class PaymentVarious extends CommonObject public $table_element='payment_various'; //!< Name of table without prefix where object is stored public $picto = 'bill'; - var $id; + /** + * @var int ID + */ + public $id; + var $ref; var $tms; var $datep; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index a44ea24711e..18a43d6d68d 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -47,7 +47,10 @@ class PaymentTerm // extends CommonObject //public $table_element='c_payment_term'; //!< Name of table without prefix where object is stored var $context =array(); - var $id; + /** + * @var int ID + */ + public $id; var $code; var $sortorder; diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 4087e1c6020..10a7f6d23ee 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -31,7 +31,10 @@ */ class LignePrelevement { - var $id; + /** + * @var int ID + */ + public $id; /** * @var DoliDB Database handler. diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index f0b6916b6fa..606208b5193 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -30,7 +30,10 @@ */ class RejetPrelevement { - var $id; + /** + * @var int ID + */ + public $id; /** * @var DoliDB Database handler. diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 1fb2bb3afa6..9fe66648411 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2454,7 +2454,11 @@ class ContratLigne extends CommonObjectLine public $element='contratdet'; public $table_element='contratdet'; - var $id; + /** + * @var int ID + */ + public $id; + var $ref; var $tms; diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 01b176da165..90164bf99fe 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -50,7 +50,11 @@ class Ccountry // extends CommonObject //var $element='ccountry'; //!< Id that identify managed objects //var $table_element='ccountry'; //!< Name of table without prefix where object is stored - var $id; + /** + * @var int ID + */ + public $id; + var $code; var $code_iso; var $label; diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index e841fc581d8..bb75a36de96 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -50,7 +50,11 @@ class Cstate // extends CommonObject //var $element='cstate'; //!< Id that identify managed objects //var $table_element='cstate'; //!< Name of table without prefix where object is stored - var $id; + /** + * @var int ID + */ + public $id; + var $code_departement; var $nom; var $active; diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 546b182a336..184f5f26a2c 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -45,7 +45,11 @@ class Ctypent // extends CommonObject //var $element='ctypent'; //!< Id that identify managed objects //var $table_element='ctypent'; //!< Name of table without prefix where object is stored - var $id; + /** + * @var int ID + */ + public $id; + var $code; var $libelle; var $active; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index f300d5c49e7..eb054792beb 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -37,7 +37,10 @@ class Events // extends CommonObject public $element='events'; //!< Id that identify managed objects public $table_element='events'; //!< Name of table without prefix where object is stored - var $id; + /** + * @var int ID + */ + public $id; /** * @var DoliDB Database handler. diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index e77978fd62e..f5c0020bac1 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/CMailFile.class.php'; */ class Notify { - var $id; + /** + * @var int ID + */ + public $id; /** * @var DoliDB Database handler. diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 8d35ff63225..6ee453160c7 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; */ class ExportCsv extends ModeleExports { - var $id; + /** + * @var int ID + */ + public $id; + var $label; var $extension; var $version; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 00d06e8511a..659a65edc9b 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; */ class ExportExcel extends ModeleExports { - var $id; + /** + * @var int ID + */ + public $id; + var $label; var $extension; var $version; diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index df9fd9d5705..91757a7d2a1 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -33,7 +33,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; */ class ExportExcel2007 extends ExportExcel { - var $id; + /** + * @var int ID + */ + public $id; + var $label; var $extension; var $version; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 2945c5095b8..15e93493dc0 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; */ class ExportTsv extends ModeleExports { - var $id; + /** + * @var int ID + */ + public $id; + var $label; var $extension; var $version; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 9ea8ee25438..7435e72c595 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -51,7 +51,11 @@ class ImportCsv extends ModeleImports */ public $errors = array (); - var $id; // Id of driver + /** + * @var int ID + */ + public $id; + var $label; // Label of driver var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d9400f2738d..bdb9e8d2949 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -50,7 +50,11 @@ class ImportXlsx extends ModeleImports */ public $errors = array(); - var $id; // Id of driver + /** + * @var int ID + */ + public $id; + var $label; // Label of driver var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index e0c7714f8bb..384b956e85d 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/security/generate/modules_genpass */ class modGeneratePassNone extends ModeleGenPassword { - var $id; + /** + * @var int ID + */ + public $id; + var $length; /** diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index f4734cd5a54..60537bca1d3 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -33,7 +33,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/security/generate/modules_genpass */ class modGeneratePassPerso extends ModeleGenPassword { - var $id; + /** + * @var int ID + */ + public $id; + var $length; var $length2; // didn't overright display var $NbMaj; diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index 4103a9cced8..87a792672fb 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/security/generate/modules_genpass */ class modGeneratePassStandard extends ModeleGenPassword { - var $id; + /** + * @var int ID + */ + public $id; + var $length; /** diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index a3669f909e9..1ae48f2a619 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -31,7 +31,10 @@ class EcmDirectory // extends CommonObject //public $table_element='ecm_directories'; //!< Name of table without prefix where object is stored var $picto = 'dir'; - var $id; + /** + * @var int ID + */ + public $id; var $label; var $fk_parent; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index da9549bb4ce..b109a5e6c71 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -49,7 +49,11 @@ class ProductFournisseur extends Product var $product_fourn_price_id; // id of ligne product-supplier - var $id; // product id + /** + * @var int ID + */ + public $id; + /** * @deprecated * @see ref_supplier diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 56b5004d31b..37c945e3e62 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -950,7 +950,11 @@ class Productcustomerprice extends CommonObject */ class PriceByCustomerLine { - var $id; + /** + * @var int ID + */ + public $id; + var $entity; var $datec = ''; var $tms = ''; diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 641a8f155b7..d69efd3b14d 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -636,7 +636,10 @@ class Propalmergepdfproduct extends CommonObject */ class PropalmergepdfproductLine { - var $id; + /** + * @var int ID + */ + public $id; var $fk_product; var $file_name; diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 282c1eadf45..5e9abd4c241 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -44,7 +44,11 @@ class PriceExpression */ public $errors = array(); - var $id; + /** + * @var int ID + */ + public $id; + var $title; var $expression; public $table_element = "c_price_expression"; 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 923c957f051..a5b02af8061 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -44,7 +44,11 @@ class PriceGlobalVariable */ public $errors = array(); - var $id; + /** + * @var int ID + */ + public $id; + var $code; var $description; var $value; 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 b4fa966119b..f807ac267f3 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 @@ -46,7 +46,12 @@ class PriceGlobalVariableUpdater var $types=array(0, 1); //!< Updater types var $update_min = 5; //!< Minimal update rate - var $id; + + /** + * @var int ID + */ + public $id; + var $type; var $description; var $parameters; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 16aad03cee3..f2945ccc308 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2653,7 +2653,12 @@ class SupplierProposalLine extends CommonObjectLine // From llx_supplier_proposaldet var $rowid; // deprecated - var $id; + + /** + * @var int ID + */ + public $id; + var $fk_supplier_proposal; var $fk_parent_line; var $desc; // Description ligne From 95349365ba5345a3436f90210e583eb799cee8f1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 11:39:37 +0200 Subject: [PATCH 06/33] Update and standardize code --- htdocs/accountancy/class/accountancysystem.class.php | 7 ++++++- htdocs/accountancy/class/accountingaccount.class.php | 7 ++++++- htdocs/comm/action/class/actioncomm.class.php | 5 ++++- htdocs/comm/action/class/cactioncomm.class.php | 7 ++++++- htdocs/commande/class/commande.class.php | 7 ++++++- htdocs/compta/bank/class/account.class.php | 7 ++++++- htdocs/compta/bank/class/paymentvarious.class.php | 7 ++++++- htdocs/compta/localtax/class/localtax.class.php | 7 ++++++- htdocs/compta/tva/class/tva.class.php | 7 ++++++- htdocs/core/class/ccountry.class.php | 7 ++++++- htdocs/core/class/fiscalyear.class.php | 6 +++++- htdocs/core/modules/export/export_csv.modules.php | 6 +++++- htdocs/core/modules/export/export_excel.modules.php | 6 +++++- htdocs/core/modules/export/export_excel2007.modules.php | 6 +++++- htdocs/core/modules/export/export_tsv.modules.php | 6 +++++- htdocs/core/modules/import/import_csv.modules.php | 6 +++++- htdocs/core/modules/import/import_xlsx.modules.php | 6 +++++- htdocs/ecm/class/ecmdirectory.class.php | 6 +++++- htdocs/livraison/class/livraison.class.php | 7 ++++++- htdocs/projet/class/task.class.php | 7 ++++++- 20 files changed, 110 insertions(+), 20 deletions(-) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 7ac8c0881f9..a755c3c0602 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -42,7 +42,12 @@ class AccountancySystem var $fk_pcg_version; var $pcg_type; var $pcg_subtype; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $account_number; var $account_parent; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 438c7a2312a..7837533bfa6 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -73,7 +73,12 @@ class AccountingAccount extends CommonObject var $account_number; var $account_parent; var $account_category; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $fk_user_author; var $fk_user_modif; var $active; // duplicate with status diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index ae4fa4d70ee..78caa56b503 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -69,7 +69,10 @@ class ActionComm extends CommonObject var $type_color; // Color into parent table llx_c_actioncomm (used only if option to use type is set) var $code; // Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) - var $label; + /** + * @var string proper name for given parameter + */ + public $label; /** * @var string diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 19f970ab9ba..a0403c0a0a4 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -46,7 +46,12 @@ class CActionComm var $code; var $type; var $libelle; // deprecated - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $active; var $color; var $picto; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8ee90b6d583..6c5a9db68ac 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3801,7 +3801,12 @@ class OrderLine extends CommonOrderLine // From llx_commandedet var $fk_parent_line; var $fk_facture; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $fk_remise_except; var $rang = 0; var $fk_fournprice; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index e36c87ed67c..28eb0a94443 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1661,7 +1661,12 @@ class AccountLine extends CommonObject */ var $datev; var $amount; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $note; var $fk_user_author; var $fk_user_rappro; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 05373f502a1..f08694e72b6 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -47,7 +47,12 @@ class PaymentVarious extends CommonObject var $amount; var $type_payment; var $num_payment; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $accountancy_code; var $fk_project; var $fk_bank; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index a75de537724..5d2045740bf 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -38,7 +38,12 @@ class Localtax extends CommonObject var $datep; var $datev; var $amount; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index af330910cdf..3ff8df88600 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -43,7 +43,12 @@ class Tva extends CommonObject var $amount; var $type_payment; var $num_payment; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 90164bf99fe..f49d39e8fdd 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -57,7 +57,12 @@ class Ccountry // extends CommonObject var $code; var $code_iso; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $active; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 987033d35e3..482b647a3df 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -36,7 +36,11 @@ class Fiscalyear extends CommonObject var $rowid; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $date_start; var $date_end; var $datec; diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 6ee453160c7..10014eb6d6c 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -35,7 +35,11 @@ class ExportCsv extends ModeleExports */ public $id; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; var $version; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 659a65edc9b..216f45b0148 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -37,7 +37,11 @@ class ExportExcel extends ModeleExports */ public $id; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; var $version; diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 91757a7d2a1..5196561f099 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -38,7 +38,11 @@ class ExportExcel2007 extends ExportExcel */ public $id; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; var $version; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 15e93493dc0..57a074af550 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -36,7 +36,11 @@ class ExportTsv extends ModeleExports */ public $id; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; var $version; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 7435e72c595..1841cac9895 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -56,7 +56,11 @@ class ImportCsv extends ModeleImports */ public $id; - var $label; // Label of driver + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index bdb9e8d2949..f260c255465 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -55,7 +55,11 @@ class ImportXlsx extends ModeleImports */ public $id; - var $label; // Label of driver + /** + * @var string proper name for given parameter + */ + public $label; + var $extension; // Extension of files imported by driver var $version; // Version of driver diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 1ae48f2a619..1ae5f980017 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -36,7 +36,11 @@ class EcmDirectory // extends CommonObject */ public $id; - var $label; + /** + * @var string proper name for given parameter + */ + public $label; + var $fk_parent; var $description; var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated' diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index bac832f013e..f8874b72e3f 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -1069,7 +1069,12 @@ class LivraisonLigne extends CommonObjectLine var $price; var $fk_product; var $origin_id; - var $label; // Label produit + + /** + * @var string proper name for given parameter + */ + public $label; + var $description; // Description produit /** * @deprecated diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 46f04b08932..8fc55605e1f 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -38,7 +38,12 @@ class Task extends CommonObject protected $childtables=array('projet_task_time'); // To test if we can delete object var $fk_task_parent; - var $label; + + /** + * @var string proper name for given parameter + */ + public $label; + var $description; var $duration_effective; // total of time spent on this task var $planned_workload; From e0462b975bf115cfe3838ef93260e7dff0ca9d9b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 11:48:26 +0200 Subject: [PATCH 07/33] Update and standardize code --- htdocs/comm/mailing/class/advtargetemailing.class.php | 6 +++++- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/expedition/class/expeditionbatch.class.php | 6 +++++- htdocs/expensereport/class/expensereport.class.php | 6 +++++- htdocs/product/class/productbatch.class.php | 6 +++++- htdocs/product/class/productcustomerprice.class.php | 6 +++++- htdocs/product/class/propalmergepdfproduct.class.php | 6 +++++- 7 files changed, 35 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index e6111038742..b36e0463b9e 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -43,7 +43,11 @@ class AdvanceTargetingMailing extends CommonObject */ public $errors = array(); - var $element='advtargetemailing'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='advtargetemailing'; + var $table_element='advtargetemailing'; //!< Name of table without prefix where object is stored /** diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 28eb0a94443..a62592aaf2e 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1643,7 +1643,11 @@ class AccountLine extends CommonObject */ public $db; - var $element='bank'; + /** + * @var string ID to identify managed object + */ + public $element='bank'; + var $table_element='bank'; var $picto = 'generic'; diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index d94baee2a43..540b584590b 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -28,7 +28,11 @@ */ class ExpeditionLineBatch extends CommonObject { - var $element='expeditionlignebatch'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='expeditionlignebatch'; + private static $_table_element='expeditiondet_batch'; //!< Name of table without prefix where object is stored var $sellby; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 821590365d8..5e9d11c9c86 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -33,7 +33,11 @@ require_once DOL_DOCUMENT_ROOT .'/expensereport/class/expensereport_rule.class.p */ class ExpenseReport extends CommonObject { - var $element='expensereport'; + /** + * @var string ID to identify managed object + */ + public $element='expensereport'; + var $table_element='expensereport'; var $table_element_line = 'expensereport_det'; var $fk_element = 'fk_expensereport'; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index b52514a4195..4533013d6b6 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Productbatch extends CommonObject { - var $element='productbatch'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='productbatch'; + private static $_table_element='product_batch'; //!< Name of table without prefix where object is stored var $tms=''; diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 37c945e3e62..3c281ee88b7 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -28,7 +28,11 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; */ class Productcustomerprice extends CommonObject { - var $element = 'product_customer_price'; // !< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element = 'product_customer_price'; + var $table_element = 'product_customer_price'; // !< Name of table without prefix where object is stored var $entity; var $datec = ''; diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index d69efd3b14d..2894cfff60b 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Propalmergepdfproduct extends CommonObject { - var $element='propal_merge_pdf_product'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='propal_merge_pdf_product'; + var $table_element='propal_merge_pdf_product'; //!< Name of table without prefix where object is stored var $fk_product; From 6542dcf0bd662ecad90f163af5f680ac6debd981 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 12:04:50 +0200 Subject: [PATCH 08/33] Update and standardize code --- htdocs/accountancy/class/accountancycategory.class.php | 6 +++++- htdocs/accountancy/class/accountingaccount.class.php | 5 +++++ htdocs/accountancy/class/accountingjournal.class.php | 5 +++++ htdocs/comm/mailing/class/advtargetemailing.class.php | 5 ++++- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/expensereport/class/expensereport.class.php | 6 +++++- htdocs/product/class/productcustomerprice.class.php | 6 +++++- htdocs/product/class/propalmergepdfproduct.class.php | 5 ++++- 8 files changed, 38 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 7420ae8a982..127e220d3d1 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -34,7 +34,11 @@ class AccountancyCategory // extends CommonObject public $error; //!< To return error code (or message) public $errors=array(); //!< To return several error codes (or messages) public $element='c_accounting_category'; //!< Id that identify managed objects - public $table_element='c_accounting_category'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='c_accounting_category'; public $id; public $code; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 7837533bfa6..fb2d1d477ed 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -31,7 +31,12 @@ class AccountingAccount extends CommonObject { public $element='accounting_account'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='accounting_account'; + public $picto = 'billr'; /** diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 2291028ddf3..4edc4e3f99a 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -27,7 +27,12 @@ class AccountingJournal extends CommonObject { 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'; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index b36e0463b9e..396c020b7b6 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -48,7 +48,10 @@ class AdvanceTargetingMailing extends CommonObject */ public $element='advtargetemailing'; - var $table_element='advtargetemailing'; //!< Name of table without prefix where object is stored + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='advtargetemailing'; /** * @var int ID diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index a62592aaf2e..26e9527c7f3 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1648,7 +1648,11 @@ class AccountLine extends CommonObject */ public $element='bank'; - var $table_element='bank'; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='bank'; + var $picto = 'generic'; /** diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 5e9d11c9c86..b223174a6f8 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -38,7 +38,11 @@ class ExpenseReport extends CommonObject */ public $element='expensereport'; - var $table_element='expensereport'; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='expensereport'; + var $table_element_line = 'expensereport_det'; var $fk_element = 'fk_expensereport'; var $picto = 'trip'; diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 3c281ee88b7..c0f645b66b2 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -33,7 +33,11 @@ class Productcustomerprice extends CommonObject */ public $element = 'product_customer_price'; - var $table_element = 'product_customer_price'; // !< Name of table without prefix where object is stored + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'product_customer_price'; + var $entity; var $datec = ''; var $tms = ''; diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 2894cfff60b..771a60be60e 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -36,7 +36,10 @@ class Propalmergepdfproduct extends CommonObject */ public $element='propal_merge_pdf_product'; - var $table_element='propal_merge_pdf_product'; //!< Name of table without prefix where object is stored + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='propal_merge_pdf_product'; var $fk_product; var $file_name; From 449ef9c4641cbe90cf3992294682a4356004efe1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 18:12:44 +0200 Subject: [PATCH 09/33] Update and standardize code --- htdocs/accountancy/class/bookkeeping.class.php | 5 ++++- htdocs/adherents/class/adherent.class.php | 5 +++++ htdocs/adherents/class/adherent_type.class.php | 4 ++++ htdocs/adherents/class/adherentstats.class.php | 5 ++++- htdocs/adherents/class/subscription.class.php | 5 +++++ htdocs/asset/class/asset.class.php | 4 ++++ htdocs/asset/class/asset_type.class.php | 4 ++++ htdocs/bookmarks/class/bookmark.class.php | 7 ++++++- htdocs/categories/class/categorie.class.php | 4 ++++ htdocs/comm/action/class/actioncomm.class.php | 7 ++++++- htdocs/comm/action/class/actioncommreminder.class.php | 3 +++ htdocs/comm/mailing/class/mailing.class.php | 5 +++++ htdocs/comm/propal/class/propal.class.php | 11 +++++++++++ htdocs/comm/propal/class/propalestats.class.php | 5 ++++- htdocs/commande/class/commande.class.php | 7 ++++++- htdocs/commande/class/commandestats.class.php | 3 +++ 16 files changed, 78 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 2d9e2fa4fdb..a3a91cdc8e5 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -35,14 +35,17 @@ class BookKeeping extends CommonObject * @var string Error code (or message) */ public $error; + /** * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); + /** * @var string Id to identify managed objects */ public $element = 'accountingbookkeeping'; + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 6b7462ba42a..9ced11e7d5d 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -42,7 +42,12 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; class Adherent extends CommonObject { public $element='member'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='adherent'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $mesgs; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index ca8372c04ed..3af6206d274 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class AdherentType extends CommonObject { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element = 'adherent_type'; + public $element = 'adherent_type'; public $picto = 'group'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 59c51cb1d21..aef2f275c89 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -32,7 +32,10 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; */ class AdherentStats extends Stats { - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 1c4007780b9..71c304e5765 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -33,7 +33,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class Subscription extends CommonObject { public $element='subscription'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='subscription'; + public $picto='payment'; var $datec; // Date creation diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 4ab05ce675c..002dca8bf56 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -35,18 +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 */ diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 51ea3a0c799..8922701d698 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class AssetType extends CommonObject { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element = 'asset_type'; + public $element = 'asset_type'; public $picto = 'group'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 737ecf717d8..a78c75a43db 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -29,7 +29,12 @@ class Bookmark extends CommonObject { public $element='bookmark'; - public $table_element='bookmark'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='bookmark'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'bookmark'; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 70b2108dd4c..1fccadc0a53 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -149,6 +149,10 @@ class Categorie extends CommonObject ); public $element='category'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='categorie'; public $fk_parent; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 78caa56b503..34478c0b6b2 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class ActionComm extends CommonObject { public $element='action'; - public $table_element = 'actioncomm'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'actioncomm'; + public $table_rowid = 'id'; public $picto='action'; diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 4873db461f6..ce32234be56 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -34,14 +34,17 @@ class ActionCommReminder extends CommonObject * @var string ID to identify managed object */ public $element = 'actioncomm_reminder'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'actioncomm_reminder'; + /** * @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; + /** * @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png */ diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 63fc0a2caab..f5c1fd84d9e 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Mailing extends CommonObject { public $element='mailing'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='mailing'; + public $picto='email'; var $titre; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 848ac60d822..02ab37c626a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -46,15 +46,22 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; class Propal extends CommonObject { public $element='propal'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='propal'; + public $table_element_line='propaldet'; public $fk_element='fk_propal'; public $picto='propal'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -3650,6 +3657,10 @@ class Propal extends CommonObject class PropaleLigne extends CommonObjectLine { public $element='propaldet'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='propaldet'; var $oldline; diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index d6e9ee3b103..bb4e0ab56f4 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -35,7 +35,10 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; */ class PropaleStats extends Stats { - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 6c5a9db68ac..6ff85f51ca5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -43,7 +43,12 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; class Commande extends CommonOrder { public $element='commande'; - public $table_element='commande'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='commande'; + public $table_element_line = 'commandedet'; public $class_element_line = 'OrderLine'; public $fk_element = 'fk_commande'; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 6d9dde94bc4..6ab9965f307 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; */ class CommandeStats extends Stats { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element; var $socid; From 504b0e3d162eb0b3193e395e852d5d3ab086bdd3 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 18:34:50 +0200 Subject: [PATCH 10/33] Update and standardize code --- htdocs/compta/bank/class/account.class.php | 5 +++ .../bank/class/paymentvarious.class.php | 7 +++- .../deplacement/class/deplacement.class.php | 5 +++ .../class/deplacementstats.class.php | 5 ++- .../facture/class/facture-rec.class.php | 9 +++++ htdocs/compta/facture/class/facture.class.php | 11 ++++- .../facture/class/facturestats.class.php | 6 ++- .../compta/localtax/class/localtax.class.php | 7 +++- .../cheque/class/remisecheque.class.php | 5 +++ .../compta/paiement/class/cpaiement.class.php | 8 +--- .../compta/paiement/class/paiement.class.php | 7 +++- .../class/bonprelevement.class.php | 5 +++ .../salaries/class/paymentsalary.class.php | 7 +++- .../salaries/class/salariesstats.class.php | 3 ++ .../sociales/class/cchargesociales.class.php | 7 +--- .../sociales/class/chargesociales.class.php | 7 +++- .../class/paymentsocialcontribution.class.php | 7 +++- htdocs/compta/tva/class/tva.class.php | 7 +++- htdocs/contact/class/contact.class.php | 5 +++ htdocs/contrat/class/contrat.class.php | 13 +++++- htdocs/core/class/comment.class.php | 6 ++- htdocs/core/class/commonobject.class.php | 40 ++++++++++++++++++- htdocs/core/class/ctyperesource.class.php | 7 +--- .../core/class/emailsenderprofile.class.php | 3 ++ htdocs/core/class/events.class.php | 6 ++- htdocs/core/class/fiscalyear.class.php | 5 +++ htdocs/core/class/link.class.php | 6 ++- 27 files changed, 174 insertions(+), 35 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 26e9527c7f3..9895de511fe 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Account extends CommonObject { public $element = 'bank_account'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element = 'bank_account'; + public $picto = 'account'; /** diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index f08694e72b6..6215858dd6d 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class PaymentVarious extends CommonObject { public $element='variouspayment'; //!< Id that identify managed objects - public $table_element='payment_various'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='payment_various'; + public $picto = 'bill'; /** diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 05664080ed3..6a51244529a 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Deplacement extends CommonObject { public $element='deplacement'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='deplacement'; + public $table_element_line = ''; public $fk_element = ''; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index 75ac39a7cca..9d99063e726 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -30,7 +30,10 @@ include_once DOL_DOCUMENT_ROOT . '/compta/deplacement/class/deplacement.class.ph */ class DeplacementStats extends Stats { - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 06f33f3f69a..385224e10d7 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -40,7 +40,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class FactureRec extends CommonInvoice { public $element='facturerec'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='facture_rec'; + public $table_element_line='facturedet_rec'; public $fk_element='fk_facture'; public $picto='bill'; @@ -1640,6 +1645,10 @@ class FactureRec extends CommonInvoice class FactureLigneRec extends CommonInvoiceLine { public $element='facturedetrec'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='facturedet_rec'; var $date_start_fill; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index af3597de447..f05c7302ef0 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -54,7 +54,12 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accoun class Facture extends CommonInvoice { public $element='facture'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='facture'; + public $table_element_line = 'facturedet'; public $fk_element = 'fk_facture'; public $picto='bill'; @@ -4232,7 +4237,11 @@ class Facture extends CommonInvoice class FactureLigne extends CommonInvoiceLine { public $element='facturedet'; - public $table_element='facturedet'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='facturedet'; var $oldline; diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index a23d5bdc2c2..e8d8d30e1b5 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -35,7 +35,11 @@ class FactureStats extends Stats var $socid; var $userid; - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; + var $from; var $field; var $where; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 5d2045740bf..717e251f841 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Localtax extends CommonObject { public $element='localtax'; //!< Id that identify managed objects - public $table_element='localtax'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='localtax'; + public $picto='payment'; var $ltt; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 189afeda59f..8981a760864 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -34,7 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; class RemiseCheque extends CommonObject { public $element='chequereceipt'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='bordereau_cheque'; + public $picto = 'payment'; var $num; diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index 59f13023b24..1919b5fa94c 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -34,15 +34,12 @@ class Cpaiement * @var string Id to identify managed objects */ public $element = 'cpaiement'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'c_paiement'; - - /** - */ - public $code; public $libelle; public $type; @@ -50,9 +47,6 @@ class Cpaiement public $accountancy_code; public $module; - /** - */ - /** * Constructor diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 53a17830c09..e8057853952 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; class Paiement extends CommonObject { public $element='payment'; - public $table_element='paiement'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='paiement'; + public $picto = 'payment'; var $facid; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 94d5a764a38..523117b8351 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -40,7 +40,12 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; class BonPrelevement extends CommonObject { public $element='widthdraw'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='prelevement_bons'; + public $picto = 'payment'; var $date_echeance; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 31c616ac00d..edb316674b3 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class PaymentSalary extends CommonObject { public $element='payment_salary'; //!< Id that identify managed objects - public $table_element='payment_salary'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='payment_salary'; + public $picto='payment'; public $tms; diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 647dc27f4a5..82a8d094148 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -29,6 +29,9 @@ include_once DOL_DOCUMENT_ROOT . '/compta/salaries/class/paymentsalary.class.php */ class SalariesStats extends Stats { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element; var $socid; diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index a44b820c8ea..de382423cc5 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -38,14 +38,12 @@ class Cchargesociales * @var string Id to identify managed objects */ public $element = 'cchargesociales'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'c_chargesociales'; - /** - */ - public $libelle; public $deductible; public $active; @@ -53,9 +51,6 @@ class Cchargesociales public $fk_pays; public $module; public $accountancy_code; - - /** - */ /** diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 65e6085a650..023dd334583 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -34,7 +34,12 @@ class ChargeSociales extends CommonObject { public $element='chargesociales'; public $table='chargesociales'; - public $table_element='chargesociales'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='chargesociales'; + public $picto = 'bill'; /** diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 114a2e78cf1..26d8094acbd 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' class PaymentSocialContribution extends CommonObject { public $element='paiementcharge'; //!< Id that identify managed objects - public $table_element='paiementcharge'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='paiementcharge'; + public $picto = 'payment'; var $fk_charge; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 3ff8df88600..d3b7c42b86b 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -34,7 +34,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Tva extends CommonObject { public $element='tva'; //!< Id that identify managed objects - public $table_element='tva'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='tva'; + public $picto='payment'; var $tms; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 92ebbfaeedb..d7d95de2795 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -38,7 +38,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Contact extends CommonObject { public $element='contact'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='socpeople'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'contact'; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 9fe66648411..b857cad8e2e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -42,15 +42,22 @@ require_once DOL_DOCUMENT_ROOT . '/margin/lib/margins.lib.php'; class Contrat extends CommonObject { public $element='contrat'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='contrat'; + public $table_element_line='contratdet'; public $fk_element='fk_contrat'; public $picto='contract'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -2452,7 +2459,11 @@ class Contrat extends CommonObject class ContratLigne extends CommonObjectLine { public $element='contratdet'; - public $table_element='contratdet'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='contratdet'; /** * @var int ID diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 9aeebd575bf..cad33316b68 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -5,7 +5,11 @@ class Comment extends CommonObject { public $element='comment'; //!< Id that identify managed objects - public $table_element='comment'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='comment'; public $fk_element; public $element_type; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 05de2d6d789..9d8462274cb 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -46,47 +46,58 @@ abstract class CommonObject * @var DoliDb Database handler (result of a new DoliDB) */ public $db; + /** * @var int The object identifier */ public $id; + /** * @var string Error string * @see errors */ public $error; + /** * @var string[] Array of error strings */ public $errors=array(); + /** * @var string */ public $element; + /** - * @var string + * @var string Name of table without prefix where object is stored */ - public $table_element; + public $table_element + /** * @var */ public $table_element_line; + /** * @var string Key value used to track if data is coming from import wizard */ public $import_key; + /** * @var mixed Contains data to manage extrafields */ public $array_options=array(); + /** * @var int[][] Array of linked objects ids. Loaded by ->fetchObjectLinked */ public $linkedObjectsIds; + /** * @var mixed Array of linked objects. Loaded by ->fetchObjectLinked */ public $linkedObjects; + /** * @var Object To store a cloned copy of object before to edit it and keep track of old properties */ @@ -116,11 +127,13 @@ abstract class CommonObject * @see fetch_projet() */ public $project; + /** * @var int The related project ID * @see setProject(), project */ public $fk_project; + /** * @deprecated * @see project @@ -132,6 +145,7 @@ abstract class CommonObject * @see fetch_contact() */ public $contact; + /** * @var int The related contact ID * @see fetch_contact() @@ -165,14 +179,17 @@ abstract class CommonObject * @var string The object's reference */ public $ref; + /** * @var string The object's previous reference */ public $ref_previous; + /** * @var string The object's next reference */ public $ref_next; + /** * @var string An external reference for the object */ @@ -189,36 +206,43 @@ abstract class CommonObject * @see getFullAddress() */ public $country; + /** * @var int * @see getFullAddress(), country */ public $country_id; + /** * @var string * @see getFullAddress(), isInEEC(), country */ public $country_code; + /** * @var string * @see getFullAddress() */ public $state; + /** * @var int * @see getFullAddress(), state */ public $state_id; + /** * @var string * @see getFullAddress(), state */ public $state_code; + /** * @var string * @see getFullAddress(), region */ public $region; + /** * @var string * @see getFullAddress(), region @@ -230,16 +254,19 @@ abstract class CommonObject * @see fetch_barcode() */ public $barcode_type; + /** * @var string * @see fetch_barcode(), barcode_type */ public $barcode_type_code; + /** * @var string * @see fetch_barcode(), barcode_type */ public $barcode_type_label; + /** * @var string * @see fetch_barcode(), barcode_type @@ -257,6 +284,7 @@ abstract class CommonObject * @see setPaymentTerms() */ public $cond_reglement_id; + /** * @var int Payment terms ID * @deprecated Kept for compatibility @@ -294,11 +322,13 @@ abstract class CommonObject * @see update_note() */ public $note_public; + /** * @var string Private note * @see update_note() */ public $note_private; + /** * @deprecated * @see note_public @@ -310,21 +340,25 @@ abstract class CommonObject * @see update_price() */ public $total_ht; + /** * @var float Total VAT amount * @see update_price() */ public $total_tva; + /** * @var float Total local tax 1 amount * @see update_price() */ public $total_localtax1; + /** * @var float Total local tax 2 amount * @see update_price() */ public $total_localtax2; + /** * @var float Total amount with taxes * @see update_price() @@ -347,11 +381,13 @@ abstract class CommonObject * @see setIncoterms() */ public $fk_incoterms; + /** * @var string * @see SetIncoterms() */ public $libelle_incoterms; + /** * @var string * @see display_incoterms() diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index a5a6ea879ce..9e0e5b90377 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -36,6 +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 */ @@ -46,16 +47,10 @@ class Ctyperesource */ public $lines = array(); - /** - */ - public $code; public $label; public $active; - /** - */ - /** * Constructor diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 7f34165030b..e0ff56d6736 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -39,14 +39,17 @@ class EmailSenderProfile extends CommonObject * @var string ID to identify managed object */ public $element = 'emailsenderprofile'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'c_email_senderprofile'; + /** * @var array Does emailsenderprofile support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; + /** * @var string String with name of icon for emailsenderprofile */ diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index eb054792beb..7f77f99f183 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -35,7 +35,11 @@ class Events // extends CommonObject { public $element='events'; //!< Id that identify managed objects - public $table_element='events'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='events'; /** * @var int ID diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 482b647a3df..640ad2ed5ac 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -29,7 +29,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Fiscalyear extends CommonObject { public $element='fiscalyear'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='accounting_fiscalyear'; + public $table_element_line = ''; public $fk_element = ''; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 0441c04a86e..4896a1919d7 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class Link extends CommonObject { public $element = 'link'; - public $table_element = 'links'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'links'; public $entity; public $datea; From 06da7f54a2ac42e7dc60049cc78fb5600cfb984a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 18:48:53 +0200 Subject: [PATCH 11/33] Update and standardize code --- htdocs/cron/class/cronjob.class.php | 7 ++++++- htdocs/don/class/don.class.php | 7 ++++++- htdocs/don/class/donstats.class.php | 3 +++ htdocs/don/class/paymentdonation.class.php | 7 ++++++- htdocs/ecm/class/ecmdirectory.class.php | 7 ++++++- htdocs/ecm/class/ecmfiles.class.php | 9 +++------ htdocs/expedition/class/expedition.class.php | 9 +++++++++ .../class/expeditionstats.class.php | 3 +++ .../class/expensereport_ik.class.php | 5 +++++ .../class/expensereport_rule.class.php | 5 +++++ .../class/expensereportstats.class.php | 5 ++++- .../class/paymentexpensereport.class.php | 7 ++++++- htdocs/fichinter/class/fichinter.class.php | 10 ++++++++++ .../fichinter/class/fichinterstats.class.php | 3 +++ .../class/fournisseur.commande.class.php | 14 +++++++++++++- .../fourn/class/fournisseur.facture.class.php | 19 ++++++++++++++++++- htdocs/fourn/class/paiementfourn.class.php | 5 +++++ htdocs/holiday/class/holiday.class.php | 5 +++++ htdocs/hrm/class/establishment.class.php | 5 +++++ htdocs/livraison/class/livraison.class.php | 9 +++++++++ htdocs/loan/class/loan.class.php | 4 ++++ htdocs/loan/class/loanschedule.class.php | 6 +++++- htdocs/loan/class/paymentloan.class.php | 6 +++++- 23 files changed, 144 insertions(+), 16 deletions(-) diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 3ccf27ee676..88d9fc706e1 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; class Cronjob extends CommonObject { public $element='cronjob'; //!< Id that identify managed objects - public $table_element='cronjob'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='cronjob'; + public $picto = 'cron'; public $entity; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 2fa0ee44178..71c8bbd3abb 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Don extends CommonObject { public $element='don'; // Id that identify managed objects - public $table_element='don'; // Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='don'; + public $fk_element = 'fk_donation'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $picto = 'generic'; diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php index dfe74b7f691..52cff09c67e 100644 --- a/htdocs/don/class/donstats.class.php +++ b/htdocs/don/class/donstats.class.php @@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; */ class DonationStats extends Stats { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element; var $socid; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 8d31c292155..939c4e33780 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class PaymentDonation extends CommonObject { public $element='payment_donation'; //!< Id that identify managed objects - public $table_element='payment_donation'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='payment_donation'; + public $picto = 'payment'; public $rowid; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 1ae5f980017..4eb31ee134b 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -28,7 +28,12 @@ class EcmDirectory // extends CommonObject { public $element='ecm_directories'; //!< Id that identify managed objects - //public $table_element='ecm_directories'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + //public $table_element='ecm_directories'; + var $picto = 'dir'; /** diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index df76bac3e9b..d6eff8e697b 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -40,14 +40,14 @@ class EcmFiles extends CommonObject * @var string Id to identify managed objects */ public $element = 'ecmfiles'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'ecm_files'; + public $picto = 'generic'; - /** - */ public $ref; // hash of file path public $label; // hash of file content (md5_file(dol_osencode($destfull)) public $share; // hash for file sharing, empty by default (example: getRandomPassword(true)) @@ -68,10 +68,7 @@ class EcmFiles extends CommonObject public $acl; public $src_object_type; public $src_object_id; - - /** - */ - + /** * Constructor diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e9246cbe751..da911520ead 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -46,7 +46,12 @@ class Expedition extends CommonObject { public $element="shipping"; public $fk_element="fk_expedition"; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element="expedition"; + public $table_element_line="expeditiondet"; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'sending'; @@ -2268,6 +2273,10 @@ class Expedition extends CommonObject class ExpeditionLigne extends CommonObjectLine { public $element='expeditiondet'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='expeditiondet'; public $fk_origin_line; diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 5303d6d8b7b..dcdf9c97617 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; */ class ExpeditionStats extends Stats { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element; var $socid; diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index a93d4e9062c..849d688ba2a 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; class ExpenseReportIk extends CoreObject { public $element='expenseik'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='expensereport_ik'; + public $fk_element='fk_expense_ik'; /** diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 11bc480bf4f..2d2dddb1f66 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; class ExpenseReportRule extends CoreObject { public $element='expenserule'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='expensereport_rules'; + public $fk_element='fk_expense_rule'; /** diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index 2c15b1ffed5..bc306d27e4b 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; */ class ExpenseReportStats extends Stats { - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 781b22d27e7..d8c5f51647b 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class PaymentExpenseReport extends CommonObject { public $element='payment_expensereport'; //!< Id that identify managed objects - public $table_element='payment_expensereport'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='payment_expensereport'; + public $picto = 'payment'; var $rowid; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 2c6c8fef402..e235ec1ea12 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -36,7 +36,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php'; class Fichinter extends CommonObject { public $element='fichinter'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='fichinter'; + public $fk_element='fk_fichinter'; public $table_element_line='fichinterdet'; public $picto = 'intervention'; @@ -1327,7 +1332,12 @@ class FichinterLigne extends CommonObjectLine var $rang = 0; public $element='fichinterdet'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='fichinterdet'; + public $fk_element='fk_fichinter'; /** diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index b435398fec2..aa6d85d0c3f 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -33,6 +33,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; */ class FichinterStats extends Stats { + /** + * @var string Name of table without prefix where object is stored + */ public $table_element; var $socid; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index dfceb8d4e73..6ffc8ebc9b3 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -41,15 +41,22 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; class CommandeFournisseur extends CommonOrder { public $element='order_supplier'; - public $table_element='commande_fournisseur'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='commande_fournisseur'; + public $table_element_line = 'commande_fournisseurdet'; public $fk_element = 'fk_commande'; public $picto='order'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -68,6 +75,7 @@ class CommandeFournisseur extends CommonOrder * @var string */ public $ref; + public $ref_supplier; public $brouillon; public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially @@ -3085,6 +3093,10 @@ class CommandeFournisseur extends CommonOrder class CommandeFournisseurLigne extends CommonOrderLine { public $element='commande_fournisseurdet'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='commande_fournisseurdet'; public $oldline; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 8ce8b796892..813b2a468c4 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -42,15 +42,22 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; class FactureFournisseur extends CommonInvoice { public $element='invoice_supplier'; - public $table_element='facture_fourn'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='facture_fourn'; + public $table_element_line='facture_fourn_det'; public $fk_element='fk_facture_fourn'; public $picto='bill'; + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -100,11 +107,13 @@ class FactureFournisseur extends CommonInvoice public $total_localtax1=0; public $total_localtax2=0; public $total_ttc=0; + /** * @deprecated * @see note_private, note_public */ public $note; + public $note_private; public $note_public; public $propalid; @@ -2557,6 +2566,10 @@ class FactureFournisseur extends CommonInvoice class SupplierInvoiceLine extends CommonObjectLine { public $element='facture_fourn_det'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='facture_fourn_det'; public $oldline; @@ -2566,6 +2579,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @see product_ref */ public $ref; + /** * Internal ref * @var string @@ -2584,6 +2598,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @see label */ public $libelle; + /** * Product description * @var string @@ -2597,6 +2612,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @see subprice */ public $pu_ht; + public $subprice; /** @@ -2612,6 +2628,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @see total_tva */ public $tva; + public $total_tva; /** diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 494196e9c2d..d1c71a2cd98 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -36,7 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; class PaiementFourn extends Paiement { public $element='payment_supplier'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='paiementfourn'; + public $picto = 'payment'; var $statut; //Status of payment. 0 = unvalidated; 1 = validated diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index e5c4faf4d12..5a1078aad82 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -33,7 +33,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Holiday extends CommonObject { public $element='holiday'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='holiday'; + public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $fk_element = 'fk_holiday'; public $picto = 'holiday'; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 8a99788d040..a39e6a20b08 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -29,7 +29,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class Establishment extends CommonObject { public $element='establishment'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='establishment'; + public $table_element_line = ''; public $fk_element = 'fk_establishment'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index f8874b72e3f..dcb560653ea 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -41,7 +41,12 @@ class Livraison extends CommonObject { public $element="delivery"; public $fk_element="fk_livraison"; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element="livraison"; + public $table_element_line="livraisondet"; var $brouillon; @@ -1091,6 +1096,10 @@ class LivraisonLigne extends CommonObjectLine public $product_label; public $element='livraisondet'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='livraisondet'; /** diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 7843694585f..1e75aa063cf 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -31,6 +31,10 @@ class Loan extends CommonObject { public $element='loan'; public $table='loan'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='loan'; public $picto = 'bill'; diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index a430f79366e..dbf3f3f3e46 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class LoanSchedule extends CommonObject { public $element='loan_schedule'; //!< Id that identify managed objects - public $table_element='loan_schedule'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='loan_schedule'; var $fk_loan; var $datec=''; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 595aead109e..9d845b7a1cd 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class PaymentLoan extends CommonObject { public $element='payment_loan'; //!< Id that identify managed objects - public $table_element='payment_loan'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='payment_loan'; var $fk_loan; var $datec=''; From 0c75c41e7bb37e48775535c025b7a1ab576366f2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 22 Aug 2018 19:56:24 +0200 Subject: [PATCH 12/33] Update and standardize code --- .../class/fournisseur.commande.dispatch.class.php | 4 ++++ .../template/class/myobject.class.php | 8 ++++++++ htdocs/multicurrency/class/multicurrency.class.php | 14 ++++++++++++++ .../opensurvey/class/opensurveysondage.class.php | 7 ++++++- htdocs/product/class/product.class.php | 5 +++++ .../dynamic_price/class/price_expression.class.php | 6 +++++- .../class/price_global_variable.class.php | 6 +++++- .../class/price_global_variable_updater.class.php | 6 +++++- htdocs/product/inventory/class/inventory.class.php | 6 ++++++ htdocs/product/stock/class/entrepot.class.php | 5 +++++ .../product/stock/class/mouvementstock.class.php | 1 + htdocs/product/stock/class/productlot.class.php | 1 + .../stock/class/productstockentrepot.class.php | 7 +------ htdocs/projet/class/project.class.php | 7 ++++++- htdocs/projet/class/task.class.php | 7 ++++++- htdocs/resource/class/dolresource.class.php | 7 ++++++- htdocs/societe/class/companypaymentmode.class.php | 4 ++++ htdocs/societe/class/societe.class.php | 5 +++++ htdocs/societe/class/societeaccount.class.php | 3 +++ .../class/supplier_proposal.class.php | 13 +++++++++++-- htdocs/ticket/class/ticket.class.php | 5 +++++ htdocs/ticket/class/ticketlogs.class.php | 6 +++++- htdocs/ticket/class/ticketstats.class.php | 5 ++++- htdocs/user/class/user.class.php | 5 +++++ htdocs/user/class/usergroup.class.php | 5 +++++ htdocs/website/class/website.class.php | 10 ++++++++++ htdocs/website/class/websitepage.class.php | 5 ++--- 27 files changed, 143 insertions(+), 20 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 910115d8822..f84bc7e5f31 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -38,6 +38,10 @@ class CommandeFournisseurDispatch extends CommonObject public $error; //!< To return error code (or message) public $errors=array(); //!< To return several error codes (or messages) public $element='commandefournisseurdispatch'; //!< Id that identify managed objects + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='commande_fournisseur_dispatch'; //!< Name of table without prefix where object is stored public $lines=array(); diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index c6cd6fae901..24ff8d8ee8f 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -36,18 +36,22 @@ class MyObject extends CommonObject * @var string ID to identify managed object */ public $element = 'myobject'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'mymodule_myobject'; + /** * @var int Does myobject 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 myobject support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; + /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ @@ -117,18 +121,22 @@ class MyObject extends CommonObject * @var int Name of subtable line */ //public $table_element_line = 'myobjectdet'; + /** * @var int Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_myobject'; + /** * @var int Name of subtable class that manage subtable lines */ //public $class_element_line = 'MyObjectline'; + /** * @var array Array of child tables (child tables to delete before deleting a record) */ //protected $childtables=array('myobjectdet'); + /** * @var MyObjectLine[] Array of subtable lines */ diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index 926fb20098b..eda61f27b98 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -42,10 +42,12 @@ class MultiCurrency extends CommonObject * @var string Id to identify managed objects */ public $element = 'multicurrency'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'multicurrency'; + /** * @var string Name of table without prefix where object is stored */ @@ -60,26 +62,32 @@ class MultiCurrency extends CommonObject * @var mixed Sample property 1 */ public $id; + /** * @var mixed Sample property 1 */ public $code; + /** * @var mixed Sample property 2 */ public $name; + /** * @var mixed Sample property 2 */ public $entity; + /** * @var mixed Sample property 2 */ public $date_create; + /** * @var mixed Sample property 2 */ public $fk_user; + /** * @var mixed Sample property 2 */ @@ -687,26 +695,32 @@ class CurrencyRate extends CommonObjectLine * @var string Id to identify managed objects */ public $element = 'multicurrency_rate'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'multicurrency_rate'; + /** * @var int ID */ public $id; + /** * @var double Rate */ public $rate; + /** * @var date Date synchronisation */ public $date_sync; + /** * @var int Id of currency */ public $fk_multicurrency; + /** * @var int Id of entity */ diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index d80bac70b79..f62fd69c781 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; class Opensurveysondage extends CommonObject { public $element='opensurvey_sondage'; //!< Id that identify managed objects - public $table_element='opensurvey_sondage'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='opensurvey_sondage'; + public $picto = 'opensurvey'; public $id_sondage; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a6db67c7709..b02da68cc12 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -44,7 +44,12 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; class Product extends CommonObject { public $element='product'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='product'; + public $fk_element='fk_product'; protected $childtables=array('supplier_proposaldet', 'propaldet','commandedet','facturedet','contratdet','facture_fourn_det','commande_fournisseurdet'); // To test if we can delete object public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 5e9abd4c241..b06bdfe211e 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -51,7 +51,11 @@ class PriceExpression var $title; var $expression; - public $table_element = "c_price_expression"; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = "c_price_expression"; /** * Constructor 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 a5b02af8061..f30260a30c0 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -52,7 +52,11 @@ class PriceGlobalVariable var $code; var $description; var $value; - public $table_element = "c_price_global_variable"; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = "c_price_global_variable"; /** * Constructor 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 f807ac267f3..7ca18f36b5d 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 @@ -59,7 +59,11 @@ class PriceGlobalVariableUpdater var $update_interval; //!< Interval in mins var $next_update; //!< Next update timestamp var $last_status; - public $table_element = "c_price_global_variable_updater"; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = "c_price_global_variable_updater"; /** * Constructor diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index dc4f600b529..7ba2d5cf5f1 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -38,6 +38,7 @@ class Inventory extends CommonObject * @var string ID to identify managed object */ public $element = 'inventory'; + /** * @var string Name of table without prefix where object is stored */ @@ -47,6 +48,7 @@ class Inventory extends CommonObject * @var array Does inventory support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; + /** * @var string String with name of icon for inventory */ @@ -121,18 +123,22 @@ class Inventory extends CommonObject * @var int Name of subtable line */ //public $table_element_line = 'inventorydet'; + /** * @var int Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_inventory'; + /** * @var int Name of subtable class that manage subtable lines */ //public $class_element_line = 'Inventoryline'; + /** * @var array Array of child tables (child tables to delete before deleting a record) */ //protected $childtables=array('inventorydet'); + /** * @var InventoryLine[] Array of subtable lines */ diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index bae42639d28..edae2d19f05 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -34,7 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class Entrepot extends CommonObject { public $element='stock'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='entrepot'; + public $picto='stock'; /** diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 41c00b7361c..7cb06de918e 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -34,6 +34,7 @@ class MouvementStock extends CommonObject * @var string Id to identify managed objects */ public $element = 'stockmouvement'; + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 8370e8ce080..bb9072b485d 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -39,6 +39,7 @@ class Productlot extends CommonObject * @var string Id to identify managed objects */ public $element = 'productlot'; + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index cbca4e5854d..01379e8859c 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -44,14 +44,12 @@ class ProductStockEntrepot extends CommonObject * @var string Id to identify managed objects */ public $element = 'ProductStockEntrepot'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'product_warehouse_properties'; - /** - */ - public $tms = ''; public $fk_product; public $fk_entrepot; @@ -59,9 +57,6 @@ class ProductStockEntrepot extends CommonObject public $desiredstock; public $import_key; - /** - */ - /** * Constructor diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index dbd2ee57103..16c187e1842 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -34,7 +34,12 @@ class Project extends CommonObject { public $element = 'project'; //!< Id that identify managed objects - public $table_element = 'projet'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'projet'; + public $table_element_line = 'projet_task'; public $fk_element = 'fk_projet'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 8fc55605e1f..e7546048950 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class Task extends CommonObject { public $element='project_task'; //!< Id that identify managed objects - public $table_element='projet_task'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='projet_task'; + public $fk_element='fk_task'; public $picto = 'task'; protected $childtables=array('projet_task_time'); // To test if we can delete object diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 229faccff9a..4e580fd6e26 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php"; class Dolresource extends CommonObject { public $element='dolresource'; //!< Id that identify managed objects - public $table_element='resource'; //!< Name of table without prefix where object is stored + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='resource'; + public $picto = 'resource'; public $resource_id; diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 4403d5b8fde..15a254844f0 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -36,18 +36,22 @@ class CompanyPaymentMode extends CommonObject * @var string ID to identify managed object */ public $element = 'companypaymentmode'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'societe_rib'; + /** * @var int Does companypaymentmode support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 2; + /** * @var int Does companypaymentmode support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 0; + /** * @var string String with name of icon for companypaymentmode. Must be the part after the 'object_' into object_companypaymentmode.png */ diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c70d0a1a3e2..39fa367e26a 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -42,7 +42,12 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; class Societe extends CommonObject { public $element='societe'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element = 'societe'; + public $fk_element='fk_soc'; public $fieldsforcombobox='nom,name_alias'; protected $childtables=array("supplier_proposal"=>'SupplierProposal',"propal"=>'Proposal',"commande"=>'Order',"facture"=>'Invoice',"facture_rec"=>'RecurringInvoiceTemplate',"contrat"=>'Contract',"fichinter"=>'Fichinter',"facture_fourn"=>'SupplierInvoice',"commande_fournisseur"=>'SupplierOrder',"projet"=>'Project',"expedition"=>'Shipment',"prelevement_lignes"=>'DirectDebitRecord'); // To test if we can delete object diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 7340a319534..e6620657956 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -39,14 +39,17 @@ class SocieteAccount extends CommonObject * @var string ID to identify managed object */ public $element = 'societeaccount'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'societe_account'; + /** * @var array Does societeaccount support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; + /** * @var string String with name of icon for societeaccount. Must be the part after the 'object_' into object_myobject.png */ diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index f2945ccc308..34485e0b4fe 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -46,7 +46,12 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; class SupplierProposal extends CommonObject { public $element='supplier_proposal'; - public $table_element='supplier_proposal'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='supplier_proposal'; + public $table_element_line='supplier_proposaldet'; public $fk_element='fk_supplier_proposal'; public $picto='propal'; @@ -2647,7 +2652,11 @@ class SupplierProposalLine extends CommonObjectLine public $error=''; public $element='supplier_proposaldet'; - public $table_element='supplier_proposaldet'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element='supplier_proposaldet'; var $oldline; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 4430ae3e0f0..17cead40826 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -38,22 +38,27 @@ class Ticket extends CommonObject * @var string ID to identify managed object */ public $element = 'ticket'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'ticket'; + /** * @var string Name of field for link to tickets */ public $fk_element='fk_ticket'; + /** * @var int Does ticketcore 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 ticketcore support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; + /** * @var string String with name of icon for ticketcore. Must be the part after the 'object_' into object_ticketcore.png */ diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index b4a464f6a17..792d5e55196 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -35,8 +35,12 @@ class Ticketlogs// extends CommonObject public $db; //!< To store db handler public $error; //!< To return error code (or message) public $errors = array(); //!< To return several error codes (or messages) + public $element = 'ticketlogs'; //!< Id that identify managed objects - public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored public $id; diff --git a/htdocs/ticket/class/ticketstats.class.php b/htdocs/ticket/class/ticketstats.class.php index 6b65f25016a..28a49a3bd8f 100644 --- a/htdocs/ticket/class/ticketstats.class.php +++ b/htdocs/ticket/class/ticketstats.class.php @@ -29,7 +29,10 @@ require_once 'ticket.class.php'; */ class TicketStats extends Stats { - public $table_element; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element; public $socid; public $userid; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 93a51cc9da0..90b5d477180 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -41,7 +41,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class User extends CommonObject { public $element='user'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='user'; + public $fk_element='fk_user'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 9c2f3437fa4..7bcfa05ab28 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -36,7 +36,12 @@ if (! empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT."/core/class/l class UserGroup extends CommonObject { public $element='usergroup'; + + /** + * @var string Name of table without prefix where object is stored + */ public $table_element='usergroup'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto='group'; public $entity; // Entity of group diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index ed49d4a43d7..be6770743bc 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -39,14 +39,17 @@ class Website extends CommonObject * @var string Id to identify managed objects */ public $element = 'website'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'website'; + /** * @var array Does website support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; + /** * @var string String with name of icon for website. Must be the part after the 'object_' into object_myobject.png */ @@ -56,30 +59,37 @@ class Website extends CommonObject * @var int */ public $entity; + /** * @var string */ public $ref; + /** * @var string */ public $description; + /** * @var int */ public $status; + /** * @var mixed */ public $date_creation; + /** * @var mixed */ public $tms = ''; + /** * @var integer */ public $fk_default_home; + /** * @var string */ diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 17ad6e31c87..c4253683151 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -39,18 +39,17 @@ class WebsitePage extends CommonObject * @var string Id to identify managed objects */ public $element = 'websitepage'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'website_page'; + /** * @var string String with name of icon for websitepage. Must be the part after the 'object_' into object_myobject.png */ public $picto = 'label'; - /** - */ - public $fk_website; public $pageurl; public $aliasalt; From 137b715868f7dbec2c5cd237a46aeb6e26e266c6 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:28:33 +0200 Subject: [PATCH 13/33] Update deplacementstats.class.php --- htdocs/compta/deplacement/class/deplacementstats.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index 9d99063e726..e490c90f1ed 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -31,9 +31,9 @@ include_once DOL_DOCUMENT_ROOT . '/compta/deplacement/class/deplacement.class.ph class DeplacementStats extends Stats { /** - * @var string Name of table without prefix where object is stored - */ - public $table_element; + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; From 25b1b08d922964f2844495e0f44292defc30808f Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:30:09 +0200 Subject: [PATCH 14/33] Update accountancysystem.class.php --- htdocs/accountancy/class/accountancysystem.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index a755c3c0602..8b30070317a 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -28,7 +28,7 @@ */ class AccountancySystem { - /** + /** * @var DoliDB Database handler. */ public $db; @@ -43,7 +43,7 @@ class AccountancySystem var $pcg_type; var $pcg_subtype; - /** + /** * @var string proper name for given parameter */ public $label; From ec8422af73ac7f7251631a41e80678bb21000ca5 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:31:54 +0200 Subject: [PATCH 15/33] Update accountingaccount.class.php --- htdocs/accountancy/class/accountingaccount.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index fb2d1d477ed..ad55862e6a2 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -51,9 +51,9 @@ class AccountingAccount extends CommonObject public $restrictiononfksoc = 1; /** - * @var DoliDB Database handler. - */ - public $db; + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) @@ -80,9 +80,9 @@ class AccountingAccount extends CommonObject var $account_category; /** - * @var string proper name for given parameter - */ - public $label; + * @var string proper name for given parameter + */ + public $label; var $fk_user_author; var $fk_user_modif; From 92cb9c42047b4205e8e7391dfa0394c19e1daed1 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:35:04 +0200 Subject: [PATCH 16/33] Update adherentstats.class.php --- htdocs/adherents/class/adherentstats.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index aef2f275c89..bfa990a04c0 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -33,9 +33,9 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; class AdherentStats extends Stats { /** - * @var string Name of table without prefix where object is stored - */ - public $table_element; + * @var string Name of table without prefix where object is stored + */ + public $table_element; var $socid; var $userid; From d03900c6f8e00dec8239bf8a1417a12c4ad6a51a Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:36:07 +0200 Subject: [PATCH 17/33] Update bookmark.class.php --- htdocs/bookmarks/class/bookmark.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index a78c75a43db..da76cac7a0a 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -31,9 +31,9 @@ class Bookmark extends CommonObject public $element='bookmark'; /** - * @var string Name of table without prefix where object is stored - */ - public $table_element='bookmark'; + * @var string Name of table without prefix where object is stored + */ + public $table_element='bookmark'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $picto = 'bookmark'; From 4066af99e06576ee68ddf3014dae1d1986a9ecac Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:37:02 +0200 Subject: [PATCH 18/33] Update bookmark.class.php --- htdocs/bookmarks/class/bookmark.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index da76cac7a0a..3bbdf293f37 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -44,9 +44,9 @@ class Bookmark extends CommonObject public $db; /** - * @var int ID - */ - public $id; + * @var int ID + */ + public $id; var $fk_user; var $datec; From c626dcb7107811250692a37f8bd4bf2efc5043ed Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:38:00 +0200 Subject: [PATCH 19/33] Update actioncomm.class.php --- htdocs/comm/action/class/actioncomm.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 34478c0b6b2..32a442885f8 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -37,9 +37,9 @@ class ActionComm extends CommonObject public $element='action'; /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'actioncomm'; + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'actioncomm'; public $table_rowid = 'id'; public $picto='action'; From eeaa257f1118879d8b1a337f0d2a40ad6771f88f Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:39:51 +0200 Subject: [PATCH 20/33] Update cactioncomm.class.php --- htdocs/comm/action/class/cactioncomm.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index a0403c0a0a4..cdccca9968b 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -29,9 +29,9 @@ class CActionComm { /** - * @var string Error code (or message) - */ - public $error=''; + * @var string Error code (or message) + */ + public $error=''; /** * @var DoliDB Database handler. @@ -39,9 +39,9 @@ class CActionComm public $db; /** - * @var int ID - */ - public $id; + * @var int ID + */ + public $id; var $code; var $type; From 9b2e754b466790eaaab4bf585503dd6693a88332 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:41:22 +0200 Subject: [PATCH 21/33] Update advtargetemailing.class.php --- htdocs/comm/mailing/class/advtargetemailing.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 396c020b7b6..1f4968ef6b2 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -29,9 +29,9 @@ class AdvanceTargetingMailing extends CommonObject { /** - * @var DoliDB Database handler. - */ - public $db; + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) @@ -972,4 +972,4 @@ class AdvanceTargetingMailing extends CommonObject } -} \ No newline at end of file +} From 3309badd8ddedc747e5ac396d2de138bd7a2313b Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Wed, 22 Aug 2018 22:43:17 +0200 Subject: [PATCH 22/33] Update accountingaccount.class.php --- htdocs/accountancy/class/accountingaccount.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index ad55862e6a2..6a72b881aab 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -44,6 +44,7 @@ class AccountingAccount extends CommonObject * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer From e09f7bedd026085b0b81858aca0146bd5a23ac39 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 23 Aug 2018 09:57:19 +0200 Subject: [PATCH 23/33] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9d8462274cb..97ba1f814d0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -71,7 +71,7 @@ abstract class CommonObject /** * @var string Name of table without prefix where object is stored */ - public $table_element + public $table_element; /** * @var From 0e3c9ffd512dd90f4ceb9f32b4080a5a74fed505 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 23 Aug 2018 10:05:02 +0200 Subject: [PATCH 24/33] Update fournisseur.facture.class.php --- htdocs/fourn/class/fournisseur.facture.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 813b2a468c4..b3d62a4f6b8 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -44,9 +44,9 @@ class FactureFournisseur extends CommonInvoice public $element='invoice_supplier'; /** - * @var string Name of table without prefix where object is stored - */ - public $table_element='facture_fourn'; + * @var string Name of table without prefix where object is stored + */ + public $table_element='facture_fourn'; public $table_element_line='facture_fourn_det'; public $fk_element='fk_facture_fourn'; From b81751799732aa217e6c9c7a43d096ba49fa4f74 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 23 Aug 2018 10:08:17 +0200 Subject: [PATCH 25/33] Update fournisseur.product.class.php --- .../fourn/class/fournisseur.product.class.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index b109a5e6c71..8f77d152036 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -43,21 +43,21 @@ class ProductFournisseur extends Product public $db; /** - * @var string Error code (or message) - */ - public $error=''; + * @var string Error code (or message) + */ + public $error=''; var $product_fourn_price_id; // id of ligne product-supplier /** - * @var int ID - */ - public $id; + * @var int ID + */ + public $id; - /** - * @deprecated - * @see ref_supplier - */ + /** + * @deprecated + * @see ref_supplier + */ var $fourn_ref; var $delivery_time_days; var $ref_supplier; // ref supplier (can be set by get_buyprice) @@ -89,9 +89,9 @@ class ProductFournisseur extends Product var $fourn_multicurrency_unitprice; /** - * Constructor - * - * @param DoliDB $db Database handler + * Constructor + * + * @param DoliDB $db Database handler */ function __construct($db) { From 20e7fc09696c3f502e35dee7ffa5a3689ae65c40 Mon Sep 17 00:00:00 2001 From: Philippe Grand Date: Thu, 23 Aug 2018 10:11:40 +0200 Subject: [PATCH 26/33] Update livraison.class.php --- htdocs/livraison/class/livraison.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index dcb560653ea..f61c8eabb2a 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -3,8 +3,8 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006-2007 Laurent Destailleur * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2011-2012 Philippe Grand - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify @@ -1062,7 +1062,7 @@ class Livraison extends CommonObject */ class LivraisonLigne extends CommonObjectLine { - /** + /** * @var DoliDB Database handler. */ public $db; @@ -1075,7 +1075,7 @@ class LivraisonLigne extends CommonObjectLine var $fk_product; var $origin_id; - /** + /** * @var string proper name for given parameter */ public $label; From aafa16afa5fc664b52ead32c8acb5b914d972a34 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 11:11:46 +0200 Subject: [PATCH 27/33] Update and standardize code --- htdocs/accountancy/class/accountancycategory.class.php | 6 +++++- htdocs/core/boxes/box_last_modified_ticket.php | 5 +++++ htdocs/core/boxes/box_last_ticket.php | 5 +++++ htdocs/core/class/discount.class.php | 4 ++++ htdocs/core/class/html.formticket.class.php | 3 +++ htdocs/core/class/menubase.class.php | 6 +++++- htdocs/core/modules/import/modules_import.php | 4 ++++ .../triggers/interface_50_modTicket_TicketEmail.class.php | 3 +++ .../core/triggers/interface_80_modStripe_Stripe.class.php | 3 +++ htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 6 +++++- htdocs/ticket/class/actions_ticket.class.php | 4 ++++ htdocs/ticket/class/ticketlogs.class.php | 6 +++++- 12 files changed, 51 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 127e220d3d1..4cb11b78d44 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; */ class AccountancyCategory // extends CommonObject { - public $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; + public $error; //!< To return error code (or message) public $errors=array(); //!< To return several error codes (or messages) public $element='c_accounting_category'; //!< Id that identify managed objects diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index a0613d58f3e..9ce7dd91605 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -34,7 +34,12 @@ class box_last_modified_ticket extends ModeleBoxes public $boximg = "ticket"; public $boxlabel; public $depends = array("ticket"); + + /** + * @var DoliDB Database handler. + */ public $db; + public $param; public $info_box_head = array(); public $info_box_contents = array(); diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index 2dfa71af904..a824a707168 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -34,7 +34,12 @@ class box_last_ticket extends ModeleBoxes public $boximg = "ticket"; public $boxlabel; public $depends = array("ticket"); + + /** + * @var DoliDB Database handler. + */ public $db; + public $param; public $info_box_head = array(); public $info_box_contents = array(); diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 9fc1921aa60..aa6c6eb9b5c 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -28,7 +28,11 @@ */ class DiscountAbsolute { + /** + * @var DoliDB Database handler. + */ public $db; + public $error; public $id; // Id discount diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 9c3daefd62a..5da6f4fe439 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -39,6 +39,9 @@ if (!class_exists('FormCompany')) { */ class FormTicket { + /** + * @var DoliDB Database handler. + */ public $db; public $track_id; diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 48880633563..e0ea1d57378 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -28,7 +28,11 @@ */ class Menubase { - public $db; // To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; + public $error; // To return error code (or message) public $errors=array(); // To return several error codes (or messages) diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 548bb128193..7c26fdb68d3 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; */ class ModeleImports { + /** + * @var DoliDB Database handler. + */ public $db; + public $datatoimport; public $error=''; diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 3e28ea3e4ef..317cb6a22c6 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -30,6 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; */ class InterfaceTicketEmail extends DolibarrTriggers { + /** + * @var DoliDB Database handler. + */ public $db; /** diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index 79ef62675e9..ab0cd62eb82 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; */ class InterfaceStripe { + /** + * @var DoliDB Database handler. + */ public $db; /** diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index f84bc7e5f31..d957d0969cd 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -34,7 +34,11 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class CommandeFournisseurDispatch extends CommonObject { - public $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; + public $error; //!< To return error code (or message) public $errors=array(); //!< To return several error codes (or messages) public $element='commandefournisseurdispatch'; //!< Id that identify managed objects diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index fdfe342f35d..27dbf9ff942 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -35,7 +35,11 @@ require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; */ class ActionsTicket { + /** + * @var DoliDB Database handler. + */ public $db; + public $dao; public $mesg; diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index 792d5e55196..448d3cc7c41 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT . "/core/class/commonobject.class.php"; */ class Ticketlogs// extends CommonObject { - public $db; //!< To store db handler + /** + * @var DoliDB Database handler. + */ + public $db; + public $error; //!< To return error code (or message) public $errors = array(); //!< To return several error codes (or messages) From 80b7229174f92d8c9fe99db92b8bbbae7b40e705 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 11:34:55 +0200 Subject: [PATCH 28/33] Standardize and update code --- htdocs/accountancy/class/accountancycategory.class.php | 7 ++++++- htdocs/core/class/discount.class.php | 5 ++++- htdocs/core/class/html.formfile.class.php | 4 ++++ htdocs/core/class/html.formother.class.php | 6 +++++- htdocs/core/class/html.formticket.class.php | 5 ++++- htdocs/core/class/html.formwebsite.class.php | 6 +++++- htdocs/core/class/menubase.class.php | 6 +++++- htdocs/ecm/class/ecmdirectory.class.php | 4 ++++ htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 6 +++++- htdocs/ticket/class/actions_ticket.class.php | 7 ++++++- htdocs/ticket/class/ticketlogs.class.php | 6 +++++- 11 files changed, 53 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 4cb11b78d44..6bbe6e08dfb 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -35,7 +35,12 @@ class AccountancyCategory // extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error string + * @see errors + */ + public $error; + public $errors=array(); //!< To return several error codes (or messages) public $element='c_accounting_category'; //!< Id that identify managed objects diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index aa6c6eb9b5c..b3cfb73654b 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -33,7 +33,10 @@ class DiscountAbsolute */ public $db; - public $error; + /** + * @var string Error code (or message) + */ + public $error; public $id; // Id discount public $fk_soc; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 117ec484c15..15e22944d83 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -36,7 +36,11 @@ class FormFile { private $db; + /** + * @var string Error code (or message) + */ public $error; + public $numoffiles; public $infofiles; // Used to return informations by function getDocumentsLink diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 69fe03ecaa1..6982a8a6971 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -38,7 +38,11 @@ class FormOther { private $db; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 5da6f4fe439..c0f4a3f75d2 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -83,7 +83,10 @@ class FormTicket public $substit = array(); public $param = array(); - public $error; + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index fc863c4d069..5b883835fd3 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -28,7 +28,11 @@ class FormWebsite { private $db; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index e0ea1d57378..64589e0db65 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -33,7 +33,11 @@ class Menubase */ public $db; - public $error; // To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors=array(); // To return several error codes (or messages) public $id; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 4eb31ee134b..cdaaa67b794 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -63,7 +63,11 @@ class EcmDirectory // extends CommonObject public $full_arbo_loaded; + /** + * @var string Error code (or message) + */ public $error; + public $errors; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index d957d0969cd..1f6929614aa 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -39,7 +39,11 @@ class CommandeFournisseurDispatch extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors=array(); //!< To return several error codes (or messages) public $element='commandefournisseurdispatch'; //!< Id that identify managed objects diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 27dbf9ff942..b4aaf17e9d8 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -43,7 +43,12 @@ class ActionsTicket public $dao; public $mesg; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; + public $errors = array(); //! Numero de l'erreur public $errno = 0; diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index 448d3cc7c41..fd996d4e3c4 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -37,7 +37,11 @@ class Ticketlogs// extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors = array(); //!< To return several error codes (or messages) public $element = 'ticketlogs'; //!< Id that identify managed objects From 74ce0bfea6ae285589f63bc083235880f8e07e1b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 16:54:24 +0200 Subject: [PATCH 29/33] Standardize and update code --- htdocs/accountancy/class/accountancycategory.class.php | 6 +++++- htdocs/blockedlog/class/blockedlog.class.php | 4 ++++ htdocs/core/class/dolreceiptprinter.class.php | 4 ++-- htdocs/core/class/html.formmailing.class.php | 5 ++++- htdocs/core/class/menubase.class.php | 5 ++++- htdocs/core/modules/import/import_csv.modules.php | 3 +-- htdocs/ecm/class/ecmdirectory.class.php | 5 ++++- htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 6 +++++- htdocs/ticket/class/actions_ticket.class.php | 6 +++++- htdocs/ticket/class/ticketlogs.class.php | 5 ++++- 10 files changed, 38 insertions(+), 11 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 6bbe6e08dfb..14fedab9b16 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -41,7 +41,11 @@ class AccountancyCategory // extends CommonObject */ public $error; - public $errors=array(); //!< To return several error codes (or messages) + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); + public $element='c_accounting_category'; //!< Id that identify managed objects /** diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 4d7c5e5c3c4..654709cec6f 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -46,6 +46,10 @@ class BlockedLog public $entity; public $error = ''; + + /** + * @var string[] Error codes (or messages) + */ public $errors = array(); /** diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 78a9b2479eb..34f725b8258 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -119,11 +119,11 @@ class dolReceiptPrinter extends Escpos * @var string Error code (or message) */ public $error=''; + /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); diff --git a/htdocs/core/class/html.formmailing.class.php b/htdocs/core/class/html.formmailing.class.php index c0cadfba460..067692f5094 100644 --- a/htdocs/core/class/html.formmailing.class.php +++ b/htdocs/core/class/html.formmailing.class.php @@ -27,7 +27,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; */ class FormMailing extends Form { - public $errors=array(); + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); /** * Output a select with destinaries status diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 64589e0db65..715f17b5a92 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -38,7 +38,10 @@ class Menubase */ public $error; - public $errors=array(); // To return several error codes (or messages) + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); public $id; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 1841cac9895..09b33aea877 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -46,10 +46,9 @@ class ImportCsv extends ModeleImports public $error=''; /** - * * @var string[] Error codes (or messages) */ - public $errors = array (); + public $errors = array(); /** * @var int ID diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index cdaaa67b794..6f3aefbc9d8 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -68,7 +68,10 @@ class EcmDirectory // extends CommonObject */ public $error; - public $errors; + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); /** diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 1f6929614aa..0ff73d0d8e3 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -44,7 +44,11 @@ class CommandeFournisseurDispatch extends CommonObject */ public $error; - public $errors=array(); //!< To return several error codes (or messages) + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); + public $element='commandefournisseurdispatch'; //!< Id that identify managed objects /** diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index b4aaf17e9d8..dbce6d75f3b 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -49,7 +49,11 @@ class ActionsTicket */ public $error; - public $errors = array(); + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); + //! Numero de l'erreur public $errno = 0; diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index fd996d4e3c4..f511cc1900b 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -42,7 +42,10 @@ class Ticketlogs// extends CommonObject */ public $error; - public $errors = array(); //!< To return several error codes (or messages) + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); public $element = 'ticketlogs'; //!< Id that identify managed objects /** From 2fa82edd3980bfaa3e671143d6dd29129c68c52e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 17:07:27 +0200 Subject: [PATCH 30/33] Standardize and update code --- htdocs/accountancy/class/accountancycategory.class.php | 5 ++++- htdocs/accountancy/class/accountingjournal.class.php | 3 +++ htdocs/adherents/class/adherent.class.php | 3 +++ htdocs/adherents/class/adherent_type.class.php | 4 ++++ htdocs/adherents/class/subscription.class.php | 3 +++ htdocs/asset/class/asset_type.class.php | 4 ++++ htdocs/bookmarks/class/bookmark.class.php | 5 ++++- htdocs/categories/class/categorie.class.php | 3 +++ htdocs/comm/action/class/actioncomm.class.php | 5 ++++- htdocs/comm/mailing/class/mailing.class.php | 3 +++ htdocs/comm/propal/class/propal.class.php | 6 ++++++ htdocs/commande/class/commande.class.php | 9 ++++++++- htdocs/compta/bank/class/account.class.php | 3 +++ htdocs/compta/bank/class/paymentvarious.class.php | 5 ++++- htdocs/compta/deplacement/class/deplacement.class.php | 3 +++ htdocs/compta/facture/class/facture-rec.class.php | 6 ++++++ htdocs/compta/facture/class/facture.class.php | 8 +++++++- htdocs/compta/localtax/class/localtax.class.php | 5 ++++- .../compta/paiement/cheque/class/remisecheque.class.php | 3 +++ htdocs/compta/paiement/class/paiement.class.php | 5 ++++- htdocs/compta/prelevement/class/bonprelevement.class.php | 3 +++ htdocs/compta/salaries/class/paymentsalary.class.php | 5 ++++- htdocs/compta/sociales/class/chargesociales.class.php | 6 +++++- .../sociales/class/paymentsocialcontribution.class.php | 5 ++++- htdocs/compta/tva/class/tva.class.php | 5 ++++- 25 files changed, 103 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 14fedab9b16..7f0b2be0071 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -46,7 +46,10 @@ class AccountancyCategory // extends CommonObject */ public $errors = array(); - public $element='c_accounting_category'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='c_accounting_category'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 4edc4e3f99a..c908b4ccb7c 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -26,6 +26,9 @@ */ class AccountingJournal extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='accounting_journal'; /** diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9ced11e7d5d..c6a643350dd 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -41,6 +41,9 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; */ class Adherent extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='member'; /** diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 3af6206d274..937d3e197a8 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -37,7 +37,11 @@ class AdherentType extends CommonObject */ public $table_element = 'adherent_type'; + /** + * @var string ID to identify managed object + */ public $element = 'adherent_type'; + public $picto = 'group'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 71c304e5765..240aa617233 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -32,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Subscription extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='subscription'; /** diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 8922701d698..5455eb4c7ea 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -34,7 +34,11 @@ class AssetType extends CommonObject */ public $table_element = 'asset_type'; + /** + * @var string ID to identify managed object + */ public $element = 'asset_type'; + public $picto = 'group'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 3bbdf293f37..9491b10c267 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -28,7 +28,10 @@ */ class Bookmark extends CommonObject { - public $element='bookmark'; + /** + * @var string ID to identify managed object + */ + public $element='bookmark'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 1fccadc0a53..3736ce58d5b 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -148,6 +148,9 @@ class Categorie extends CommonObject 'project' => 'projet', ); + /** + * @var string ID to identify managed object + */ public $element='category'; /** diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 32a442885f8..70c38205eac 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -34,7 +34,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class ActionComm extends CommonObject { - public $element='action'; + /** + * @var string ID to identify managed object + */ + public $element='action'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index f5c1fd84d9e..1078ea84c94 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -31,6 +31,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Mailing extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='mailing'; /** diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 02ab37c626a..2808a501112 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -45,6 +45,9 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; */ class Propal extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='propal'; /** @@ -3656,6 +3659,9 @@ class Propal extends CommonObject */ class PropaleLigne extends CommonObjectLine { + /** + * @var string ID to identify managed object + */ public $element='propaldet'; /** diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 6ff85f51ca5..68f45f7e12e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -42,7 +42,10 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; */ class Commande extends CommonOrder { - public $element='commande'; + /** + * @var string ID to identify managed object + */ + public $element='commande'; /** * @var string Name of table without prefix where object is stored @@ -3784,7 +3787,11 @@ class Commande extends CommonOrder */ class OrderLine extends CommonOrderLine { + /** + * @var string ID to identify managed object + */ public $element='commandedet'; + public $table_element='commandedet'; var $oldline; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9895de511fe..46c3e168a1b 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -36,6 +36,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Account extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element = 'bank_account'; /** diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 6215858dd6d..90ec1558981 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class PaymentVarious extends CommonObject { - public $element='variouspayment'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='variouspayment'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 6a51244529a..d9172219abe 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -31,6 +31,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Deplacement extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='deplacement'; /** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 385224e10d7..59966827ae5 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -39,6 +39,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; */ class FactureRec extends CommonInvoice { + /** + * @var string ID to identify managed object + */ public $element='facturerec'; /** @@ -1644,6 +1647,9 @@ class FactureRec extends CommonInvoice */ class FactureLigneRec extends CommonInvoiceLine { + /** + * @var string ID to identify managed object + */ public $element='facturedetrec'; /** diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f05c7302ef0..5e5eca7337f 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -53,6 +53,9 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accoun */ class Facture extends CommonInvoice { + /** + * @var string ID to identify managed object + */ public $element='facture'; /** @@ -4236,7 +4239,10 @@ class Facture extends CommonInvoice */ class FactureLigne extends CommonInvoiceLine { - public $element='facturedet'; + /** + * @var string ID to identify managed object + */ + public $element='facturedet'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 717e251f841..7e9691f9b3a 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Localtax extends CommonObject { - public $element='localtax'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='localtax'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 8981a760864..ceb376f7a37 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -33,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; */ class RemiseCheque extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='chequereceipt'; /** diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index e8057853952..fa824375793 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -36,7 +36,10 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; */ class Paiement extends CommonObject { - public $element='payment'; + /** + * @var string ID to identify managed object + */ + public $element='payment'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 523117b8351..76224451c0a 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -39,6 +39,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; */ class BonPrelevement extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='widthdraw'; /** diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index edb316674b3..babd5323fce 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class PaymentSalary extends CommonObject { - public $element='payment_salary'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_salary'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 023dd334583..229cbef2442 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class ChargeSociales extends CommonObject { - public $element='chargesociales'; + /** + * @var string ID to identify managed object + */ + public $element='chargesociales'; + public $table='chargesociales'; /** diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 26d8094acbd..560e47abe7c 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' */ class PaymentSocialContribution extends CommonObject { - public $element='paiementcharge'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='paiementcharge'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index d3b7c42b86b..538c33152ea 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -33,7 +33,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Tva extends CommonObject { - public $element='tva'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='tva'; /** * @var string Name of table without prefix where object is stored From 215677c972bb4707e107e947eadefef236c8cff1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 18:17:09 +0200 Subject: [PATCH 31/33] Standardize and update code --- htdocs/contact/class/contact.class.php | 3 +++ htdocs/contrat/class/contrat.class.php | 8 +++++++- htdocs/core/class/comment.class.php | 5 ++++- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/events.class.php | 5 ++++- htdocs/core/class/fiscalyear.class.php | 3 +++ htdocs/core/class/link.class.php | 5 ++++- htdocs/cron/class/cronjob.class.php | 5 ++++- 8 files changed, 30 insertions(+), 6 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index d7d95de2795..1c34a64f986 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -37,6 +37,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Contact extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='contact'; /** diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b857cad8e2e..13a52ac22ef 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -41,6 +41,9 @@ require_once DOL_DOCUMENT_ROOT . '/margin/lib/margins.lib.php'; */ class Contrat extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='contrat'; /** @@ -2458,7 +2461,10 @@ class Contrat extends CommonObject */ class ContratLigne extends CommonObjectLine { - public $element='contratdet'; + /** + * @var string ID to identify managed object + */ + public $element='contratdet'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index cad33316b68..027d3193031 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -4,7 +4,10 @@ */ class Comment extends CommonObject { - public $element='comment'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='comment'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 97ba1f814d0..6db2388ce8c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -64,7 +64,7 @@ abstract class CommonObject public $errors=array(); /** - * @var string + * @var string ID to identify managed object */ public $element; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 7f77f99f183..bbdf7e9c3ab 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -34,7 +34,10 @@ */ class Events // extends CommonObject { - public $element='events'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='events'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 640ad2ed5ac..8e6f389200b 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -28,6 +28,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Fiscalyear extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='fiscalyear'; /** diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 4896a1919d7..0d695baaf8d 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -28,7 +28,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Link extends CommonObject { - public $element = 'link'; + /** + * @var string ID to identify managed object + */ + public $element = 'link'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 88d9fc706e1..b898b4eb238 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Cronjob extends CommonObject { - public $element='cronjob'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='cronjob'; /** * @var string Name of table without prefix where object is stored From 87067b2bc92e75adadd2743fa2d83a77db068118 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 18:35:45 +0200 Subject: [PATCH 32/33] Standardize and update code --- htdocs/don/class/don.class.php | 5 ++++- htdocs/don/class/paymentdonation.class.php | 5 ++++- htdocs/ecm/class/ecmdirectory.class.php | 5 ++++- htdocs/expedition/class/expedition.class.php | 7 +++++++ htdocs/expensereport/class/expensereport_ik.class.php | 3 +++ .../expensereport/class/expensereport_rule.class.php | 3 +++ .../expensereport/class/paymentexpensereport.class.php | 5 ++++- htdocs/fichinter/class/fichinter.class.php | 6 ++++++ htdocs/fourn/class/fournisseur.commande.class.php | 10 ++++++++-- .../class/fournisseur.commande.dispatch.class.php | 5 ++++- htdocs/fourn/class/fournisseur.facture.class.php | 8 +++++++- htdocs/fourn/class/paiementfourn.class.php | 3 +++ htdocs/holiday/class/holiday.class.php | 3 +++ htdocs/hrm/class/establishment.class.php | 3 +++ htdocs/livraison/class/livraison.class.php | 7 +++++++ htdocs/loan/class/loan.class.php | 4 ++++ htdocs/loan/class/loanschedule.class.php | 5 ++++- htdocs/loan/class/paymentloan.class.php | 5 ++++- htdocs/opensurvey/class/opensurveysondage.class.php | 5 ++++- htdocs/product/class/product.class.php | 3 +++ htdocs/product/stock/class/entrepot.class.php | 3 +++ 21 files changed, 92 insertions(+), 11 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 71c8bbd3abb..9aa55945d2b 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -34,7 +34,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Don extends CommonObject { - public $element='don'; // Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='don'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 939c4e33780..f866f20a02f 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentDonation extends CommonObject { - public $element='payment_donation'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_donation'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 6f3aefbc9d8..3e3559847b8 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -27,7 +27,10 @@ */ class EcmDirectory // extends CommonObject { - public $element='ecm_directories'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='ecm_directories'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index da911520ead..a4bcfeb2281 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -44,7 +44,11 @@ if (! empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/expe */ class Expedition extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element="shipping"; + public $fk_element="fk_expedition"; /** @@ -2272,6 +2276,9 @@ class Expedition extends CommonObject */ class ExpeditionLigne extends CommonObjectLine { + /** + * @var string ID to identify managed object + */ public $element='expeditiondet'; /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 849d688ba2a..609ba42c5f5 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; */ class ExpenseReportIk extends CoreObject { + /** + * @var string ID to identify managed object + */ public $element='expenseik'; /** diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 2d2dddb1f66..8599cfcc810 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; */ class ExpenseReportRule extends CoreObject { + /** + * @var string ID to identify managed object + */ public $element='expenserule'; /** diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index d8c5f51647b..a827b095bff 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentExpenseReport extends CommonObject { - public $element='payment_expensereport'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_expensereport'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e235ec1ea12..7c772d460a5 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php'; */ class Fichinter extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='fichinter'; /** @@ -1331,6 +1334,9 @@ class FichinterLigne extends CommonObjectLine var $duration; // Duree de l'intervention var $rang = 0; + /** + * @var string ID to identify managed object + */ public $element='fichinterdet'; /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6ffc8ebc9b3..3672e1dd1ac 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -40,7 +40,10 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class CommandeFournisseur extends CommonOrder { - public $element='order_supplier'; + /** + * @var string ID to identify managed object + */ + public $element='order_supplier'; /** * @var string Name of table without prefix where object is stored @@ -3092,7 +3095,10 @@ class CommandeFournisseur extends CommonOrder */ class CommandeFournisseurLigne extends CommonOrderLine { - public $element='commande_fournisseurdet'; + /** + * @var string ID to identify managed object + */ + public $element='commande_fournisseurdet'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 0ff73d0d8e3..818a09c2bfb 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -49,7 +49,10 @@ class CommandeFournisseurDispatch extends CommonObject */ public $errors = array(); - public $element='commandefournisseurdispatch'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='commandefournisseurdispatch'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b3d62a4f6b8..6acfdaa3530 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -41,7 +41,10 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class FactureFournisseur extends CommonInvoice { - public $element='invoice_supplier'; + /** + * @var string ID to identify managed object + */ + public $element='invoice_supplier'; /** * @var string Name of table without prefix where object is stored @@ -2565,6 +2568,9 @@ class FactureFournisseur extends CommonInvoice */ class SupplierInvoiceLine extends CommonObjectLine { + /** + * @var string ID to identify managed object + */ public $element='facture_fourn_det'; /** diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index d1c71a2cd98..55c6a00d251 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class PaiementFourn extends Paiement { + /** + * @var string ID to identify managed object + */ public $element='payment_supplier'; /** diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5a1078aad82..833b46b2bca 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -32,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Holiday extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='holiday'; /** diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index a39e6a20b08..744e679194e 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -28,6 +28,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Establishment extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='establishment'; /** diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index f61c8eabb2a..763b28fb445 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -39,7 +39,11 @@ if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande */ class Livraison extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element="delivery"; + public $fk_element="fk_livraison"; /** @@ -1095,6 +1099,9 @@ class LivraisonLigne extends CommonObjectLine public $product_ref; public $product_label; + /** + * @var string ID to identify managed object + */ public $element='livraisondet'; /** diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 1e75aa063cf..8f382c8dc1d 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Loan extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='loan'; + public $table='loan'; /** diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index dbf3f3f3e46..5a33d9995bc 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class LoanSchedule extends CommonObject { - public $element='loan_schedule'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='loan_schedule'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 9d845b7a1cd..1f20590f6e1 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentLoan extends CommonObject { - public $element='payment_loan'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_loan'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index f62fd69c781..c2036525b62 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -34,7 +34,10 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Opensurveysondage extends CommonObject { - public $element='opensurvey_sondage'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='opensurvey_sondage'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index b02da68cc12..b66bf4eaed0 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -43,6 +43,9 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; */ class Product extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='product'; /** diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index edae2d19f05..f8e60f135b9 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -33,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Entrepot extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='stock'; /** From 30992f2730b4032a0f9f49ccc520d82cb59a7748 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 18:52:47 +0200 Subject: [PATCH 33/33] Standardize and update code --- htdocs/projet/class/project.class.php | 5 ++++- htdocs/projet/class/task.class.php | 5 ++++- htdocs/resource/class/dolresource.class.php | 5 ++++- htdocs/societe/class/societe.class.php | 3 +++ .../class/supplier_proposal.class.php | 10 ++++++++-- htdocs/ticket/class/ticketlogs.class.php | 6 +++++- htdocs/user/class/user.class.php | 3 +++ htdocs/user/class/usergroup.class.php | 3 +++ 8 files changed, 34 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 16c187e1842..6e8709a4328 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -33,7 +33,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; class Project extends CommonObject { - public $element = 'project'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element = 'project'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index e7546048950..e3fee33a0de 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -31,7 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Task extends CommonObject { - public $element='project_task'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='project_task'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 4e580fd6e26..604e4f8849d 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php"; */ class Dolresource extends CommonObject { - public $element='dolresource'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='dolresource'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 39fa367e26a..5c3363bc4c8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -41,6 +41,9 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class Societe extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='societe'; /** diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 34485e0b4fe..9275cc0decf 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -45,7 +45,10 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php'; */ class SupplierProposal extends CommonObject { - public $element='supplier_proposal'; + /** + * @var string ID to identify managed object + */ + public $element='supplier_proposal'; /** * @var string Name of table without prefix where object is stored @@ -2651,7 +2654,10 @@ class SupplierProposalLine extends CommonObjectLine */ public $error=''; - public $element='supplier_proposaldet'; + /** + * @var string ID to identify managed object + */ + public $element='supplier_proposaldet'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index f511cc1900b..cf5f8dc122b 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -47,7 +47,11 @@ class Ticketlogs// extends CommonObject */ public $errors = array(); - public $element = 'ticketlogs'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element = 'ticketlogs'; + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 90b5d477180..f64ecd9ede6 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -40,6 +40,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class User extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='user'; /** diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 7bcfa05ab28..8f89b4a2e35 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -35,6 +35,9 @@ if (! empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT."/core/class/l */ class UserGroup extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='usergroup'; /**