r4745 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4744‎ | r4745 | r4746 >
Date:08:29, 14 August 2004
Author:vibber
Status:old
Tags:
Comment:
Go direct to the page list if there are only one or two pages' worth of titles to list. (Timwi's patch plus style tweak.)

Bug 18: Improve Allpages display on small wikis
http://bugzilla.wikipedia.org/show_bug.cgi?id=18
Modified paths:
  • /branches/REL1_3/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_3/phase3/includes/SpecialAllpages.php (modified) (history)

Diff [purge]

Index: branches/REL1_3/phase3/RELEASE-NOTES
@@ -4,8 +4,8 @@
55
66 Changes from 1.3.0:
77 * Watchlist parameters now work with register_globals off
 8+* Special:Allpages display is more sensible on smaller wikis
89
9 -
1010 == Version 1.3.0, 2004-08-11 ==
1111
1212 Security reminder: MediaWiki does not require PHP's register_globals
Index: branches/REL1_3/phase3/includes/SpecialAllpages.php
@@ -45,6 +45,13 @@
4646 $count = $s->count;
4747 $sections = ceil( $count / $indexMaxperpage );
4848
 49+ if ( $sections < 3 ) {
 50+ # If there are only two or less sections, don't even display them.
 51+ # Instead, display the first section directly.
 52+ indexShowChunk( '' );
 53+ return;
 54+ }
 55+
4956 $sql = "SELECT cur_title $fromwhere $order LIMIT 1";
5057 $res = wfQuery( $sql, DB_READ, $fname );
5158 $s = wfFetchObject( $res );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r4744Go direct to the page list if there are only one or two pages' worth of...vibber08:22, 14 August 2004

Status & tagging log