Index: trunk/phase3/includes/SpecialAllpages.php |
— | — | @@ -77,6 +77,13 @@ |
78 | 78 | $count = $dbr->selectField( 'cur', 'COUNT(*)', $where, $fname ); |
79 | 79 | $sections = ceil( $count / $indexMaxperpage ); |
80 | 80 | |
| 81 | + if ( $sections < 3 ) { |
| 82 | + # If there are only two or less sections, don't even display them. |
| 83 | + # Instead, display the first section directly. |
| 84 | + indexShowChunk( '', $namespace ); |
| 85 | + return; |
| 86 | + } |
| 87 | + |
81 | 88 | # We want to display $toplevelMaxperpage lines starting at $offset. |
82 | 89 | # NOTICE: $offset starts at 0 |
83 | 90 | $offset = intval ( $wgRequest->getVal( 'offset' ) ); |