From 71745e17f3a4360ed93facb9bccb1d4c231f7af4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 1 Jan 2010 19:49:37 +0000 Subject: [PATCH] * If two log type have the same description, they're now both displayed in the type selector on Special:Log This just happened on the French Wiktionary where http://fr.wiktionary.org/wiki/MediaWiki:Suppressionlog and http://fr.wiktionary.org/wiki/MediaWiki:Dellogpage had the same value and the "delete" log was missing --- RELEASE-NOTES | 2 ++ includes/LogEventsList.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2602dc60b8..4acd727f24 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -672,6 +672,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 2971) Swap links of hist & diff location on Special:Contributions for consistency with RC/WL * (bug 21986) Special page names were are now capitalized by content language +* If two log type have the same description, they're now both displayed in the + type selector on Special:Log == API changes in 1.16 == diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 09161e3732..2215568175 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -190,16 +190,16 @@ class LogEventsList { // First pass to load the log names foreach( $validTypes as $type ) { $text = LogPage::logName( $type ); - $typesByName[$text] = $type; + $typesByName[$type] = $text; } // Second pass to sort by name - ksort($typesByName); + asort($typesByName); // Note the query type $queryType = count($queryTypes) == 1 ? $queryTypes[0] : ''; // Third pass generates sorted XHTML content - foreach( $typesByName as $text => $type ) { + foreach( $typesByName as $type => $text ) { $selected = ($type == $queryType); // Restricted types if ( isset($wgLogRestrictions[$type]) ) { -- 2.20.1