From: Nick Jenkins Date: Wed, 25 Oct 2006 09:29:34 +0000 (+0000) Subject: Bug 7687: Fix movetalk box checks itself when confirming a delete and move; Patch... X-Git-Tag: 1.31.0-rc.0~55380 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=42992bf107bb8759c822178814098c567cb1a746;p=lhc%2Fweb%2Fwiklou.git Bug 7687: Fix movetalk box checks itself when confirming a delete and move; Patch by Werdna. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b1ec47e4e4..953bb8a46e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -86,6 +86,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6531) Fix PHP fatal error on installation page with bad username input. * (bug 6977) Remove 404 link for autogenerated database documentation. * (bug 7369) Allow "Show Changes" without requiring edit token. +* (bug 7687) Fix movetalk box checks itself when confirming a delete and move. == Languages updated == diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index e33c15301e..c1d6833549 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -56,7 +56,11 @@ class MovePageForm { $this->oldTitle = $wgRequest->getText( 'wpOldTitle', $target ); $this->newTitle = $wgRequest->getText( 'wpNewTitle' ); $this->reason = $wgRequest->getText( 'wpReason' ); - $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true ); + if ( $wgRequest->wasPosted() ) { + $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', false ); + } else { + $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true ); + } $this->deleteAndMove = $wgRequest->getBool( 'wpDeleteAndMove' ) && $wgRequest->getBool( 'wpConfirm' ); } @@ -221,7 +225,7 @@ class MovePageForm { # Move the talk page if relevant, if it exists, and if we've been told to $ott = $ot->getTalkPage(); if( $ott->exists() ) { - if( $wgRequest->getVal( 'wpMovetalk' ) == 1 && !$ot->isTalkPage() && !$nt->isTalkPage() ) { + if( $this->moveTalk && !$ot->isTalkPage() && !$nt->isTalkPage() ) { $ntt = $nt->getTalkPage(); # Attempt the move