r36884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36883‎ | r36884 | r36885 >
Date:06:35, 2 July 2008
Author:raymond
Status:old
Tags:
Comment:
Fix function addScriptFile. $this was not defined.
Modified paths:
  • /trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.php
@@ -11,13 +11,12 @@
1212 }
1313
1414 $wgExtensionCredits['specialpage'][] = array(
15 -'name' => 'GroupPermissions Manager',
16 -'author' => 'Ryan Schmidt',
17 -'url' => 'http://www.mediawiki.org/wiki/Extension:GroupPermissions_Manager',
18 -#'version' => '3.1',
19 -'version' => '3.0',
20 -'description' => 'Manage group permissions via a special page',
21 -'descriptionmsg' => 'grouppermissions-desc',
 15+ 'name' => 'GroupPermissions Manager',
 16+ 'author' => 'Ryan Schmidt',
 17+ 'url' => 'http://www.mediawiki.org/wiki/Extension:GroupPermissions_Manager',
 18+ 'version' => '3.0',
 19+ 'description' => 'Manage group permissions via a special page',
 20+ 'descriptionmsg' => 'grouppermissions-desc',
2221 );
2322 $wgAutoloadClasses['GroupPermissions'] = dirname(__FILE__) . '/GroupPermissionsManager_body.php';
2423 #$wgAutoloadClasses['RemoveUnusedGroups'] = dirname(__FILE__) . '/RemoveUnusedGroups.php';
@@ -264,12 +263,12 @@
265264
266265 //was added in 1.13, so supporting for downwards compatibility with 1.12
267266 function addScriptFile( $file ) {
268 - global $wgStylePath, $wgStyleVersion, $wgJsMimeType;
 267+ global $wgStylePath, $wgStyleVersion, $wgJsMimeType, $wgOut;
269268 if( substr( $file, 0, 1 ) == '/' ) {
270269 $path = $file;
271270 } else {
272271 $path = "{$wgStylePath}/common/{$file}";
273272 }
274273 $encPath = htmlspecialchars( $path );
275 - $this->addScript( "<script type=\"{$wgJsMimeType}\" src=\"$path?$wgStyleVersion\"></script>\n" );
 274+ $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"$path?$wgStyleVersion\"></script>\n" );
276275 }

Status & tagging log