Fix invalid SQL, per bug #15836
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Fri, 10 Oct 2008 18:15:53 +0000 (18:15 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Fri, 10 Oct 2008 18:15:53 +0000 (18:15 +0000)
includes/specials/SpecialAllpages.php

index b7acb36..1dc9be1 100644 (file)
@@ -153,10 +153,9 @@ class SpecialAllpages extends IncludableSpecialPage {
                        $done = false;
                        while( !$done ) {
                                // Fetch the last title of this chunk and the first of the next
-                               $chunk = is_null( $lastTitle )
-                                       ? ''
-                                       : 'page_title >= ' . $dbr->addQuotes( $lastTitle );
-                               $chunk = array($chunk);
+                               $chunk = ( $lastTitle === false )
+                                       ? array()
+                                       : array( 'page_title >= ' . $dbr->addQuotes( $lastTitle ) );
                                $res = $dbr->select( 'page', /* FROM */
                                        'page_title', /* WHAT */
                                        array_merge($where,$chunk),