N°6043 - Booking: Add prerequisites in iTop core - CRUD extensibility (#520)

This commit is contained in:
bdalsass
2023-07-04 16:22:53 +02:00
committed by GitHub
parent 40dc3deabb
commit 9d38b4d1d6
28 changed files with 1665 additions and 123 deletions

View File

@@ -189,14 +189,17 @@ class XMLDataLoader
function LoadFile($sFilePath, $bUpdateKeyCacheOnly = false, bool $bSearch = false)
{
global $aKeys;
$oXml = simplexml_load_file($sFilePath);
$aReplicas = array();
foreach($oXml as $sClass => $oXmlObj)
{
if (!MetaModel::IsValidClass($sClass))
{
if (!$oXml) {
SetupLog::Error("Unable to load xml file - $sFilePath");
throw(new Exception("Unable to load xml file - $sFilePath"));
}
$aReplicas = array();
foreach ($oXml as $sClass => $oXmlObj) {
if (!MetaModel::IsValidClass($sClass)) {
SetupLog::Error("Unknown class - $sClass");
throw(new Exception("Unknown class - $sClass"));
}