From 42992bf107bb8759c822178814098c567cb1a746 Mon Sep 17 00:00:00 2001 From: Nick Jenkins Date: Wed, 25 Oct 2006 09:29:34 +0000 Subject: [PATCH] Bug 7687: Fix movetalk box checks itself when confirming a delete and move; Patch by Werdna. --- RELEASE-NOTES | 1 + includes/SpecialMovepage.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 -- 2.20.1