(bug 13862) Add TOC to Special:SpecialPages.
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 13:39:22 +0000 (13:39 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 13:39:22 +0000 (13:39 +0000)
RELEASE-NOTES
includes/specials/SpecialSpecialpages.php

index 5e91aaf..081978e 100644 (file)
@@ -178,6 +178,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Two new hooks, ExtendJSGlobalVars and wfMessageCacheReplace added
 * MediawikiPerformAction hook is now passed the Mediawiki object
 * Added blank special page Special:BlankPage for benchmarking, etc.
+* (bug 13862) Specialpages now has a horizontal TOC if there's three or more
+  groups.
  
 === Bug fixes in 1.13 ===
 
index ca91ad5..a331510 100644 (file)
@@ -48,6 +48,14 @@ function wfSpecialSpecialpages() {
                $groups['other'] = $other;
        }
 
+       if ( count( $groups ) >= 3 ) {
+               $wgOut->addHTML('<ul id="filetoc">');
+               foreach( $groups as $group => $pages ) {
+                       $wgOut->addHTML('<li><a href="#' . $group . '">' . wfMsgHtml("specialpages-group-$group") . '</a></li>');
+               }
+               $wgOut->addHTML('</ul>');
+       }
+
        /** Now output the HTML */
        foreach ( $groups as $group => $sortedPages ) {
                $middle = ceil( count($sortedPages)/2 );