From feea457c45c82cff0f1434c45a4d09e1712ddc8f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 12 Sep 2006 20:28:07 +0000 Subject: [PATCH] * (bug 7299) Normalize username filter on Special:Newpages --- RELEASE-NOTES | 1 + includes/SpecialNewpages.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0ae27ad4a3..0fcfc69b5e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -196,6 +196,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6777) Remove some PHP 4 compat cruft * Add --user, --comment, and --license options to importImages.php * (bug 6216) The immobile namespace message does not mention the source page +* (bug 7299) Normalize username filter on Special:Newpages == Languages updated == diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index c050137393..3fd0eba27f 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -30,7 +30,12 @@ class NewPagesPage extends QueryPage { } function makeUserWhere( &$dbo ) { - return $this->username ? ' AND rc_user_text = ' . $dbo->addQuotes( $this->username ) : ''; + $title = Title::makeTitleSafe( NS_USER, $this->username ); + if( $title ) { + return ' AND rc_user_text = ' . $dbo->addQuotes( $title->getText() ); + } else { + return ''; + } } function getSQL() { -- 2.20.1