This repository was archived by the owner on Aug 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.php
More file actions
52 lines (44 loc) · 1.6 KB
/
setup.php
File metadata and controls
52 lines (44 loc) · 1.6 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
43
44
45
46
47
48
49
50
51
52
<?php
/* ================================================================ */
/* GLPI Checking Version - Plugin GLPI - Développé par FleuryK */
/* © 2018 - https://github.com/FleuryK/GLPICheckingVersion */
/* ================================================================ */
define ('PLUGIN_GLPICHECKINGVERSION_VERSION', '1.0.1');
function plugin_init_glpicheckingversion() {
global $PLUGIN_HOOKS, $CFG_GLPI;
Plugin::registerClass('PluginGlpicheckingversionGlpicheckingversion');
$PLUGIN_HOOKS['csrf_compliant']['glpicheckingversion'] = true;
$PLUGIN_HOOKS['menu_toadd']['glpicheckingversion'] = ['plugins' => 'PluginGlpicheckingversionGlpicheckingversion'];
// Add to 'admin' menu
$PLUGIN_HOOKS['config_page']['glpicheckingversion'] = "front/glpicheckingversion.php";
}
function plugin_version_glpicheckingversion() {
return [
'name' => 'GLPI Checking Version',
'version' => PLUGIN_GLPICHECKINGVERSION_VERSION,
'author' => 'FleuryK',
'license' => 'GPLv2+',
'homepage' => 'https://github.com/FleuryK/GLPICheckingVersion',
'requirements' => [
'glpi' => [
'min' => '9.2',
'dev' => true
]
]
];
}
function plugin_glpicheckingversion_check_prerequisites() {
$version = rtrim(GLPI_VERSION, '-dev');
if (version_compare($version, '9.2', 'lt')) {
echo "This plugin requires GLPI 9.2";
return false;
}
return true;
}
function plugin_glpicheckingversion_check_config($verbose = false) {
if ($verbose) {
echo __('Installed / not configured', 'glpicheckingversion');
}
return true;
}
?>