From: Alexandre Emsenhuber Date: Tue, 1 Feb 2011 15:17:25 +0000 (+0000) Subject: * (bug 26851) Special:UserRights now allows to prefill the reason field X-Git-Tag: 1.31.0-rc.0~32273 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=08fe357b9598ee0c2b071ac81213b1826a0b5329;p=lhc%2Fweb%2Fwiklou.git * (bug 26851) Special:UserRights now allows to prefill the reason field The parameter is named "user-reason" as for the form submission --- 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 ) ) . "