* (bug 23078) "All public logs" option on Special:Log is now always the first item
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 7 Apr 2010 12:16:56 +0000 (12:16 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 7 Apr 2010 12:16:56 +0000 (12:16 +0000)
RELEASE-NOTES
includes/LogEventsList.php

index 29a9864..b22cc35 100644 (file)
@@ -92,6 +92,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   frames, and $wgMaxImageArea against the size of the first frame, rather than
   the other way around.  Both now default to 12.5 megapixels.  Also, images
   exceeding $wgMaxImageArea can still be embedded at original size
+* (bug 23078) "All public logs" option on Special:Log is now always the first
+  item
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent
index 49d4dc5..045644d 100644 (file)
@@ -199,6 +199,14 @@ class LogEventsList {
 
                // Note the query type
                $queryType = count($queryTypes) == 1 ? $queryTypes[0] : '';
+
+               // Always put "All public logs" on top
+               if ( isset( $typesByName[''] ) ) {
+                       $all = $typesByName[''];
+                       unset( $typesByName[''] );
+                       $typesByName = array( '' => $all ) + $typesByName;
+               }
+
                // Third pass generates sorted XHTML content
                foreach( $typesByName as $type => $text ) {
                        $selected = ($type == $queryType);