glpi / setup.php @ efcf5ecf
History | View | Annotate | Download (1.51 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 | $hooks['item_add'][$p] = array("Computer" => array($hookObj, "add")); |
||
14 | $hooks['item_update'][$p] = array("Computer" => array($hookObj, "update")); |
||
15 | $hooks['item_purge'][$p] = array("Computer" => array($hookObj, "delete")); |
||
16 | $hooks['item_delete'][$p] = array("Computer" => array($hookObj, "delete")); |
||
17 | $hooks['item_restore'][$p] = array("Computer" => array($hookObj, "add")); |
||
18 | $hooks["menu_toadd"][$p]['plugins'] = 'PluginVigiloMenu'; |
||
19 | $hooks['config_page'][$p] = 'front/menu.php?itemtype=vigilo'; |
||
20 | } |
||
21 | |||
22 | function plugin_version_vigilo() { |
||
23 | return array('name' => 'Vigilo monitoring', |
||
24 | 'version' => '0.1', |
||
25 | 'author' => 'CSSI', |
||
26 | 'license' => 'GPLv2+', |
||
27 | 'homepage' => 'http://vigilo-nms.org', |
||
28 | 'minGlpiVersion' => '9.1'); |
||
29 | } |
||
30 | |||
31 | function plugin_vigilo_check_config($verbose=false) { |
||
32 | if (version_compare(GLPI_VERSION,'9.1','lt')) { |
||
33 | echo "This plugin requires GLPI >= 9.1"; |
||
34 | return false; |
||
35 | } |
||
36 | return true; |
||
37 | } |
||
38 | |||
39 | function plugin_vigilo_check_prerequisites() { |
||
40 | return true; |
||
41 | } |
||
42 | |||
43 | function plugin_vigilo_install() { |
||
44 | return true; |
||
45 | } |
||
46 | |||
47 | function plugin_vigilo_uninstall() { |
||
48 | return true; |
||
49 | } |