r37001 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37000‎ | r37001 | r37002 >
Date:19:59, 3 July 2008
Author:brion
Status:old
Tags:
Comment:
Revert r36907, 36908 ("(bug 13862) Add TOC to Special:SpecialPages.")
* I'm not sure I really like the look of the horizontal layout for this many items.
* It reuses the "filetoc" ID, which is a poor practice as this isn't a file description page TOC. :)

The IDs for the sections are definitely useful as link anchors, but they may be ambiguous ("user", "wiki", etc) as well
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSpecialpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSpecialpages.php
@@ -48,21 +48,13 @@
4949 $groups['other'] = $other;
5050 }
5151
52 - if ( count( $groups ) >= 3 ) {
53 - $wgOut->addHTML('<ul id="filetoc">');
54 - foreach( $groups as $group => $pages ) {
55 - $wgOut->addHTML('<li><a href="#' . $group . '">' . wfMsgHtml("specialpages-group-$group") . '</a></li>');
56 - }
57 - $wgOut->addHTML('</ul>');
58 - }
59 -
6052 /** Now output the HTML */
6153 foreach ( $groups as $group => $sortedPages ) {
6254 $middle = ceil( count($sortedPages)/2 );
6355 $total = count($sortedPages);
6456 $count = 0;
6557
66 - $wgOut->addHTML( "<h4 class='mw-specialpagesgroup' id='$group'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" );
 58+ $wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" );
6759 $wgOut->addHTML( "<table style='width: 100%;' class='mw-specialpages-table'><tr>" );
6860 $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" );
6961 foreach( $sortedPages as $desc => $specialpage ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -177,8 +177,6 @@
178178 * Add meta generator tag to HTML output
179179 * MediawikiPerformAction hook is now passed the Mediawiki object
180180 * Added blank special page Special:BlankPage for benchmarking, etc.
181 -* (bug 13862) Specialpages now has a horizontal TOC if there's three or more
182 - groups.
183181 * Foreign repo file descriptions and thumbnails are now cached.
184182
185183 === Bug fixes in 1.13 ===

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r36907(bug 13862) Add TOC to Special:SpecialPages.demon13:39, 2 July 2008

Status & tagging log