$rev1 = $this->revisionOrTitleOrId( $params['fromrev'], $params['fromtitle'], $params['fromid'] );
$rev2 = $this->revisionOrTitleOrId( $params['torev'], $params['totitle'], $params['toid'] );
- $de = new DifferenceEngine( $this->getContext(),
+ $contentHandler = ContentHandler::getForModelID( $rev1->getContentModel() );
+ $de = $contentHandler->createDifferenceEngine( $this->getContext(),
$rev1,
$rev2,
null, // rcid
'torev' => 'Second revision to compare',
);
}
+
+ public function getResultProperties() {
+ return array(
+ '' => array(
+ 'fromtitle' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'fromrevid' => 'integer',
+ 'totitle' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'torevid' => 'integer',
+ '*' => 'string'
+ )
+ );
+ }
+
public function getDescription() {
return array(
'Get the difference between 2 pages',