-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathsetup.php
More file actions
42 lines (31 loc) · 1.17 KB
/
setup.php
File metadata and controls
42 lines (31 loc) · 1.17 KB
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
<?php
function plugin_version_protocolsmanager() {
return [
'name' => "Protocols manager",
'version' => '2.0.0',
'author' => 'Mateusz Nitka',
'license' => 'GPLv3+',
'homepage' => 'https://github.com/mateusznitka/protocolsmanager',
'minGlpiVersion' => '10.0',
];
}
function plugin_protocolsmanager_check_config() {
return true;
}
function plugin_protocolsmanager_check_prerequisites() {
if (version_compare(GLPI_VERSION, '10.0', '>=')) {
return true;
}
echo "This plugin requires GLPI 10.0 or higher.";
return false;
}
function plugin_init_protocolsmanager() {
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['protocolsmanager'] = true;
$PLUGIN_HOOKS['config_page']['protocolsmanager'] = 'front/config.form.php';
Plugin::registerClass('PluginProtocolsmanagerGenerate', ['addtabon' => ['User']]);
Plugin::registerClass('PluginProtocolsmanagerProfile', ['addtabon' => ['Profile']]);
Plugin::registerClass('PluginProtocolsmanagerConfig', ['addtabon' => ['Config']]);
$PLUGIN_HOOKS['add_css']['protocolsmanager'] = 'css/styles.css';
}
?>