r60886 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60885‎ | r60886 | r60887 >
Date:10:20, 10 January 2010
Author:midom
Status:ok
Tags:
Comment:
Switch to using $wgExtensionAssetsPath for css/js includes, requires MW r60885
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -111,7 +111,7 @@
112112 * Adds scripts
113113 */
114114 public static function addResources( $out ) {
115 - global $wgScriptPath, $wgJsMimeType;
 115+ global $wgExtensionAssetsPath, $wgJsMimeType;
116116 global $wgUsabilityInitiativeResourceMode;
117117 global $wgEnableJS2system, $wgEditToolbarRunTests;
118118 global $wgStyleVersion;
@@ -152,7 +152,7 @@
153153 // Loops over each script
154154 foreach ( self::$scripts as $script ) {
155155 // Add javascript to document
156 - $src = "$wgScriptPath/extensions/UsabilityInitiative/{$script['src']}";
 156+ $src = "$wgExtensionAssetsPath/UsabilityInitiative/{$script['src']}";
157157 $version = isset( $script['version'] ) ? $script['version'] : $wgStyleVersion;
158158 $out->addScript(
159159 Xml::element(
@@ -190,8 +190,8 @@
191191 array(
192192 'rel' => 'stylesheet',
193193 'type' => 'text/css',
194 - 'href' => $wgScriptPath .
195 - "/extensions/UsabilityInitiative/" .
 194+ 'href' => $wgExtensionAssetsPath .
 195+ "/UsabilityInitiative/" .
196196 "{$style['src']}?{$style['version']}",
197197 )
198198 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r60889MFT r60886 : Switch to using $wgExtensionAssetsPath for css/js includesmidom10:41, 10 January 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60885Add $wgExtensionAssetsPath, to decouple js/css/etc serving from $wgScriptPathmidom10:19, 10 January 2010

Status & tagging log