r101827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101826‎ | r101827 | r101828 >
Date:16:11, 3 November 2011
Author:liangent
Status:ok
Tags:
Comment:
Followup r100497: Fix stuff described there
Modified paths:
  • /trunk/extensions/Gadgets/Gadgets_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/Gadgets_body.php
@@ -150,12 +150,11 @@
151151 $lb->setCaller( __METHOD__ );
152152 $pages = array();
153153
154 - $styles = array();
155154 foreach ( $gadgets as $gadget ) {
156155 if ( $gadget->isEnabled( $wgUser ) && $gadget->isAllowed( $wgUser ) ) {
157156 if ( $gadget->hasModule() ) {
158 - $styles[] = $gadget->getModuleName();
159 - $out->addModuleScripts( $gadget->getModuleName() );
 157+ $out->addModuleStyles( $gadget->getModuleName() );
 158+ $out->addModules( $gadget->getModuleName() );
160159 }
161160
162161 foreach ( $gadget->getLegacyScripts() as $page ) {
@@ -164,9 +163,6 @@
165164 }
166165 }
167166 }
168 - $out->addHeadItem( 'ext.gadget', $out->makeResourceLoaderLink( $styles,
169 - ResourceLoaderModule::TYPE_STYLES
170 - ) );
171167
172168 $lb->execute( __METHOD__ );
173169

Follow-up revisions

RevisionCommit summaryAuthorDate
r101828Followup r101827: It doesn't need to extends OutputPage anymoreliangent16:12, 3 November 2011
r106007Followup r100497, r101827: use another way which doesn't look that hacky to l...liangent10:41, 13 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100497Move styles in gadgets to the top of pages to avoid flash of unstyled content....liangent04:32, 22 October 2011

Status & tagging log