r92065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92064‎ | r92065 | r92066 >
Date:15:57, 13 July 2011
Author:purodha
Status:resolved
Tags:
Comment:
Fix for r85876 by doing away with a potentially invalid user name parameter behind slash in Special:EmailUser
Modified paths:
  • /trunk/phase3/includes/specials/SpecialEmailuser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialEmailuser.php
@@ -226,10 +226,13 @@
227227 * @param $name String: user name submitted.
228228 * @return String: form asking for user name.
229229 */
230 - static function userForm( $name ) {
231 - $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => '', 'id' => 'askusername' ) ) .
 230+
 231+ function userForm( $name ) {
 232+ global $wgScript ;
 233+ $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) .
 234+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
232235 Xml::openElement( 'fieldset' ) .
233 - Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) .
 236+ Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) .
234237 Xml::inputLabel( wfMessage( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' .
235238 Xml::submitButton( wfMessage( 'emailusernamesubmit' )->text() ) .
236239 Xml::closeElement( 'fieldset' ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r94130Follow-up r92065: call userForm dynamically. Also made userForm protected as ...aaron18:30, 9 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85876(bug 13879) Special:Emailuser now asks for suitable target user if called wit...purodha12:49, 12 April 2011

Status & tagging log