From 358daa3ca08ce50012095724190838cfa609c3a2 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Fri, 27 Jun 2025 13:39:50 +0200 Subject: [PATCH] Clean doc and code --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/modules/asset/mod_asset_standard.php | 4 ++-- htdocs/core/modules/hrm/mod_evaluation_standard.php | 4 ++-- .../core/modules/stocktransfer/mod_stocktransfer_standard.php | 4 ++-- htdocs/core/modules/workstation/mod_workstation_standard.php | 2 +- .../knowledgemanagement/mod_knowledgerecord_standard.php | 4 ++-- .../template/core/modules/mymodule/mod_myobject_standard.php | 4 ++-- .../core/modules/partnership/mod_partnership_standard.php | 4 ++-- .../recruitment/mod_recruitmentcandidature_standard.php | 4 ++-- .../recruitment/mod_recruitmentjobposition_standard.php | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 082d6ffd390..954c7bf66e9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -125,7 +125,7 @@ abstract class CommonObject /** * @var int<0,1>|string Does this object support multicompany module ? - * 0=No test on entity, 1=Test with field entity for internal and external users, 'field@table'=Test with link by field@table (example 'fk_soc@societe') + * 0=No test on entity, 1=Test with field entity in local table, 'field@table'=Test entity into the field@table (example 'fk_soc@societe') */ public $ismultientitymanaged; diff --git a/htdocs/core/modules/asset/mod_asset_standard.php b/htdocs/core/modules/asset/mod_asset_standard.php index 9e6f8e128ea..46f8bee6247 100644 --- a/htdocs/core/modules/asset/mod_asset_standard.php +++ b/htdocs/core/modules/asset/mod_asset_standard.php @@ -98,7 +98,7 @@ class mod_asset_standard extends ModeleNumRefAsset $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -137,7 +137,7 @@ class mod_asset_standard extends ModeleNumRefAsset $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/core/modules/hrm/mod_evaluation_standard.php b/htdocs/core/modules/hrm/mod_evaluation_standard.php index 7cafb0fde53..fbb0ed6ea6f 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_standard.php +++ b/htdocs/core/modules/hrm/mod_evaluation_standard.php @@ -98,7 +98,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -136,7 +136,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php index 46d77a2f7c7..79481481e5d 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php @@ -99,7 +99,7 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -137,7 +137,7 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/core/modules/workstation/mod_workstation_standard.php b/htdocs/core/modules/workstation/mod_workstation_standard.php index 7950cd488f2..77b8aeaea0c 100644 --- a/htdocs/core/modules/workstation/mod_workstation_standard.php +++ b/htdocs/core/modules/workstation/mod_workstation_standard.php @@ -97,7 +97,7 @@ class mod_workstation_standard extends ModeleNumRefWorkstation $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php index d12865c47c0..f1d52de6edf 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php @@ -96,7 +96,7 @@ class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -134,7 +134,7 @@ class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php index 98d9b5fbffe..8a78ef0e429 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php @@ -97,7 +97,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { // @phan-suppress-current-line PhanPluginEmptyStatementIf + } elseif (!is_numeric($object->ismultientitymanaged)) { // @phan-suppress-current-line PhanPluginEmptyStatementIf // TODO } @@ -135,7 +135,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php index 90c84a2909f..61f3f6f57ba 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -97,7 +97,7 @@ class mod_partnership_standard extends ModeleNumRefPartnership $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -135,7 +135,7 @@ class mod_partnership_standard extends ModeleNumRefPartnership $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php index 8a30e86e0f2..ccdbf553812 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php @@ -97,7 +97,7 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -135,7 +135,7 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php index fdfe40d948c..7e532877547 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php @@ -97,7 +97,7 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO } @@ -135,7 +135,7 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } elseif ($object->ismultientitymanaged == 2) { + } elseif (!is_numeric($object->ismultientitymanaged)) { // TODO }