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


Aryeh Gregor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m




--- Comment #7 from Aryeh Gregor <[email protected]>  2009-10-05 
15:27:17 UTC ---
-
+               //Ensure that the username does not contain @ symbol
+               else if ( preg.match( '@', $name ) {
+                       return false;
+               } 
+                             
+               

Did you test this?  "preg.match" looks like a fatal error to me, plus you're
missing a parenthesis, so that looks like a syntax error there as well.  You
should at *least* test your patches with php -l before submitting . . .

Also, you should be able to use strpos() here, preg_match() is overkill.  And
don't put whitespace between an if and elseif; it should be like

if ( foo ) {
        ...
} elseif ( bar ) {
        // comment
        ...
}

And finally, you've got a whole bunch of trailing whitespace here, on three
separate lines -- please avoid that.

-               global $wgInvalidUsernameCharacters;
+               global $wgInvalidUsernameCharacters,
$wgInvalidUsernameCharacters;
                return
                        self::isUsableName( $name ) &&
-
+                       
                        // Registration-time character blacklisting...
                        !preg_match( '/[' . preg_quote(
$wgInvalidUsernameCharacters, '/' ) . ']/', $name );
+                               

You don't seem to have changed anything in this part other than adding an
unused global declaration, and adding trailing whitespace.


Other than that, this seems good, except that a) I don't know for sure if we
actually want this anymore, I filed this bug based on something Brion said ages
ago and his reasons might be obsoleted by SUL; b) if we do want it, we
definitely need to work out a migration strategy before committing 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