r92838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92837‎ | r92838 | r92839 >
Date:01:07, 22 July 2011
Author:werdna
Status:ok
Tags:
Comment:
Make loading of dependencies conditional -- mediawiki.user is not its own module in 1.17
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.php
@@ -44,6 +44,8 @@
4545 'remoteExtPath' => 'MoodBar/modules'
4646 );
4747
 48+$oldVersion = version_compare( $wgVersion, '1.17', '<=' );
 49+
4850 $wgResourceModules['ext.moodBar.init'] = $mbResourceTemplate + array(
4951 'styles' => 'ext.moodBar/ext.moodBar.init.css',
5052 'scripts' => 'ext.moodBar/ext.moodBar.init.js',
@@ -56,7 +58,7 @@
5759 'tooltip-p-moodbar-trigger-feedback',
5860 ),
5961 'position' => 'top',
60 - 'dependencies' => array(
 62+ 'dependencies' => $oldVersion ? array() : array(
6163 'mediawiki.user',
6264 ),
6365 );

Status & tagging log