* If two log type have the same description, they're now both displayed in the type...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 1 Jan 2010 19:49:37 +0000 (19:49 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 1 Jan 2010 19:49:37 +0000 (19:49 +0000)
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
includes/LogEventsList.php

index 2602dc6..4acd727 100644 (file)
@@ -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 ==
 
index 09161e3..2215568 100644 (file)
@@ -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]) ) {