https://bugzilla.wikimedia.org/show_bug.cgi?id=29450

Max Semenik <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
          Component|Blocking                    |Internationalization
            Summary|GENDER in                   |{{GENDER:}} returns current
                   |Blockipsuccesstext refers   |user's gender for IPs and
                   |to the gender of the        |disallowed usernames
                   |blocking admin instead of   |
                   |the gender of the blocked   |
                   |user                        |

--- Comment #4 from Max Semenik <[email protected]> 2011-06-17 19:50:56 UTC 
---
The cause is simple:

        // check parameter, or use the ParserOptions if in interface message
        $user = User::newFromName( $user );
        if ( $user ) {
            $gender = $user->getOption( 'gender' );
        } elseif ( $parser->getOptions()->getInterfaceMessage() ) {
            $gender = $parser->getOptions()->getUser()->getOption( 'gender' );
        }

you can't construct a User object for anons, hence current user's gender will
be used. Same thing for impossible usernames, such as foo#bar.

Ideas what to do about it?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to