From ee60c3d2435b65b679447092da66590d147469f4 Mon Sep 17 00:00:00 2001 From: Daniel Cannon Date: Mon, 3 Dec 2007 00:14:36 +0000 Subject: [PATCH] * (bug 12178) Fix wpReason parameter to action=delete, again. --- RELEASE-NOTES | 1 + includes/Article.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 400d11ea47..0896f4980f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Article.php b/includes/Article.php index 86014de51c..85416c6f04 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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; -- 2.20.1