-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.php
48 lines (35 loc) · 1.27 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
<?php
// Init the hooks of the plugins -Needed
function plugin_init_pdu() {
global $PLUGIN_HOOKS,$CFG_GLPI;
static $types = array( 'Computer','NetworkEquipment','Peripheral' );
Plugin::registerClass('PluginPduConnection',
array( "addtabon" => $types )
);
Plugin::registerClass('PluginPduModel',
array( "addtabon" => "NetworkEquipmentModel" )
);
$PLUGIN_HOOKS['menu_entry']['pdu'] = 'front/model.php';
foreach ($types as $type) {
$PLUGIN_HOOKS['item_purge']['pdu'][$type] = 'plugin_item_purge_pdu';
}
// Massive Action definition
$PLUGIN_HOOKS['use_massive_action']['pdu'] = 1;
// CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm();
$PLUGIN_HOOKS['csrf_compliant']['pdu'] = true;
}
// Get the name and the version of the plugin - Needed
function plugin_version_pdu() {
return array('name' => 'PDU',
'version' => '0.0.1',
'author' => 'Vadim Pisarev',
'license' => 'GPLv2+',
'minGlpiVersion' => '0.84');// For compatibility / no install in version < 0.80
}
function plugin_pdu_check_prerequisites() {
return true;
}
function plugin_pdu_check_config($verbose=false) {
return true;
}
?>