summaryrefslogtreecommitdiff
path: root/extensions/Nuke/Nuke.php
blob: 12022f28b4f14e6077459296b906d89a1fba1296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php

if ( !defined( 'MEDIAWIKI' ) ) {
	die( 'Not an entry point.' );
}

define( 'Nuke_VERSION', '1.2.0' );

$dir = dirname( __FILE__ ) . '/';

$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' => dirname( __FILE__ ) . '/',
	'remoteExtPath' => 'Nuke/'
);

$wgResourceModules['ext.nuke'] = $moduleTemplate + array(
	'scripts' => array(
		'ext.nuke.js'
	),
	'messages' => array(
	)
);

unset( $moduleTemplate );