r72139 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72138‎ | r72139 | r72140 >
Date:18:23, 1 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Made the $only parameter no longer optional for OutputPage::makeResourceLoaderLink
Modified paths:
  • /branches/resourceloader/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/OutputPage.php
@@ -2279,8 +2279,8 @@
22802280
22812281 return $ret;
22822282 }
2283 -
2284 - static function makeResourceLoaderLink( $skin, $modules, $only = null ) {
 2283+
 2284+ static function makeResourceLoaderLink( $skin, $modules, $only ) {
22852285 global $wgUser, $wgLang, $wgRequest, $wgScriptPath;
22862286 // TODO: Should this be a static function of ResourceLoader instead?
22872287 $query = array(
@@ -2288,10 +2288,8 @@
22892289 'lang' => $wgLang->getCode(),
22902290 'debug' => $wgRequest->getBool( 'debug' ) && $wgRequest->getVal( 'debug' ) !== 'false',
22912291 'skin' => $wgUser->getSkin()->getSkinName(),
 2292+ 'only' => $only,
22922293 );
2293 - if ( isset( $only ) ) {
2294 - $query['only'] = $only;
2295 - }
22962294 // Automatically select style/script elements
22972295 if ( $only === 'styles' ) {
22982296 return Html::linkedStyle( wfAppendQuery( $wgScriptPath . '/load.php', $query ) );

Status & tagging log