mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
- fixed XML export to export only meaningful attributes of an object (i.e attributes that can actually be loaded back to re-create it)
SVN:code[45]
This commit is contained in:
@@ -344,10 +344,13 @@ abstract class cmdbAbstractObject extends CMDBObject
|
||||
while ($oObj = $oSet->Fetch())
|
||||
{
|
||||
$oPage->add("<$sClassName id=\"".$oObj->GetKey()."\">\n");
|
||||
foreach($aList as $sAttCode)
|
||||
foreach(MetaModel::ListAttributeDefs($sClassName) as $sAttCode=>$oAttDef)
|
||||
{
|
||||
$sValue = $oObj->GetAsXML($sAttCode);
|
||||
$oPage->add("<$sAttCode>$sValue</$sAttCode>\n");
|
||||
if (($oAttDef->IsWritable()) && ($oAttDef->IsScalar()) && ($sAttCode != 'finalclass') )
|
||||
{
|
||||
$sValue = $oObj->GetAsXML($sAttCode);
|
||||
$oPage->add("<$sAttCode>$sValue</$sAttCode>\n");
|
||||
}
|
||||
}
|
||||
$oPage->add("</$sClassName>\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user