Brion, the code was copied from the OutputPage.php line 751:
if ( is_numeric( $id ) ) {
$name = User::whoIs( $id );
} else {
$name = $id;
}
Guess it should be fixed there as well.
--Yuri
On 8/1/07, Brion Vibber <brion(a)wikimedia.org> wrote:
yurik(a)svn.wikimedia.org wrote:
+ if
($wgUser->isBlocked()) {
+ $id = $wgUser->blockedBy();
+ $vals['blockedby'] = is_numeric($id) ?
User::whoIs($id) : $id;
This seems a little weird here... From what I can see, User::blockedBy()
should always return a user ID, never a name, so the is_numeric() check
shouldn't be needed here.
Secondly, the check would get false results if it did return a name
sometimes -- legitimate usernames might match is_numeric(), and you'd
then load a different, wrong username.
-- brion vibber (brion @
wikimedia.org)
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l