If misestimated number of sections, don't add a bogus line.
Triggered by funny 'invert' circumstances at least
This commit is contained in:
parent
6ebe0ff5e1
commit
f12f73ac69
1 changed files with 3 additions and 2 deletions
|
|
@ -135,10 +135,11 @@ function indexShowToplevel ( $namespace = NS_MAIN, $invert ) {
|
|||
$limit = ( $i == $offset || $i == $stopat ) ? 1 : 2;
|
||||
$sql = "SELECT page_title $fromwhere $order_str " . $dbr->limitResult ( $limit, $from );
|
||||
$res = $dbr->query( $sql, $fname );
|
||||
$s = $dbr->fetchObject( $res );
|
||||
array_push ( $lines, $s->page_title );
|
||||
if ( $s = $dbr->fetchObject( $res ) ) {
|
||||
array_push ( $lines, $s->page_title );
|
||||
if ( $s = $dbr->fetchObject( $res ) ) {
|
||||
array_push ( $lines, $s->page_title );
|
||||
}
|
||||
}
|
||||
$dbr->freeResult( $res );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue