r75591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75590‎ | r75591 | r75592 >
Date:23:00, 27 October 2010
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
Fix Maps breakage in r75587, and fix ClickTracking which apparently has been broken for a while
Modified paths:
  • /trunk/extensions/ClickTracking/ClickTracking.hooks.php (modified) (history)
  • /trunk/extensions/Maps/Maps.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.hooks.php
@@ -76,8 +76,9 @@
7777
7878 foreach ( $modules as $name => $resources ) {
7979 $resourceLoader->register( $name, new ResourceLoaderFileModule(
80 - array_merge_recursive( $resources, array( 'group' => 'ext.maps' ) )
81 - ), dirname( __FILE__ ), "$wgExtensionAssetsPath/Maps" );
 80+ array_merge_recursive( $resources, array( 'group' => 'ext.maps' ) ),
 81+ dirname( __FILE__ ), "$wgExtensionAssetsPath/Maps"
 82+ ) );
8283 }
8384
8485 return true;
Index: trunk/extensions/ClickTracking/ClickTracking.hooks.php
@@ -86,7 +86,7 @@
8787 global $wgExtensionAssetsPath;
8888 $localpath = dirname( __FILE__ ) . '/modules';
8989 $remotepath = "$wgExtensionAssetsPath/extensions/ClickTracking/modules";
90 - $resourceLoader->register( array(
 90+ $resourceLoader->register( new ResourceLoaderFileModule( array(
9191 'jquery.clickTracking' => new ResourceLoaderFileModule( array(
9292 'scripts' => 'jquery.clickTracking.js',
9393 'dependencies' => 'jquery.cookie',
@@ -100,7 +100,7 @@
101101 'styles' => 'ext.clickTracking.special.css',
102102 'dependencies' => array( 'jquery.ui.datepicker', 'jquery.ui.dialog' ),
103103 ) ),
104 - ), $localpath, $remotepath );
 104+ ), $localpath, $remotepath ) );
105105 return true;
106106 }
107107

Follow-up revisions

RevisionCommit summaryAuthorDate
r75940Mostly reverts r75591, refactoring the way modules are being defined and regi...tparscal17:46, 3 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75587(bug 25339) Allow specifying separate base paths for local and remote paths i...catrope22:22, 27 October 2010

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   17:46, 3 November 2010

ResourceLoader::register only accepts an array of ResourceLoaderModule objects keyed by module name or 2 arguments, a module name and single ResourceLoaderModule object. I think you need more sleep. r75940 fixes this up.

#Comment by Catrope (talk | contribs)   18:26, 3 November 2010

I was feeling pretty sick (bad cold) when writing this; now see what I did wrong, yeah, I nested new () and array() the wrong way around

#Comment by Trevor Parscal (WMF) (talk | contribs)   18:26, 3 November 2010

I officially forgive you :)

#Comment by 😂 (talk | contribs)   17:53, 3 November 2010

Was getting an illegal offset here. Followup rev resolves this.

Status & tagging log