r109546 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109545‎ | r109546 | r109547 >
Date:16:33, 19 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Cache gallery object, don't create a new one unless we need to

Make getStartBody return something
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -103,7 +103,10 @@
104104 }
105105
106106 function getStartBody(){
107 - $this->gallery = new ImageGallery();
 107+ if ( !$this->gallery ) {
 108+ $this->gallery = new ImageGallery();
 109+ }
 110+ return '';
108111 }
109112
110113 function getEndBody(){

Status & tagging log