From 6d0e491af0164d0e76b92fb3ee4f14e10b6e967d Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 6 Sep 2005 16:46:37 +0000 Subject: [PATCH] * Code and documentation cleanup, bugfix --- includes/SpecialLog.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index c90bd067c7..65de257e33 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -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'"; -- 2.20.1