r98024 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98023‎ | r98024 | r98025 >
Date:20:44, 24 September 2011
Author:ashley
Status:deferred
Tags:
Comment:
LinkFilter: ResourceLoader fixes (addModuleStyles&addModuleScripts instead of addModules) + one fix for a Database::selectField() call, the second string (what to select) is supposed to be a string, not an array
Modified paths:
  • /trunk/extensions/LinkFilter/LinkPage.php (modified) (history)
  • /trunk/extensions/LinkFilter/SpecialLinkApprove.php (modified) (history)
  • /trunk/extensions/LinkFilter/SpecialLinkEdit.php (modified) (history)
  • /trunk/extensions/LinkFilter/SpecialLinkSubmit.php (modified) (history)
  • /trunk/extensions/LinkFilter/SpecialLinksHome.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LinkFilter/LinkPage.php
@@ -142,7 +142,7 @@
143143 $dbr = wfGetDB( DB_MASTER );
144144 $createDate = $dbr->selectField(
145145 'revision',
146 - array( 'rev_timestamp' ),
 146+ 'rev_timestamp',
147147 array( 'rev_page' => intval( $pageId ) ),
148148 __METHOD__,
149149 array( 'ORDER BY' => 'rev_timestamp ASC' )
Index: trunk/extensions/LinkFilter/SpecialLinksHome.php
@@ -154,7 +154,8 @@
155155
156156 // Add CSS & JS
157157 if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
158 - $wgOut->addModules( 'ext.linkFilter' );
 158+ $wgOut->addModuleStyles( 'ext.linkFilter' );
 159+ $wgOut->addModuleScripts( 'ext.linkFilter' );
159160 } else {
160161 $wgOut->addExtensionStyle( $wgLinkFilterScripts . '/LinkFilter.css' );
161162 $wgOut->addScriptFile( $wgLinkFilterScripts . '/LinkFilter.js' );
Index: trunk/extensions/LinkFilter/SpecialLinkApprove.php
@@ -123,7 +123,8 @@
124124
125125 // Add CSS & JS
126126 if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
127 - $wgOut->addModules( 'ext.linkFilter' );
 127+ $wgOut->addModuleStyles( 'ext.linkFilter' );
 128+ $wgOut->addModuleScripts( 'ext.linkFilter' );
128129 } else {
129130 $wgOut->addExtensionStyle( $wgLinkFilterScripts . '/LinkFilter.css' );
130131 $wgOut->addScriptFile( $wgLinkFilterScripts . '/LinkFilter.js' );
Index: trunk/extensions/LinkFilter/SpecialLinkEdit.php
@@ -37,7 +37,8 @@
3838
3939 // Add CSS & JS
4040 if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
41 - $wgOut->addModules( 'ext.linkFilter' );
 41+ $wgOut->addModuleStyles( 'ext.linkFilter' );
 42+ $wgOut->addModuleScripts( 'ext.linkFilter' );
4243 } else {
4344 $wgOut->addExtensionStyle( $wgLinkFilterScripts . '/LinkFilter.css' );
4445 $wgOut->addScriptFile( $wgLinkFilterScripts . '/LinkFilter.js' );
Index: trunk/extensions/LinkFilter/SpecialLinkSubmit.php
@@ -49,7 +49,8 @@
5050
5151 // Add CSS & JS (JS is required by displayAddForm())
5252 if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
53 - $wgOut->addModules( 'ext.linkFilter' );
 53+ $wgOut->addModuleStyles( 'ext.linkFilter' );
 54+ $wgOut->addModuleScripts( 'ext.linkFilter' );
5455 } else {
5556 $wgOut->addExtensionStyle( $wgLinkFilterScripts . '/LinkFilter.css' );
5657 $wgOut->addScriptFile( $wgLinkFilterScripts . '/LinkFilter.js' );

Status & tagging log