From 08fe357b9598ee0c2b071ac81213b1826a0b5329 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 1 Feb 2011 15:17:25 +0000 Subject: [PATCH] * (bug 26851) Special:UserRights now allows to prefill the reason field The parameter is named "user-reason" as for the form submission --- RELEASE-NOTES | 3 ++- includes/specials/SpecialUserrights.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d9d9b507ca..89459c619b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -56,7 +56,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Introduced the edittools-upload message, which will be inserted under the upload form instead of edittools if available * (bug 26285) Extensions will be automatically generated on upload if the user - specified a filename without extension. + specified a filename without extension. +* (bug 26851) Special:UserRights now allows to prefill the reason field === Bug fixes in 1.18 === * (bug 23119) WikiError class and subclasses are now marked as deprecated diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 6ea8668b80..e03f439974 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -414,7 +414,7 @@ class UserrightsPage extends SpecialPage { * @param $groups Array: Array of groups the user is in */ protected function showEditUserGroupsForm( $user, $groups ) { - global $wgOut, $wgUser, $wgLang; + global $wgOut, $wgUser, $wgLang, $wgRequest; $list = array(); foreach( $groups as $group ) { @@ -453,7 +453,8 @@ class UserrightsPage extends SpecialPage { Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) . " " . - Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) . + Xml::input( 'user-reason', 60, $wgRequest->getVal( 'user-reason', false ), + array( 'id' => 'wpReason', 'maxlength' => 255 ) ) . " -- 2.20.1