From 38951fab1aec947713f3f08bcbf6798ff2871b16 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 28 Feb 2019 17:40:49 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B01618=20-=20Custom=20date=20format:=20Fix?= =?UTF-8?q?=20issue=20with=20in-line=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 9955bc4c3..61ab06275 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3525,20 +3525,13 @@ EOF if (preg_match("/^attr_$sSubFormPrefix(.*)$/", $sKey, $aMatches)) { $sLinkClass = $oAttDef->GetLinkedClass(); - if ($oAttDef->IsIndirect()) + $oLinkAttDef = MetaModel::GetAttributeDef($sLinkClass, $aMatches[1]); + // Recursing over n:n link datetime attributes + // Note: We might need to do it with other attribute types, like Document or redundancy setting. + if ($oLinkAttDef instanceof AttributeDateTime) { - $oLinkAttDef = MetaModel::GetAttributeDef($sLinkClass, $aMatches[1]); - // Recursing over n:n link datetime attributes - // Note: We might need to do it with other attribute types, like Document or redundancy setting. - if ($oLinkAttDef instanceof AttributeDateTime) - { - $aObjData[$aMatches[1]] = $this->PrepareValueFromPostedForm($sSubFormPrefix, - $aMatches[1], $sLinkClass, $aData); - } - else - { - $aObjData[$aMatches[1]] = $value; - } + $aObjData[$aMatches[1]] = $this->PrepareValueFromPostedForm($sSubFormPrefix, + $aMatches[1], $sLinkClass, $aData); } else {