mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
New XML format, updated the transformation tool (UpgradeDocument)
SVN:trunk[3361]
This commit is contained in:
@@ -542,14 +542,20 @@ class ModelFactory
|
||||
$oNode->parentNode->removeChild($oNode);
|
||||
}
|
||||
|
||||
// Adjust the XML to transparently add an id (=type:<type>) on all allowed actions (profiles)
|
||||
// Adjust the XML to transparently add an id (=action:<type>) on all allowed actions (profiles)
|
||||
// which don't already have one
|
||||
$oNodeList = $oXPath->query('/itop_design/user_rights/profiles/profile/groups/group/actions/action');
|
||||
foreach ($oNodeList as $oNode)
|
||||
{
|
||||
if ($oNode->getAttribute('id') == '')
|
||||
{
|
||||
$oNode->SetAttribute('id', 'type:' . $oNode->getAttribute('xsi:type'));
|
||||
$oNode->SetAttribute('id', 'action:' . $oNode->getAttribute('xsi:type'));
|
||||
$oNode->removeAttribute('xsi:type');
|
||||
}
|
||||
elseif ($oNode->getAttribute('xsi:type') == 'stimulus')
|
||||
{
|
||||
$oNode->SetAttribute('id', 'stimulus:' . $oNode->getAttribute('id'));
|
||||
$oNode->removeAttribute('xsi:type');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user