r48728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48727‎ | r48728 | r48729 >
Date:06:58, 24 March 2009
Author:werdna
Status:resolved (Comments)
Tags:
Comment:
Allow User: prefix in parameter to GENDER parser function
Modified paths:
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -197,6 +197,12 @@
198198
199199 // default
200200 $gender = User::getDefaultOption( 'gender' );
 201+
 202+ // allow prefix.
 203+ $title = Title::newFromText( $user );
 204+
 205+ if ($title->getNamespace == NS_USER)
 206+ $user = $title->getText();
201207
202208 // check parameter, or use $wgUser if in interface message
203209 $user = User::newFromName( $user );

Follow-up revisions

RevisionCommit summaryAuthorDate
r48768Fix up r48728 "Allow User: prefix in parameter to GENDER parser function"...brion23:04, 24 March 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   19:47, 24 March 2009
  1. no check for null
  2. function isn't being called, so this will check for a member variable which doesn't exist and will never == NS_USER
#Comment by Brion VIBBER (talk | contribs)   23:05, 24 March 2009

Patched this up in r48768

Status & tagging log