r59457 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59456‎ | r59457 | r59458 >
Date:16:10, 26 November 2009
Author:ialex
Status:deferred
Tags:
Comment:
Fix fatal error since r59446: replace call to OutputPage::addScriptClass() with OutputPage::addScriptFile()
Modified paths:
  • /trunk/extensions/OnlineStatus/OnlineStatus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatus/OnlineStatus.php
@@ -41,9 +41,6 @@
4242 $wgExtensionMessagesFiles['OnlineStatus'] = dirname( __FILE__ ) . '/OnlineStatus.i18n.php';
4343 $wgExtensionMessagesFiles['OnlineStatusMagic'] = dirname( __FILE__ ) . '/OnlineStatus.i18n.magic.php';
4444
45 -// Script loader
46 -$wgJSAutoloadClasses['OnlineStatus'] = "extensions/OnlineStatus/OnlineStatus.js";
47 -
4845 // FIXME: Should be a separate class file
4946 class OnlineStatus {
5047 // FIXME: Can't this just be in the core bit instead of the class? The init() will not have to be called
@@ -287,7 +284,7 @@
288285
289286 if( $wgUser->isLoggedIn() && $wgUseAjax ){
290287 global $wgScriptPath;
291 - $out->addScriptClass( 'OnlineStatus' );
 288+ $out->addScriptFile( "{$wgScriptPath}/extensions/OnlineStatus/OnlineStatus.js" );
292289 $out->addExtensionStyle( "{$wgScriptPath}/extensions/OnlineStatus/OnlineStatus.css" );
293290 }
294291

Follow-up revisions

RevisionCommit summaryAuthorDate
r59458Same as r59457; replaced call to OutputPage::addScriptClass() with OutputPage...ialex16:23, 26 November 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59446Removed JS2 work (has been moved to the js2-work branch). Has been lightly te...tstarling12:00, 26 November 2009

Status & tagging log