Internal: modified the prototype of GetDelta to add several attributes on the root node

SVN:trunk[3090]
This commit is contained in:
Romain Quetiez
2014-02-26 11:24:10 +00:00
parent b4bc3ad716
commit 8e26ca763b

View File

@@ -1289,7 +1289,7 @@ EOF
/**
* Get the text/XML version of the delta
*/
public function GetDelta($aNodesToIgnore = array(), $iRevisionId = null)
public function GetDelta($aNodesToIgnore = array(), $aAttributes = null)
{
$oDelta = new MFDocument();
foreach($this->ListChanges() as $oAlteredNode)
@@ -1304,9 +1304,12 @@ EOF
$oNode->parentNode->removeChild($oNode);
}
}
if ($iRevisionId != null)
if ($aAttributes != null)
{
$oDelta->documentElement->setAttribute('revision_id', $iRevisionId);
foreach ($aAttributes as $sAttribute => $value)
{
$oDelta->documentElement->setAttribute($sAttribute, $value);
}
}
return $oDelta->saveXML();
}