r54673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54672‎ | r54673 | r54674 >
Date:17:31, 9 August 2009
Author:nikerabbit
Status:deferred
Tags:
Comment:
* Support the new script loader
Modified paths:
  • /trunk/extensions/CleanChanges/CleanChanges.php (modified) (history)
  • /trunk/extensions/CleanChanges/CleanChanges_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CleanChanges/CleanChanges.php
@@ -16,6 +16,7 @@
1717 $dir = dirname(__FILE__) . '/';
1818 $wgExtensionMessagesFiles['CleanChanges'] = $dir . 'CleanChanges.i18n.php';
1919 $wgAutoloadClasses['NCL'] = $dir . 'CleanChanges_body.php';
 20+$wgJSAutoloadClasses['CleanChanges'] = "extensions/CleanChanges/cleanchanges.js";
2021
2122 /* Hook into code */
2223 $wgHooks['FetchChangesList'][] = 'NCL::hook' ;
Index: trunk/extensions/CleanChanges/CleanChanges_body.php
@@ -28,12 +28,8 @@
2929 }
3030
3131 if ( $list instanceof NCL ) {
32 - global $wgOut, $wgScriptPath, $wgJsMimeType, $wgStyleVersion;
33 - $wgOut->addScript(
34 - Xml::openElement( 'script', array( 'type' => $wgJsMimeType, 'src' =>
35 - "$wgScriptPath/extensions/CleanChanges/cleanchanges.js?$wgStyleVersion" )
36 - ) . '</script>'
37 - );
 32+ global $wgOut;
 33+ $wgOut->addScriptClass( 'CleanChanges' );
3834 }
3935
4036 /* If some list was specified, stop processing */

Status & tagging log