浏览代码

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3090 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 年之前
父节点
当前提交
359a92cd31
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      setup/modelfactory.class.inc.php

+ 6 - 3
setup/modelfactory.class.inc.php

@@ -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();
 	}