Bug 7687: Fix movetalk box checks itself when confirming a delete and move; Patch...
authorNick Jenkins <nickj@users.mediawiki.org>
Wed, 25 Oct 2006 09:29:34 +0000 (09:29 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Wed, 25 Oct 2006 09:29:34 +0000 (09:29 +0000)
RELEASE-NOTES
includes/SpecialMovepage.php

index b1ec47e..953bb8a 100644 (file)
@@ -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 ==
index e33c153..c1d6833 100644 (file)
@@ -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