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

@@ -2083,6 +2083,7 @@ EOF
$this->CompileCommonProperty('min_autocomplete_chars', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('allow_target_creation', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('display_style', $oField, $aParameters, $sModuleRelativeDir, 'select');
$this->CompileCommonProperty('create_temporary_object', $oField, $aParameters, $sModuleRelativeDir, false);
$aParameters['depends_on'] = $sDependencies;
} elseif ($sAttType == 'AttributeObjectKey') {
$this->CompileCommonProperty('class_attcode', $oField, $aParameters, $sModuleRelativeDir);

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"));
}