* (bug 12178) Fix wpReason parameter to action=delete, again.
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Mon, 3 Dec 2007 00:14:36 +0000 (00:14 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Mon, 3 Dec 2007 00:14:36 +0000 (00:14 +0000)
RELEASE-NOTES
includes/Article.php

index 400d11e..0896f49 100644 (file)
@@ -206,6 +206,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 451) Add a generic Traditional / Simplified Chinese conversion table, 
   instead of a Traditional conversion with Taiwan variant, and a Simplified 
   conversion with China variant.
+* (bug 12178) Fix wpReason parameter to action=delete, again.
 
 == Parser changes in 1.12 ==
 
index 86014de..85416c6 100644 (file)
@@ -1923,11 +1923,15 @@ class Article {
         */
        function delete() {
                global $wgUser, $wgOut, $wgRequest;
+
                $confirm = $wgRequest->wasPosted() &&
-                       $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
-               $this->DeleteReasonList = $wgRequest->getText( 'wpDeleteReasonList' );
+                               $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
+               
+               $this->DeleteReasonList = $wgRequest->getText( 'wpDeleteReasonList', 'other' );
                $this->DeleteReason = $wgRequest->getText( 'wpReason' );
+               
                $reason = $this->DeleteReasonList;
+               
                if ( $reason != 'other' && $this->DeleteReason != '') {
                        // Entry from drop down menu + additional comment
                        $reason .= ': ' . $this->DeleteReason;