Temporary rollback : waiting for datamodel upgrade

This commit is contained in:
jf-cbd
2024-10-21 18:01:58 +02:00
parent 508918a684
commit 96e8467e13

View File

@@ -49,7 +49,7 @@ class iTopDesignFormat
* next: string,
* go_to_next: string
* }
* }
* }
*/
public static $aVersions = array(
'1.0' => array(
@@ -71,34 +71,34 @@ class iTopDesignFormat
'go_to_next' => 'From12To13',
),
'1.3' => array( // iTop >= 2.2.0
'previous' => '1.2',
'go_to_previous' => 'From13To12',
'next' => '1.4',
'go_to_next' => 'From13To14',
'previous' => '1.2',
'go_to_previous' => 'From13To12',
'next' => '1.4',
'go_to_next' => 'From13To14',
),
'1.4' => array( // iTop >= 2.4.0
'previous' => '1.3',
'go_to_previous' => 'From14To13',
'next' => '1.5',
'go_to_next' => 'From14To15',
'previous' => '1.3',
'go_to_previous' => 'From14To13',
'next' => '1.5',
'go_to_next' => 'From14To15',
),
'1.5' => array( // iTop >= 2.5.0
'previous' => '1.4',
'go_to_previous' => 'From15To14',
'next' => '1.6',
'go_to_next' => 'From15To16',
'previous' => '1.4',
'go_to_previous' => 'From15To14',
'next' => '1.6',
'go_to_next' => 'From15To16',
),
'1.6' => array( // iTop >= 2.6.0
'previous' => '1.5',
'go_to_previous' => 'From16To15',
'next' => '1.7',
'go_to_next' => 'From16To17',
'previous' => '1.5',
'go_to_previous' => 'From16To15',
'next' => '1.7',
'go_to_next' => 'From16To17',
),
'1.7' => array( // iTop >= 2.7.0
'previous' => '1.6',
'go_to_previous' => 'From17To16',
'next' => '3.0',
'go_to_next' => 'From17To30',
'previous' => '1.6',
'go_to_previous' => 'From17To16',
'next' => '3.0',
'go_to_next' => 'From17To30',
),
'3.0' => array(
'previous' => '1.7',
@@ -115,12 +115,6 @@ class iTopDesignFormat
'3.2' => array(
'previous' => '3.1',
'go_to_previous' => 'From32To31',
'next' => '3.3',
'go_to_next' => 'From32To33',
),
'3.3' => array(
'previous' => '3.2',
'go_to_previous' => 'From33To32',
'next' => null,
'go_to_next' => null,
),
@@ -717,15 +711,15 @@ class iTopDesignFormat
$this->LogWarning('The attribute _delta="force" is not supported, converted to _delta="define" ('.$iCount.' instances processed).');
}
// Remove attribute flags on transitions
//
$oNodeList = $oXPath->query("/itop_design/classes//class/lifecycle/states/state/transitions/transition/flags");
$this->LogWarning('Before removing flags nodes');
foreach ($oNodeList as $oNode)
{
$this->LogWarning('Attribute flags '.self::GetItopNodePath($oNode).' is irrelevant on transition and must be removed.');
$this->DeleteNode($oNode);
}
// Remove attribute flags on transitions
//
$oNodeList = $oXPath->query("/itop_design/classes//class/lifecycle/states/state/transitions/transition/flags");
$this->LogWarning('Before removing flags nodes');
foreach ($oNodeList as $oNode)
{
$this->LogWarning('Attribute flags '.self::GetItopNodePath($oNode).' is irrelevant on transition and must be removed.');
$this->DeleteNode($oNode);
}
}
/**
@@ -1122,26 +1116,6 @@ class iTopDesignFormat
$this->RemoveNodeFromXPath('/itop_design/branding/login_favicon');
}
/**
* Upgrade the format from version 3.2 to 3.3
* @param \ModelFactory $oFactory
* @return void (Errors are logged)
*/
protected function From32To33($oFactory)
{
// Nothing for now...
}
/**
* Downgrade the format from version 3.3 to 3.2
* @param \ModelFactory $oFactory
* @return void (Errors are logged)
*/
protected function From33To32($oFactory)
{
// Nothing for now...
}
/**
* @param string $sPath
*
@@ -1155,9 +1129,9 @@ class iTopDesignFormat
foreach ($oNodeList as $oNode)
{
$this->LogWarning('Node '.self::GetItopNodePath($oNode).' is irrelevant in this version, it will be removed.');
$this->DeleteNode($oNode);
}
$this->DeleteNode($oNode);
}
}
/**
* Clean a collection node by removing the _delta="define" on it and moving it to the item nodes.