diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index c002abf2a89..a76be081471 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -37,7 +37,7 @@ class AccountingJournal extends CommonObject public $table_element = 'accounting_journal'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 25cac778264..ae866ff24ba 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -158,28 +158,6 @@ class Asset extends CommonObject */ public $status; - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'assetdet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_asset'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'Assetline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - /** - * @var AssetLine[] Array of subtable lines - */ - //public $lines = array(); /** * Constructor diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 868abac9e54..8444c4e1812 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -183,19 +183,19 @@ class BOM extends CommonObject public $table_element_line = 'bom_bomline'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_bom'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'BOMLine'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables=array(); /** * @var array List of child tables. To know object to delete on cascade. diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 8a4ebfa90c9..b7f20319229 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -54,7 +54,7 @@ class AdvanceTargetingMailing extends CommonObject public $name; /** - * @var int element id + * @var int element id (it's not the name of a field) */ public $fk_element; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index dfbae271881..5c4ed9e2edf 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -66,7 +66,7 @@ class Propal extends CommonObject public $table_element_line = 'propaldet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_propal'; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 1a1fd42d21b..75d2f71284c 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -43,12 +43,12 @@ class Deplacement extends CommonObject public $table_element = 'deplacement'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index e4187a4e906..48e2ad574ed 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -50,12 +50,12 @@ class FactureRec extends CommonInvoice public $table_element = 'facture_rec'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facturedet_rec'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture'; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 456a18d8e2c..77266718b75 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -64,12 +64,12 @@ class Facture extends CommonInvoice public $table_element = 'facture'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facturedet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture'; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index aa146aebf10..a3d0b82d2b7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -53,12 +53,12 @@ class Contrat extends CommonObject public $table_element = 'contrat'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'contratdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_contrat'; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index d2c6221a598..3f9ca42e136 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -32,10 +32,13 @@ class Comment extends CommonObject public $table_element = 'comment'; /** - * @var int Field with ID of parent key if this field has a parent + * @var int ID of parent key (it's not the name of a field) */ - public $fk_element = ''; + public $fk_element; + /** + * @var string element type + */ public $element_type; /** @@ -72,10 +75,16 @@ class Comment extends CommonObject */ public $entity; + /** + * @var string import key + */ public $import_key; public $comments = array(); + /** + * @var Comment Object oldcopy + */ public $oldcopy; @@ -131,26 +140,26 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -190,12 +199,10 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows) - { + if ($num_rows) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -212,8 +219,11 @@ class Comment extends CommonObject $this->db->free($resql); - if ($num_rows) return 1; - else return 0; + if ($num_rows) { + return 1; + } else { + return 0; + } } else { $this->error = "Error ".$this->db->lasterror(); return -1; @@ -234,8 +244,12 @@ class Comment extends CommonObject $error = 0; // Clean parameters - if (isset($this->fk_element)) $this->fk_project = (int) trim($this->fk_element); - if (isset($this->description)) $this->description = trim($this->description); + if (isset($this->fk_element)) { + $this->fk_project = (int) trim($this->fk_element); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } // Update request @@ -253,24 +267,24 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -303,24 +317,24 @@ class Comment extends CommonObject $sql .= " WHERE rowid=".$this->id; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -355,13 +369,10 @@ class Comment extends CommonObject dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows > 0) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($num_rows > 0) { + while ($obj = $this->db->fetch_object($resql)) { $comment = new self($db); $comment->fetch($obj->rowid); $this->comments[] = $comment; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index efb2e554da9..0d9ddd72e24 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -125,7 +125,6 @@ class EmailSenderProfile extends CommonObject */ public $date_creation; - public $tms; public $private; public $signature; @@ -134,32 +133,6 @@ class EmailSenderProfile extends CommonObject // END MODULEBUILDER PROPERTIES - - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'emailsenderprofiledet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_emailsenderprofile'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'EmailSenderProfileline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - /** - * @var EmailSenderProfileLine[] Array of subtable lines - */ - //public $lines = array(); - - - /** * Constructor * diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 0e822076641..ebbdb2c3274 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -35,6 +35,9 @@ class Fiscalyear extends CommonObject */ public $element = 'fiscalyear'; + /** + * @var string picto + */ public $picto = 'technic'; /** @@ -43,12 +46,12 @@ class Fiscalyear extends CommonObject public $table_element = 'accounting_fiscalyear'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 394e86fdd78..9c1e9682a10 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -48,7 +48,7 @@ class Delivery extends CommonObject public $element = "delivery"; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = "fk_delivery"; @@ -58,7 +58,7 @@ class Delivery extends CommonObject public $table_element = "delivery"; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = "deliverydet"; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 042b22b3a1c..be9426415fe 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -47,7 +47,7 @@ class Don extends CommonObject public $table_element = 'don'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_donation'; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1776e9855d5..2c55b11f8d2 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -52,13 +52,14 @@ class EmailCollector extends CommonObject * @var int Does emailcollector support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 0; + /** * @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png */ public $picto = 'generic'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_emailcollector'; @@ -158,7 +159,9 @@ class EmailCollector extends CommonObject */ public $date_creation; - + /** + * @var int timestamp + */ public $tms; /** @@ -171,6 +174,9 @@ class EmailCollector extends CommonObject */ public $fk_user_modif; + /** + * @var string import key + */ public $import_key; diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 9b7c8bbca49..58aaf9efdb7 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -118,17 +118,17 @@ class EmailCollectorAction extends CommonObject // If this object has a subtable with lines // /** - // * @var int Name of subtable line + // * @var string Name of subtable line // */ //public $table_element_line = 'emailcollectoractiondet'; // /** - // * @var int Field with ID of parent key if this field has a parent + // * @var string Field with ID of parent key if this field has a parent // */ //public $fk_element = 'fk_emailcollectoraction'; // /** - // * @var int Name of subtable class that manage subtable lines + // * @var string Name of subtable class that manage subtable lines // */ //public $class_element_line = 'EmailcollectorActionline'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 09a46f94bb8..e652dc5a3c1 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -55,7 +55,7 @@ class Expedition extends CommonObject public $element = "shipping"; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = "fk_expedition"; @@ -65,7 +65,7 @@ class Expedition extends CommonObject public $table_element = "expedition"; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = "expeditiondet"; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index ac1d052486f..3ecba5d5286 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -44,7 +44,14 @@ class ExpenseReport extends CommonObject */ public $table_element = 'expensereport'; + /** + * @var string table element line name + */ public $table_element_line = 'expensereport_det'; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = 'fk_expensereport'; /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 489b2671cf5..55af1eb00ed 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -40,7 +40,7 @@ class ExpenseReportIk extends CoreObject public $table_element = 'expensereport_ik'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ 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 7ed3a5ecb09..9a172cd7563 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -40,7 +40,7 @@ class ExpenseReportRule extends CoreObject public $table_element = 'expensereport_rules'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_expense_rule'; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 617da1963b8..7145605cb85 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -76,7 +76,7 @@ class Fichinter extends CommonObject public $table_element = 'fichinter'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_fichinter'; @@ -1435,7 +1435,7 @@ class FichinterLigne extends CommonObjectLine public $table_element = 'fichinterdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_fichinter'; diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 377b97b2abb..046d35b62ce 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -41,6 +41,10 @@ class FichinterRec extends Fichinter public $element = 'fichinterrec'; public $table_element = 'fichinter_rec'; public $table_element_line = 'fichinter_rec'; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = 'fk_fichinter'; /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b03faf7f629..c1be4db7be3 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -53,12 +53,12 @@ class CommandeFournisseur extends CommonOrder public $table_element = 'commande_fournisseur'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'commande_fournisseurdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_commande'; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 09c74dd5d92..4ddc552daa2 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -57,12 +57,12 @@ class FactureFournisseur extends CommonInvoice public $table_element = 'facture_fourn'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facture_fourn_det'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture_fourn'; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 4e1272a8f69..2030ab1d636 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -50,7 +50,7 @@ class Holiday extends CommonObject public $ismultientitymanaged = 0; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_holiday'; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 02083ccd819..dc97787ae6e 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -40,12 +40,12 @@ class Establishment extends CommonObject public $table_element = 'establishment'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_establishment'; diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index dc12427ec33..13df902d9b8 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -40,7 +40,7 @@ class IntracommReport extends CommonObject public $table_element = 'intracommreport'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_intracommreport'; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 5d0281a5ea3..c0798fd52b8 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -187,37 +187,37 @@ class MyObject extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'mymodule_myobjectline'; + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'mymodule_myobjectline'; - /** - * @var int Field with ID of parent key if this object has a parent - */ - //public $fk_element = 'fk_myobject'; + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_myobject'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'MyObjectline'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'MyObjectline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables = array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); - /** - * @var array List of child tables. To know object to delete on cascade. - * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will - * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object - */ - //protected $childtablesoncascade = array('mymodule_myobjectdet'); + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('mymodule_myobjectdet'); - /** - * @var MyObjectLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var MyObjectLine[] Array of subtable lines + // */ + // public $lines = array(); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 2f58c90a433..b4e6b776cdd 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -166,17 +166,17 @@ class Mo extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'mo_production'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_mo'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'MoLine'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index f6c31f8ac41..2bcf86084c6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -56,14 +56,22 @@ class Product extends CommonObject public $table_element = 'product'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_product'; /** * @var array List of child tables. To test if we can delete object. */ - protected $childtables = array('supplier_proposaldet', 'propaldet', 'commandedet', 'facturedet', 'contratdet', 'facture_fourn_det', 'commande_fournisseurdet'); + protected $childtables = array( + 'supplier_proposaldet', + 'propaldet', + 'commandedet', + 'facturedet', + 'contratdet', + 'facture_fourn_det', + 'commande_fournisseurdet' + ); /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index cb9da997d18..47d9425530f 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -170,6 +170,9 @@ class Inventory extends CommonObject */ public $fk_user_valid; + /** + * @var string import key + */ public $import_key; // END MODULEBUILDER PROPERTIES @@ -178,17 +181,17 @@ class Inventory extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'inventorydet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string 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 + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'Inventoryline'; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index f3442d759ed..4185d21d653 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -45,17 +45,17 @@ class Project extends CommonObject public $table_element = 'projet'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'projet_task'; /** - * @var int Name of field date + * @var string Name of field date */ public $table_element_date; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_projet'; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index d71ac0852bc..a51e68c095e 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -45,7 +45,7 @@ class Task extends CommonObject public $table_element = 'projet_task'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_task'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 07e32b64432..ef12d844ddc 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -46,7 +46,14 @@ class Reception extends CommonObject { use CommonIncoterm; + /** + * @var string element name + */ public $element = "reception"; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = "fk_reception"; public $table_element = "reception"; public $table_element_line = "commande_fournisseur_dispatch"; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 6c61ae55a1a..5dad53212c6 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -153,42 +153,6 @@ class RecruitmentCandidature extends CommonObject // END MODULEBUILDER PROPERTIES - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'recruitment_recruitmentcandidatureline'; - - /** - * @var int Field with ID of parent key if this object has a parent - */ - //public $fk_element = 'fk_recruitmentcandidature'; - - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'RecruitmentCandidatureline'; - - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables = array(); - - /** - * @var array List of child tables. To know object to delete on cascade. - * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will - * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object - */ - //protected $childtablesoncascade = array('recruitment_recruitmentcandidaturedet'); - - /** - * @var RecruitmentCandidatureLine[] Array of subtable lines - */ - //public $lines = array(); - - - /** * Constructor * diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index a75e915baee..2421f87ce50 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -168,40 +168,6 @@ class RecruitmentJobPosition extends CommonObject // END MODULEBUILDER PROPERTIES - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'recruitment_recruitmentjobpositionline'; - - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_recruitmentjobposition'; - - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'RecruitmentJobPositionline'; - - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - - /** - * @var array List of child tables. To know object to delete on cascade. - */ - //protected $childtablesoncascade=array('recruitment_recruitmentjobpositiondet'); - - /** - * @var RecruitmentJobPositionLine[] Array of subtable lines - */ - //public $lines = array(); - - - /** * Constructor * diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index ec6a3e77363..e88ea0e4f7c 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -199,15 +199,15 @@ class CompanyPaymentMode extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ //public $table_element_line = 'companypaymentmodedet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_companypaymentmode'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ //public $class_element_line = 'CompanyPaymentModeline'; /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 73c41aeb782..f18a6e1b9a8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -59,7 +59,7 @@ class Societe extends CommonObject public $table_element = 'societe'; /** - * @var int Field with ID of parent key if this field has a parent or for child tables + * @var string Field with ID of parent key if this field has a parent or for child tables */ public $fk_element = 'fk_soc'; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index fe67c87674e..a315044683b 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -161,33 +161,6 @@ class SocieteAccount extends CommonObject // END MODULEBUILDER PROPERTIES - - - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'societe_accountdet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_societe_account'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'societeAccountline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - /** - * @var societeAccountLine[] Array of subtable lines - */ - //public $lines = array(); - - - /** * Constructor * diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b46ed476629..ad4f47389d5 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -61,12 +61,12 @@ class SupplierProposal extends CommonObject public $table_element = 'supplier_proposal'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'supplier_proposaldet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_supplier_proposal'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3288571d2a7..36b50d82055 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -54,7 +54,7 @@ class User extends CommonObject public $table_element = 'user'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_user'; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 882d33bd562..5ba6b5553af 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -90,7 +90,10 @@ class UserGroup extends CommonObject */ public $datem; - public $note; // Description + /** + * @var string Description + */ + public $note; public $members = array(); // Array of users @@ -111,7 +114,7 @@ class UserGroup extends CommonObject ); /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_usergroup'; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index ecdb9fa6f15..30961013806 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -181,19 +181,19 @@ class WebsitePage extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ + // /** + // * @var string Name of subtable line + // */ //public $table_element_line = 'mymodule_myobjectline'; /** - * @var int Field with ID of parent key if this field has a parent or for child tables + * @var string Field with ID of parent key if this field has a parent or for child tables */ public $fk_element = 'fk_website_page'; - /** - * @var int Name of subtable class that manage subtable lines - */ + // /** + // * @var string Name of subtable class that manage subtable lines + // */ //public $class_element_line = 'MyObjectline'; /** diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 5d5a9c84eda..b71c5aec1d7 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -252,35 +252,6 @@ class Hook extends CommonObject public $import_key; - // If this object has a subtable with lines - - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'hookdet'; - - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_hook'; - - /** - * @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('hookdet'); - - /** - * @var MyObjectLine[] Array of subtable lines - */ - //public $lines = array(); - - - /** * Constructor *