r81309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81308‎ | r81309 | r81310 >
Date:15:17, 1 February 2011
Author:ialex
Status:ok
Tags:
Comment:
* (bug 26851) Special:UserRights now allows to prefill the reason field
The parameter is named "user-reason" as for the form submission
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -414,7 +414,7 @@
415415 * @param $groups Array: Array of groups the user is in
416416 */
417417 protected function showEditUserGroupsForm( $user, $groups ) {
418 - global $wgOut, $wgUser, $wgLang;
 418+ global $wgOut, $wgUser, $wgLang, $wgRequest;
419419
420420 $list = array();
421421 foreach( $groups as $group ) {
@@ -453,7 +453,8 @@
454454 Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) .
455455 "</td>
456456 <td class='mw-input'>" .
457 - Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) .
 457+ Xml::input( 'user-reason', 60, $wgRequest->getVal( 'user-reason', false ),
 458+ array( 'id' => 'wpReason', 'maxlength' => 255 ) ) .
458459 "</td>
459460 </tr>
460461 <tr>
Index: trunk/phase3/RELEASE-NOTES
@@ -56,7 +56,8 @@
5757 * Introduced the edittools-upload message, which will be inserted under the
5858 upload form instead of edittools if available
5959 * (bug 26285) Extensions will be automatically generated on upload if the user
60 - specified a filename without extension.
 60+ specified a filename without extension.
 61+* (bug 26851) Special:UserRights now allows to prefill the reason field
6162
6263 === Bug fixes in 1.18 ===
6364 * (bug 23119) WikiError class and subclasses are now marked as deprecated

Status & tagging log