glpi / setup.php @ bef4271a
History | View | Annotate | Download (2.04 KB)
1 | efcf5ecf | Francois POIROTTE | <?php
|
---|---|---|---|
2 | |||
3 | include(__DIR__ . "/hook.php"); |
||
4 | |||
5 | function plugin_init_vigilo() { |
||
6 | global $PLUGIN_HOOKS; |
||
7 | |||
8 | $hooks =& $PLUGIN_HOOKS; |
||
9 | $p = "vigilo"; |
||
10 | $hookObj = new VigiloHooks(); |
||
11 | |||
12 | $hooks['csrf_compliant'][$p] = true; |
||
13 | bef4271a | Thibault Louet | $hooks['item_add'][$p] = array("Computer" => array($hookObj, "add"), |
14 | "ComputerDisk" => array($hookObj),"manageDisks", |
||
15 | "Network" => array($hookObj),"manageNetworks"); |
||
16 | $hooks['item_update'][$p] = array("Computer" => array($hookObj, "update"), |
||
17 | "ComputerDisk" => array($hookObj),"manageDisks", |
||
18 | "Network" => array($hookObj),"manageNetworks"); |
||
19 | $hooks['item_purge'][$p] = array("Computer" => array($hookObj, "delete"), |
||
20 | "ComputerDisk" => array($hookObj),"manageDisks", |
||
21 | "Network" => array($hookObj),"manageNetworks"); |
||
22 | $hooks['item_delete'][$p] = array("Computer" => array($hookObj, "delete"), |
||
23 | "ComputerDisk" => array($hookObj),"manageDisks", |
||
24 | "Network" => array($hookObj),"manageNetworks"); |
||
25 | $hooks['item_restore'][$p] = array("Computer" => array($hookObj, "add"), |
||
26 | "ComputerDisk" => array($hookObj),"manageDisks", |
||
27 | "Network" => array($hookObj),"manageNetworks"); |
||
28 | efcf5ecf | Francois POIROTTE | $hooks["menu_toadd"][$p]['plugins'] = 'PluginVigiloMenu'; |
29 | $hooks['config_page'][$p] = 'front/menu.php?itemtype=vigilo'; |
||
30 | } |
||
31 | |||
32 | function plugin_version_vigilo() { |
||
33 | return array('name' => 'Vigilo monitoring', |
||
34 | 'version' => '0.1', |
||
35 | 'author' => 'CSSI', |
||
36 | 'license' => 'GPLv2+', |
||
37 | 'homepage' => 'http://vigilo-nms.org', |
||
38 | 'minGlpiVersion' => '9.1'); |
||
39 | } |
||
40 | |||
41 | function plugin_vigilo_check_config($verbose=false) { |
||
42 | if (version_compare(GLPI_VERSION,'9.1','lt')) { |
||
43 | echo "This plugin requires GLPI >= 9.1"; |
||
44 | return false; |
||
45 | } |
||
46 | return true; |
||
47 | } |
||
48 | |||
49 | function plugin_vigilo_check_prerequisites() { |
||
50 | return true; |
||
51 | } |
||
52 | |||
53 | function plugin_vigilo_install() { |
||
54 | return true; |
||
55 | } |
||
56 | |||
57 | function plugin_vigilo_uninstall() { |
||
58 | return true; |
||
59 | } |