From effc4141c7ce51ec674a872566aaef989196d8a4 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 19 Jan 2023 09:30:37 +0100 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B05900=20-=20DB=20integrity=20analysis?= =?UTF-8?q?=20crashes=20when=20too=20many=20errors=20-=20module=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php index 7efb878b7..dd9fe4087 100644 --- a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php +++ b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'combodo-db-tools/3.0.3', + 'combodo-db-tools/3.0.2', array( // Identification // From efa20e77d0c60483f934a5e08b2443c8cf999ced Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 19 Jan 2023 17:53:14 +0100 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B03769=20Add=20data-input-id=20HTML=20?= =?UTF-8?q?attribute=20to=20fields=20in=20a=20transition=20form=20Was=20on?= =?UTF-8?q?ly=20present=20in=20object=20edit=20mode=20:(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index a32de59e4..31ae27075 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3410,28 +3410,30 @@ EOF } } $sInputType = ''; + $sInputId = 'att_'.$iFieldIndex; $sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, - $this->Get($sAttCode), $this->GetEditValue($sAttCode), 'att_'.$iFieldIndex, '', $iExpectCode, + $this->Get($sAttCode), $this->GetEditValue($sAttCode), $sInputId, '', $iExpectCode, $aArgs, true, $sInputType); - $aAttrib = array( + $aAttrib = array( 'label' => ''.$oAttDef->GetLabel().'', 'value' => "$sHTMLValue", ); //add attrib for data-attribute // Prepare metadata attributes - $sAttCode = $oAttDef->GetCode(); - $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); + $sAttCode = $oAttDef->GetCode(); + $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); $sAttDefClass = get_class($oAttDef); - $sAttLabel = MetaModel::GetLabel($sClass, $sAttCode); + $sAttLabel = MetaModel::GetLabel($sClass, $sAttCode); - $aAttrib['attcode'] = $sAttCode; - $aAttrib['atttype'] = $sAttDefClass; + $aAttrib['attcode'] = $sAttCode; + $aAttrib['atttype'] = $sAttDefClass; $aAttrib['attlabel'] = $sAttLabel; // - Attribute flags $aAttrib['attflags'] = $this->GetFormAttributeFlags($sAttCode); // - How the field should be rendered - $aAttrib['layout'] = (in_array($oAttDef->GetEditClass(), static::GetAttEditClassesToRenderAsLargeField())) ? 'large' : 'small'; + $aAttrib['layout'] = (in_array($oAttDef->GetEditClass(), static::GetAttEditClassesToRenderAsLargeField())) ? 'large' : 'small'; + $aAttrib['inputid'] = $sInputId; $aAttrib['inputtype'] = $sInputType; // - For simple fields, we get the raw (stored) value as well $bExcludeRawValue = false; @@ -3443,8 +3445,8 @@ EOF } $aAttrib['value_raw'] = ($bExcludeRawValue === false) ? $this->Get($sAttCode) : ''; - $aDetails[] = $aAttrib; - $aFieldsMap[$sAttCode] = 'att_'.$iFieldIndex; + $aDetails[] = $aAttrib; + $aFieldsMap[$sAttCode] = $sInputId; $iFieldIndex++; $bExistFieldToDisplay = true; }