Cache gallery object, don't create a new one unless we need to
authorSam Reed <reedy@users.mediawiki.org>
Thu, 19 Jan 2012 16:33:57 +0000 (16:33 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 19 Jan 2012 16:33:57 +0000 (16:33 +0000)
Make getStartBody return something

includes/specials/SpecialNewimages.php

index dbf354d..b88123d 100644 (file)
@@ -103,7 +103,10 @@ class NewFilesPager extends ReverseChronologicalPager {
        }
 
        function getStartBody(){
-               $this->gallery = new ImageGallery();
+               if ( !$this->gallery ) {
+                       $this->gallery = new ImageGallery();
+               }
+               return '';
        }
 
        function getEndBody(){