mediawiki-extensions-Nuke/Nuke.php
Southparkfan d4286e70e4 Use __DIR__ instead of dirname( __FILE__ )
Change-Id: Ibd0f9c9baf52d9962ab3fcbfe31e04028aed699c
2014-11-08 09:39:13 -05:00

49 lines
1.2 KiB
PHP

<?php
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'Not an entry point.' );
}
define( 'Nuke_VERSION', '1.2.0' );
$dir = __DIR__ . '/';
$wgMessagesDirs['Nuke'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['Nuke'] = $dir . 'Nuke.i18n.php';
$wgExtensionMessagesFiles['NukeAlias'] = $dir . 'Nuke.alias.php';
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'Nuke',
'descriptionmsg' => 'nuke-desc',
'author' => array( 'Brion Vibber', 'Jeroen De Dauw' ),
'url' => 'https://www.mediawiki.org/wiki/Extension:Nuke',
'version' => Nuke_VERSION,
);
$wgGroupPermissions['sysop']['nuke'] = true;
$wgAvailableRights[] = 'nuke';
$wgAutoloadClasses['SpecialNuke'] = $dir . 'Nuke_body.php';
$wgAutoloadClasses['NukeHooks'] = $dir . 'Nuke.hooks.php';
$wgSpecialPages['Nuke'] = 'SpecialNuke';
$wgSpecialPageGroups['Nuke'] = 'pagetools';
$wgHooks['ContributionsToolLinks'][] = 'NukeHooks::nukeContributionsLinks';
// Resource loader modules
$moduleTemplate = array(
'localBasePath' => __DIR__ . '/',
'remoteExtPath' => 'Nuke/'
);
$wgResourceModules['ext.nuke'] = $moduleTemplate + array(
'scripts' => array(
'ext.nuke.js'
),
'messages' => array(
)
);
unset( $moduleTemplate );