-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHostStats.php
35 lines (32 loc) · 1.03 KB
/
HostStats.php
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
<?php
/**
* The HostStats extension adds a special page that displays
* the statistics of the host that the wiki is running on.
*
* This extension may expose some private information about
* your server, so please use it with care, especially when
* you change $wgHostStatsCommands below.
*
* @file
* @ingroup Extensions
*/
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'HostStats',
'author' => 'Hydriz',
'url' => 'https://www.mediawiki.org/wiki/Extension:HostStats',
'descriptionmsg' => 'hoststats-desc',
'version' => '1.3alpha',
'license-name' => 'GPL-3.0+',
);
// An array of commands that you wish to run and output.
$wgHostStatsCommands = array(
'hostname',
'df -h'
);
$dir = dirname(__FILE__) . '/';
$wgAutoloadClasses['SpecialHostStats'] = $dir . 'SpecialHostStats.php';
$wgExtensionMessagesFiles['HostStats'] = $dir . 'HostStats.i18n.php';
$wgMessagesDirs['HostStats'] = __DIR__ . '/i18n';
$wgSpecialPages['HostStats'] = 'SpecialHostStats';
$wgSpecialPageGroups['HostStats'] = 'wiki';