Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index 07944d4..c6a10ae 100644 (file)
@@ -337,8 +337,8 @@ class CoreParserFunctions {
                // default
                $gender = User::getDefaultOption( 'gender' );
 
-               // allow prefix.
-               $title = Title::newFromText( $username );
+               // allow prefix and normalize (e.g. "*foo" -> "*foo" ).
+               $title = Title::newFromText( $username, NS_USER );
 
                if ( $title && $title->inNamespace( NS_USER ) ) {
                        $username = $title->getText();
@@ -1005,10 +1005,10 @@ class CoreParserFunctions {
                if ( $argA == 'nowiki' ) {
                        // {{filepath: | option [| size] }}
                        $isNowiki = true;
-                       $parsedWidthParam = $parser->parseWidthParam( $argB );
+                       $parsedWidthParam = Parser::parseWidthParam( $argB );
                } else {
                        // {{filepath: [| size [|option]] }}
-                       $parsedWidthParam = $parser->parseWidthParam( $argA );
+                       $parsedWidthParam = Parser::parseWidthParam( $argA );
                        $isNowiki = ( $argB == 'nowiki' );
                }