From bb05e80a877a889cd7286e275b515f40c73f4b2c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 31 Aug 2018 18:47:25 +0200 Subject: [PATCH] Standardize and update code --- htdocs/asset/class/asset.class.php | 27 +++++++++++-------- .../cheque/class/remisecheque.class.php | 8 ++++-- htdocs/cron/class/cronjob.class.php | 4 +++ htdocs/ecm/class/ecmdirectory.class.php | 12 ++++++--- htdocs/ecm/class/ecmfiles.class.php | 6 ++++- .../fourn/class/fournisseur.facture.class.php | 7 ++++- htdocs/hrm/class/establishment.class.php | 7 ++++- .../template/class/myobject.class.php | 4 +++ .../inventory/class/inventory.class.php | 4 +++ htdocs/societe/class/societe.class.php | 4 +++ 10 files changed, 63 insertions(+), 20 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 93ee5014dc2..6a9e6c7c485 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -35,22 +35,22 @@ class Asset extends CommonObject * @var string ID to identify managed object */ public $element = 'asset'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'asset'; - + /** * @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 0; - + /** * @var int Does asset support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 1; - + /** * @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png */ @@ -96,14 +96,19 @@ class Asset extends CommonObject 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Active', '-1'=>'Cancel')), ); public $rowid; - public $ref; - public $entity; - + /** - * @var string proper name for given parameter - */ - public $label; - + * @var string Ref + */ + public $ref; + + public $entity; + + /** + * @var string proper name for given parameter + */ + public $label; + public $amount; public $fk_soc; public $description; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index ceb376f7a37..dbf2d688aca 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -37,12 +37,12 @@ class RemiseCheque extends CommonObject * @var string ID to identify managed object */ public $element='chequereceipt'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='bordereau_cheque'; - + public $picto = 'payment'; var $num; @@ -56,6 +56,10 @@ class RemiseCheque extends CommonObject public $account_label; public $author_id; public $nbcheque; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f2b23abad65..28853b6a740 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1334,6 +1334,10 @@ class Cronjobline { public $id; + + /** + * @var string Ref + */ public $ref; public $tms=''; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3e3559847b8..539baf9460a 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -31,12 +31,12 @@ class EcmDirectory // extends CommonObject * @var string ID to identify managed object */ public $element='ecm_directories'; - + /** * @var string Name of table without prefix where object is stored */ //public $table_element='ecm_directories'; - + var $picto = 'dir'; /** @@ -48,7 +48,7 @@ class EcmDirectory // extends CommonObject * @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' @@ -56,6 +56,10 @@ class EcmDirectory // extends CommonObject var $date_m; public $fk_user_m; public $fk_user_c; + + /** + * @var string Ref + */ public $ref; var $cats=array(); @@ -70,7 +74,7 @@ class EcmDirectory // extends CommonObject * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 056bcd94337..25dc979a5db 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -48,7 +48,11 @@ class EcmFiles extends CommonObject public $picto = 'generic'; - public $ref; // hash of file path + /** + * @var string Ref hash of file path + */ + public $ref; + public $label; // hash of file content (md5_file(dol_osencode($destfull)) public $share; // hash for file sharing, empty by default (example: getRandomPassword(true)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3d889e51c51..1eece0f0316 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -73,7 +73,12 @@ class FactureFournisseur extends CommonInvoice protected $table_ref_field = 'ref'; public $rowid; - public $ref; + + /** + * @var string Ref + */ + public $ref; + public $product_ref; public $ref_supplier; public $socid; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 8fb13046ee4..90b06d9fd0f 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -44,7 +44,12 @@ class Establishment extends CommonObject public $picto='building'; public $id; - public $ref; + + /** + * @var string Ref + */ + public $ref; + public $rowid; public $name; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 3228305ac70..58d2e1c0fe0 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -102,6 +102,10 @@ class MyObject extends CommonObject ); public $rowid; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index fe57698619e..fc8bc8bb9e6 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -100,6 +100,10 @@ class Inventory extends CommonObject ); public $rowid; + + /** + * @var string Ref + */ public $ref; /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5d75ab688cf..2d4c3c3df07 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -377,7 +377,11 @@ class Societe extends CommonObject */ public $default_lang; + /** + * @var string Ref + */ public $ref; + public $ref_int; /** * External user reference.