$old: the ?old= param value from the url
$new: the ?new= param value from the url
+'GetDifferenceEngine': Called when getting a new difference engine interface object
+Return false for valid object in $differenceEngine or true for the default difference engine
+$context: IContextSource context to be used for diff
+$old: Revision ID to show and diff with
+$new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
+$refreshCache: If set, refreshes the diff cache
+$unhide: If set, allow viewing deleted revs
+&$differenceEngine: output parameter, difference engine object to be used for diff
+
'DiffRevisionTools': Override or extend the revision tools available from the
diff view, i.e. undo, etc.
$newRev: Revision object of the "new" revision
public function createDifferenceEngine( IContextSource $context, $old = 0, $new = 0,
$rcid = 0, //FIXME: Deprecated, no longer used
$refreshCache = false, $unhide = false ) {
- $diffEngineClass = $this->getDiffEngineClass();
+ // hook: get difference engine
+ $differenceEngine = null;
+ if ( !wfRunHooks( 'GetDifferenceEngine',
+ array( $context, $old, $new, $refreshCache, $unhide, &$differenceEngine )
+ ) ) {
+ return $differenceEngine;
+ }
+ $diffEngineClass = $this->getDiffEngineClass();
return new $diffEngineClass( $context, $old, $new, $rcid, $refreshCache, $unhide );
}
/** @var bool Show rev_deleted content if allowed */
protected $unhide = false;
+
+ /** @var bool Refresh the diff cache */
+ protected $mRefreshCache = false;
+
/**#@-*/
/**