* (bug 7299) Normalize username filter on Special:Newpages
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Sep 2006 20:28:07 +0000 (20:28 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Sep 2006 20:28:07 +0000 (20:28 +0000)
RELEASE-NOTES
includes/SpecialNewpages.php

index 0ae27ad..0fcfc69 100644 (file)
@@ -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 ==
index c050137..3fd0eba 100644 (file)
@@ -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() {