From b95037992087db7e09f5a52c46c218fcd1d7f895 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 19 Jan 2012 16:33:57 +0000 Subject: [PATCH] Cache gallery object, don't create a new one unless we need to Make getStartBody return something --- includes/specials/SpecialNewimages.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index dbf354d5f6..b88123dc79 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -103,7 +103,10 @@ class NewFilesPager extends ReverseChronologicalPager { } function getStartBody(){ - $this->gallery = new ImageGallery(); + if ( !$this->gallery ) { + $this->gallery = new ImageGallery(); + } + return ''; } function getEndBody(){ -- 2.20.1