From ce17d249dce18fda606e71e17453c93e57953348 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 20 Jul 2009 05:38:26 +0000 Subject: [PATCH] (bug 19596) Fix more fucked up garbage from when $types was made into an array in various places. Log headers were missing. --- includes/LogEventsList.php | 12 ++++++++---- includes/LogPage.php | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index eb43cbc669..41e779ed44 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -49,12 +49,16 @@ class LogEventsList { /** * Set page title and show header for this log type - * @param $type String + * @param $type Array */ public function showHeader( $type ) { - if( LogPage::isLogType( $type ) ) { - $this->out->setPageTitle( LogPage::logName( $type ) ); - $this->out->addHTML( LogPage::logHeader( $type ) ); + // If only one log type is used, then show a special message... + $headerType = (count($type) == 1) ? $type[0] : ''; + if( LogPage::isLogType( $headerType ) ) { + $this->out->setPageTitle( LogPage::logName( $headerType ) ); + $this->out->addHTML( LogPage::logHeader( $headerType ) ); + } else { + $this->out->addHTML( wfMsgExt('alllogstext',array('parseinline')) ); } } diff --git a/includes/LogPage.php b/includes/LogPage.php index be4a1c0609..947a452531 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -133,6 +133,7 @@ class LogPage { /** * @static + * @param string $type logtype */ public static function logName( $type ) { global $wgLogNames, $wgMessageCache; -- 2.20.1