hopefully don't die on non-gallery-laden pages which trigger this consistency check
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 23:45:18 +0000 (23:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 23:45:18 +0000 (23:45 +0000)
includes/CategoryPage.php

index 315d435..225898b 100644 (file)
@@ -484,7 +484,7 @@ class CategoryViewer {
                #      know the right figure.
                #   3) We have no idea.
                $totalrescnt = count( $this->articles ) + count( $this->children ) +
-                       $this->gallery->count();
+                       ($this->showGallery ? $this->gallery->count() : 0);
                if($dbcnt == $rescnt || (($totalrescnt == $this->limit || $this->from
                || $this->until) && $dbcnt > $rescnt)){
                        # Case 1: seems sane.