-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.php
59 lines (43 loc) · 1.86 KB
/
setup.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
function plugin_init_gitlabintegration() {
global $PLUGIN_HOOKS, $CFG_GLPI;
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/itemform.class.php");
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/eventlog.class.php");
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/parameters.class.php");
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/gitlabintegration.class.php");
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/menu.class.php");
include_once (GLPI_ROOT . "/plugins/gitlabintegration/inc/profiles.class.php");
$PLUGIN_HOOKS['add_css']['gitlabintegration'][] = "css/styles.css";
$PLUGIN_HOOKS['add_javascript']['gitlabintegration'][] = 'js/buttonsFunctions.js';
// CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm();
$PLUGIN_HOOKS['csrf_compliant']['gitlabintegration'] = true;
if (class_exists('PluginGitlabIntegrationItemForm')) {
$PLUGIN_HOOKS['post_item_form']['gitlabintegration'] = ['PluginGitlabIntegrationItemForm', 'postItemForm'];
}
// add entry to configuration menu
$PLUGIN_HOOKS['menu_toadd']['gitlabintegration']['admin'] = ['admin' => 'PluginGitlabIntegrationMenu'];
}
function plugin_version_gitlabintegration() {
global $DB, $LANG;
return array('name' => __('Gitlab Integration','gitlabintegration'),
'version' => '0.0.1',
'author' => 'Fáiza Letícia Schoeninger',
'license' => 'GPLv3+',
'homepage' => 'https://github.com/faizaleticia',
'minGlpiVersion' => '9.4'
);
}
function plugin_gitlabintegration_check_prerequisites() {
if (GLPI_VERSION >= 9.4){
return true;
} else {
echo "GLPI version NOT compatible. Requires GLPI >= 9.4";
}
}
function plugin_gitlabintegration_check_config($verbose=false) {
if ($verbose) {
echo 'Installed / not configured';
}
return true;
}
?>