r103816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103815‎ | r103816 | r103817 >
Date:15:42, 21 November 2011
Author:johnduhart
Status:ok
Tags:
Comment:
Bug 28981 - handle diffonly param on diffs between deleted revision
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -606,6 +606,7 @@
607607 $this->mInvert = $request->getCheck( 'invert' ) && $posted;
608608 $this->mPreview = $request->getCheck( 'preview' ) && $posted;
609609 $this->mDiff = $request->getCheck( 'diff' );
 610+ $this->mDiffOnly = $request->getBool( 'diffonly', $this->getUser()->getOption( 'diffonly' ) );
610611 $this->mComment = $request->getText( 'wpComment' );
611612 $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $user->isAllowed( 'suppressrevision' );
612613 $this->mToken = $request->getVal( 'token' );
@@ -792,7 +793,7 @@
793794 $previousRev = $archive->getPreviousRevision( $timestamp );
794795 if( $previousRev ) {
795796 $this->showDiff( $previousRev, $rev );
796 - if( $user->getOption( 'diffonly' ) ) {
 797+ if( $this->mDiffOnly ) {
797798 return;
798799 } else {
799800 $out->addHTML( '<hr />' );

Status & tagging log