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
$count = $dbr->selectField( 'cur', 'COUNT(*)', $where, $fname );
$sections = ceil( $count / $indexMaxperpage );
+ if ( $sections < 3 ) {
+ # If there are only two or less sections, don't even display them.
+ # Instead, display the first section directly.
+ indexShowChunk( '', $namespace );
+ return;
+ }
+
# We want to display $toplevelMaxperpage lines starting at $offset.
# NOTICE: $offset starts at 0
$offset = intval ( $wgRequest->getVal( 'offset' ) );