From ca82f5720abfe8ec8b9f1363b71b8e567514436a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 15 Oct 2009 21:21:53 +0000 Subject: [PATCH] * (bug 21105) API: list=usercontribs can now list contribs for User:0 --- RELEASE-NOTES | 1 + includes/api/ApiQueryUserContributions.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8fb55cfdee..3f78ef09ca 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -617,6 +617,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 20700) Add amprop=default to meta=allmessages to list default value for customized messages * Don't parse magic words in meta=allmessages, output messages unparsed +* (bug 21105) list=usercontribs can now list contribs for User:0 === Languages updated in 1.16 === diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index b2cca4aae4..9f739ecaba 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -121,7 +121,7 @@ class ApiQueryContributions extends ApiQueryBase { * against `revision`.`rev_user_text` */ private function prepareUsername($user) { - if( $user ) { + if( !is_null( $user ) && $user !== '' ) { $name = User::isIP( $user ) ? $user : User::getCanonicalName( $user, 'valid' ); -- 2.20.1