From: Sam Reed Date: Thu, 19 Jan 2012 16:33:57 +0000 (+0000) Subject: Cache gallery object, don't create a new one unless we need to X-Git-Tag: 1.31.0-rc.0~25182 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=b95037992087db7e09f5a52c46c218fcd1d7f895;p=lhc%2Fweb%2Fwiklou.git Cache gallery object, don't create a new one unless we need to Make getStartBody return something --- 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(){