From fa830bdd7f565f75bf2c7163f685eb1199be46f8 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 21 Nov 2023 17:55:05 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B06966=20Deprecate=20DBCloneTracked=20and?= =?UTF-8?q?=20DBCloneTracked=5FInternal=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 3 +++ core/cmdbobject.class.inc.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 3c8d9e2be..5718cb1fa 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -4568,6 +4568,9 @@ HTML; InlineImage::FinalizeInlineImages($this); } + /** + * @deprecated 3.1.1 3.2.0 N°6966 We will have only one DBClone method in the future + */ protected function DBCloneTracked_Internal($newKey = null) { /** @var cmdbAbstractObject $oNewObj */ diff --git a/core/cmdbobject.class.inc.php b/core/cmdbobject.class.inc.php index 99f5e1184..4e7f66206 100644 --- a/core/cmdbobject.class.inc.php +++ b/core/cmdbobject.class.inc.php @@ -438,7 +438,8 @@ abstract class CMDBObject extends DBObject } /** - * @deprecated 3.1.0 N°5232 not used + * @deprecated 3.1.0 N°5232 N°6966 simply use {@see DBObject::DBClone()} instead, that will automatically create and persist a CMDBChange object. + * If you need to persist your own, call {@see CMDBObject::SetCurrentChange()} before. */ public function DBCloneTracked(CMDBChange $oChange, $newKey = null) { @@ -446,6 +447,9 @@ abstract class CMDBObject extends DBObject $this->DBCloneTracked_Internal($newKey); } + /** + * @deprecated 3.1.1 3.2.0 N°6966 We will have only one DBClone method in the future + */ protected function DBCloneTracked_Internal($newKey = null) { $newKey = parent::DBClone($newKey);