Last modified: 2013-08-16 08:34:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49958, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47958 - Make GENDER ignore everything after slash
Make GENDER ignore everything after slash
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Pavel Selitskas [wizardist]
: easy
Depends on:
Blocks: 45938
  Show dependency treegraph
 
Reported: 2013-05-02 00:43 UTC by Pavel Selitskas [wizardist]
Modified: 2013-08-16 08:34 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Pavel Selitskas [wizardist] 2013-05-02 00:43:20 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
Comment 1 db [inactive,noenotif] 2013-05-02 16:46:05 UTC
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).
Comment 2 Pavel Selitskas [wizardist] 2013-05-03 11:48:40 UTC
(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?
Comment 3 Gerrit Notification Bot 2013-05-03 12:28:49 UTC
Related URL: https://gerrit.wikimedia.org/r/62146 (Gerrit Change I4152b51e935bb1e7a4accf9b888d34b6f58519c2)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links