$this->mRcidMarkPatrolled = intval($rcid); # force it to be an integer
}
- function showDiffPage() {
+ function showDiffPage( $diffOnly = false ) {
global $wgUser, $wgOut, $wgContLang, $wgUseExternalEditor, $wgUseRCPatrol;
$fname = 'DifferenceEngine::showDiffPage';
wfProfileIn( $fname );
# is the first version of that article. In that case, V' does not exist.
if ( $this->mOldid === false ) {
$this->showFirstRevision();
+ $this->renderNewRevision(); // should we respect $diffOnly here or not?
wfProfileOut( $fname );
return;
}
$nextlink . $patrol;
$this->showDiff( $oldHeader, $newHeader );
+
+ if ( !$diffOnly )
+ $this->renderNewRevision();
+
+ wfProfileOut( $fname );
+ }
+
+ /**
+ * Show the new revision of the page.
+ */
+ function renderNewRevision() {
+ global $wgOut;
+ $fname = 'DifferenceEngine::renderNewRevision';
+ wfProfileIn( $fname );
+
$wgOut->addHTML( "<hr /><h2>{$this->mPagetitle}</h2>\n" );
if( !$this->mNewRev->isCurrent() ) {
if( is_object( $this->mNewRev ) ) {
$wgOut->setRevisionId( $this->mNewRev->getId() );
}
+
$wgOut->addSecondaryWikiText( $this->mNewtext );
if( !$this->mNewRev->isCurrent() ) {
$wgOut->setSubtitle( wfMsg( 'difference' ) );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
-
- # Show current revision
- #
- $wgOut->addHTML( "<hr /><h2>{$this->mPagetitle}</h2>\n" );
- if( is_object( $this->mNewRev ) ) {
- $wgOut->setRevisionId( $this->mNewRev->getId() );
- }
- $wgOut->addSecondaryWikiText( $this->mNewtext );
-
wfProfileOut( $fname );
}