r76051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76050‎ | r76051 | r76052 >
Date:22:33, 4 November 2010
Author:maxsem
Status:deferred
Tags:
Comment:
Seems to actually work
Modified paths:
  • /branches/Gadgets-work/Gadgets_body.php (modified) (history)

Diff [purge]

Index: branches/Gadgets-work/Gadgets_body.php
@@ -118,7 +118,6 @@
119119
120120 $lb->execute( __METHOD__ );
121121
122 - $pages = array();
123122 $done = array();
124123 foreach ( $pages as $page ) {
125124 if ( isset( $done[$page] ) ) continue;
@@ -208,11 +207,17 @@
209208 }
210209
211210 public function getModule() {
212 - $pages = $this->styles;
 211+ $pages = array();
 212+ foreach( $this->styles as $style ) {
 213+ $pages[$style] = array( 'ns' => NS_MEDIAWIKI, 'type' => 'style' );
 214+ }
213215 if ( $this->supportsResourceLoader() ) {
214 - $pages += $this->scripts;
 216+ foreach ( $this->scripts as $script ) {
 217+ $pages[$script] = array( 'ns' => NS_MEDIAWIKI, 'type' => 'script' );
 218+ }
215219 }
216 - if ( count( $pages ) ) {
 220+ if ( !count( $pages ) ) {
 221+ return null;
217222 }
218223 return new GadgetResourceLoaderModule( $pages );
219224 }

Status & tagging log