* Code and documentation cleanup, bugfix
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 6 Sep 2005 16:46:37 +0000 (16:46 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 6 Sep 2005 16:46:37 +0000 (16:46 +0000)
includes/SpecialLog.php

index c90bd06..65de257 100644 (file)
@@ -89,15 +89,16 @@ class LogReader {
 
        /**
         * Set the log reader to return only entries by the given user.
-        * @param string $name Valid user name
+        * @param string $name (In)valid user name
         * @private
         */
        function limitUser( $name ) {
+               if ( $name == '' )
+                       return false;
                $title = Title::makeTitle( NS_USER, $name );
-               if( empty( $name ) || is_null( $title ) ) {
+               if ( is_null( $title ) )
                        return false;
-               }
-               $this->user = str_replace( '_', ' ', $title->getDBkey() );
+               $this->user = $title->getText();
                $safename = $this->db->strencode( $this->user );
                $user = $this->db->tableName( 'user' );
                $this->whereClauses[] = "user_name='$safename'";