r59475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59474‎ | r59475 | r59476 >
Date:21:33, 26 November 2009
Author:ialex
Status:deferred
Tags:
Comment:
* replaced OutputPage::addScriptClass() with OutputPage::addScriptFile() since the former was removed
* fix some pass-by-ref errors in Filters.php
Modified paths:
  • /trunk/extensions/CleanChanges/CleanChanges.php (modified) (history)
  • /trunk/extensions/CleanChanges/CleanChanges_body.php (modified) (history)
  • /trunk/extensions/CleanChanges/Filters.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CleanChanges/CleanChanges.php
@@ -16,10 +16,9 @@
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";
2120
2221 /* Hook into code */
23 -$wgHooks['FetchChangesList'][] = 'NCL::hook' ;
 22+$wgHooks['FetchChangesList'][] = 'NCL::hook';
2423
2524 /* Extension information */
2625 $wgExtensionCredits['other'][] = array(
Index: trunk/extensions/CleanChanges/CleanChanges_body.php
@@ -28,8 +28,8 @@
2929 }
3030
3131 if ( $list instanceof NCL ) {
32 - global $wgOut;
33 - $wgOut->addScriptClass( 'CleanChanges' );
 32+ global $wgOut, $wgScriptPath;
 33+ $wgOut->addScriptFile( "$wgScriptPath/extensions/CleanChanges/cleanchanges.js" );
3434 }
3535
3636 /* If some list was specified, stop processing */
Index: trunk/extensions/CleanChanges/Filters.php
@@ -2,7 +2,7 @@
33
44 class CCFilters {
55
6 - public static function user( &$conds, &$tables, &$join_conds, &$opts ) {
 6+ public static function user( &$conds, &$tables, &$join_conds, $opts ) {
77 global $wgRequest;
88 $opts->add( 'users', '' );
99 $users = $wgRequest->getVal( 'users' );
@@ -25,7 +25,7 @@
2626 return true;
2727 }
2828
29 - public static function userForm( &$items, &$opts ) {
 29+ public static function userForm( &$items, $opts ) {
3030 wfLoadExtensionMessages( 'CleanChanges' );
3131 $opts->consumeValue( 'users' );
3232 global $wgRequest;

Status & tagging log