From 2cbda2756e5c517869cfc774250e3eb1526b40f6 Mon Sep 17 00:00:00 2001 From: John Du Hart Date: Mon, 21 Nov 2011 15:42:58 +0000 Subject: [PATCH] Bug 28981 - handle diffonly param on diffs between deleted revision --- includes/specials/SpecialUndelete.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 1163a96bd0..bc6cdfd1f0 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -606,6 +606,7 @@ class SpecialUndelete extends SpecialPage { $this->mInvert = $request->getCheck( 'invert' ) && $posted; $this->mPreview = $request->getCheck( 'preview' ) && $posted; $this->mDiff = $request->getCheck( 'diff' ); + $this->mDiffOnly = $request->getBool( 'diffonly', $this->getUser()->getOption( 'diffonly' ) ); $this->mComment = $request->getText( 'wpComment' ); $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $user->isAllowed( 'suppressrevision' ); $this->mToken = $request->getVal( 'token' ); @@ -792,7 +793,7 @@ class SpecialUndelete extends SpecialPage { $previousRev = $archive->getPreviousRevision( $timestamp ); if( $previousRev ) { $this->showDiff( $previousRev, $rev ); - if( $user->getOption( 'diffonly' ) ) { + if( $this->mDiffOnly ) { return; } else { $out->addHTML( '
' ); -- 2.20.1