Merge remote-tracking branch 'origin/support/2.7' into develop

# Conflicts:
#	test/integration/iTopModulesPhpVersionChecklistTest.php
This commit is contained in:
Pierre Goiffon
2020-10-27 10:48:22 +01:00
3 changed files with 16 additions and 17 deletions

View File

@@ -309,7 +309,7 @@ class BulkChange
$value = $oForeignAtt->MakeValueFromString($aRowData[$iCol], $this->m_bLocalizedValues);
}
$oReconFilter->AddCondition($sForeignAttCode, $value, '=');
$aResults[$iCol] = new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResults[$iCol] = new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
$oExtObjects = new CMDBObjectSet($oReconFilter);
@@ -396,7 +396,7 @@ class BulkChange
}
$aCacheKeys[] = $value;
$oReconFilter->AddCondition($sForeignAttCode, $value, '=');
$aResults[$iCol] = new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResults[$iCol] = new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
$sCacheKey = implode('_|_', $aCacheKeys); // Unique key for this query...
$iForeignKey = null;
@@ -466,7 +466,7 @@ class BulkChange
foreach ($aKeyConfig as $sForeignAttCode => $iCol)
{
// Report the change on reconciliation values as well
$aResults[$iCol] = new CellStatus_Modify(htmlentities($aRowData[$iCol]));
$aResults[$iCol] = new CellStatus_Modify(utils::HtmlEntities($aRowData[$iCol]));
}
}
}
@@ -539,7 +539,7 @@ class BulkChange
{
if ($sAttCode == 'id')
{
$aResults[$iCol]= new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResults[$iCol]= new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
else
{
@@ -555,7 +555,7 @@ class BulkChange
}
if (isset($aErrors[$sAttCode]))
{
$aResults[$iCol]= new CellStatus_Issue(htmlentities($aRowData[$iCol]), $sOrigValue, $aErrors[$sAttCode]);
$aResults[$iCol]= new CellStatus_Issue(utils::HtmlEntities($aRowData[$iCol]), $sOrigValue, $aErrors[$sAttCode]);
}
elseif (array_key_exists($sAttCode, $aChangedFields))
{
@@ -578,7 +578,7 @@ class BulkChange
}
else
{
$aResults[$iCol]= new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResults[$iCol]= new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
}
}
@@ -925,7 +925,7 @@ class BulkChange
{
// Leave the cell unchanged
$aResult[$iRow]["__STATUS__"]= new RowStatus_Issue(Dict::S('UI:CSVReport-Row-Issue-DateFormat'));
$aResult[$iRow][$sAttCode] = new CellStatus_Issue(null, htmlentities($this->m_aData[$iRow][$iCol]), Dict::S('UI:CSVReport-Row-Issue-DateFormat'));
$aResult[$iRow][$sAttCode] = new CellStatus_Issue(null, utils::HtmlEntities($this->m_aData[$iRow][$iCol]), Dict::S('UI:CSVReport-Row-Issue-DateFormat'));
}
}
}
@@ -1083,7 +1083,7 @@ class BulkChange
{
if (!array_key_exists($iCol, $aResult[$iRow]))
{
$aResult[$iRow][$iCol] = new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResult[$iRow][$iCol] = new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
}
foreach($this->m_aExtKeys as $sAttCode => $aForeignAtts)
@@ -1097,7 +1097,7 @@ class BulkChange
if (!array_key_exists($iCol, $aResult[$iRow]))
{
// The foreign attribute is one of our reconciliation key
$aResult[$iRow][$iCol] = new CellStatus_Void(htmlentities($aRowData[$iCol]));
$aResult[$iRow][$iCol] = new CellStatus_Void(utils::HtmlEntities($aRowData[$iCol]));
}
}
}

View File

@@ -24,6 +24,7 @@ use iTopDesignFormat;
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled
* @group itop-community
*
* @covers iTopDesignFormat
*

View File

@@ -25,6 +25,7 @@ use iTopDesignFormat;
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled
* @group itop-community
*
* @covers iTopDesignFormat
*
@@ -57,14 +58,12 @@ class iTopModulesXmlVersionIntegrationTest extends ItopTestCase
$oTransformedXml->load($sXmlFile);
$oFormat = new iTopDesignFormat($oTransformedXml);
if ($oFormat->Convert())
{
if ($oFormat->Convert()) {
// Compare the original and new format
$sExpectedXmlVersion = ITOP_DESIGN_LATEST_VERSION;
$this->assertSame($oTransformedXml->saveXML(), $oOriginalXml->saveXML(), "Datamodel file $sXmlFile:2 not in the latest format ($sExpectedXmlVersion)");
}
else
{
$this->assertSame($oTransformedXml->saveXML(), $oOriginalXml->saveXML(),
"Datamodel file $sXmlFile:2 not in the latest format ($sExpectedXmlVersion)");
} else {
$this->fail("Failed to convert $sXmlFile into the latest format");
}
}
@@ -80,8 +79,7 @@ class iTopModulesXmlVersionIntegrationTest extends ItopTestCase
$aXmlFiles[] = APPROOT.'application/datamodel.application.xml';
$aTestCases = array();
foreach ($aXmlFiles as $sXmlFile)
{
foreach ($aXmlFiles as $sXmlFile) {
$aTestCases[$sXmlFile] = array(
'sXmlFile' => $sXmlFile,
);