Last modified: 2013-08-16 08:34:25 UTC
Slashes in user names are not allowed.[1] If the string contains slash(es) and slash is not the first symbol, we can assume that text before the first slash is a user name. If my assumption is correct or is not false, then I'll send a patch for review. Actually it will be a one-liner. In CoreParserFunctions::gender(): if ( $title && $title->getNamespace() == NS_USER ) { $username = $title->getText(); // change to $title->getRootText() } ---- [1] http://www.mediawiki.org/wiki/Manual:User_table#user_name
It is easier to pass the correct string to the function instead of let the server determine it for you. Maybe the new variable ROOTPAGENAME can help you by that (bug 6747).
(In reply to comment #1) > It is easier to pass the correct string to the function instead of let the > server determine it for you. Maybe the new variable ROOTPAGENAME can help you > by that (bug 6747). I don't object the new variable. Moreover, I support this one by all means mostly because we shouldn't rely on magic words provided by extensions (like #titleparts). But do you agree that there is no sense in supplying deliberately wrong data to the further parts of gender-related code?
Related URL: https://gerrit.wikimedia.org/r/62146 (Gerrit Change I4152b51e935bb1e7a4accf9b888d34b6f58519c2)