From 80e413901730b6ba0b035df0edee7c654b5adce1 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 24 Mar 2009 06:58:43 +0000 Subject: [PATCH] Allow User: prefix in parameter to GENDER parser function --- includes/parser/CoreParserFunctions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index e57793f577..495be851f7 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -197,6 +197,12 @@ class CoreParserFunctions { // default $gender = User::getDefaultOption( 'gender' ); + + // allow prefix. + $title = Title::newFromText( $user ); + + if ($title->getNamespace == NS_USER) + $user = $title->getText(); // check parameter, or use $wgUser if in interface message $user = User::newFromName( $user ); -- 2.20.1