<?php
-require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
+require_once( dirname(__FILE__).'/includes/Profiler.php' );
+$wgProfiler = new Profiler;
/**
* To use a profiler, delete the line above and add something like this:
if implementing a custom editor, e.g. for a special namespace,
etc.
+'NewDifferenceEngine': Called when a new DifferenceEngine object is made
+$title: the diff page title (nullable)
+&$oldId: the actual old Id to use in the diff
+&$newId: the actual new Id to use in the diff (0 means current)
+$old: the ?old= param value from the url
+$new: the ?new= param value from the url
+
'DiffViewHeader': called before diff display
$diff: DifferenceEngine object that's calling
$oldRev: Revision object of the "old" revision (may be null/invalid)
if ( 'prev' === $new ) {
# Show diff between revision $old and the previous one.
# Get previous one from DB.
- #
$this->mNewid = intval($old);
-
$this->mOldid = $this->mTitle->getPreviousRevisionID( $this->mNewid );
-
} elseif ( 'next' === $new ) {
# Show diff between revision $old and the previous one.
# Get previous one from DB.
# revision is cur, which is "0".
$this->mNewid = 0;
}
-
} else {
$this->mOldid = intval($old);
$this->mNewid = intval($new);
+ wfRunHooks( 'NewDifferenceEngine', array(&$titleObj, &$this->mOldid, &$this->mNewid, $old, $new) );
}
$this->mRcidMarkPatrolled = intval($rcid); # force it to be an integer
$this->mRefreshCache = $refreshCache;