4 Copyright (C) 2014 AUF -- www.auf.org
7 // Init the hooks of the plugins -Needed
8 function plugin_init_auf() {
11 $PLUGIN_HOOKS['csrf_compliant']['auf'] = TRUE
;
13 $Plugin = new Plugin();
14 if ($Plugin->isActivated('auf')) { // check if plugin is active
15 if (Session
::getLoginUserID()) {
16 $PLUGIN_HOOKS['add_css']['auf'] = "auf.css";
18 if (isset($_SESSION["glpiname"])) {
19 $report_list = array();
20 if (Session
::haveRight("computer", "r")) {
21 $report_list["report.operatingsystems.php"] = "Systèmes d'exploitation par implantation";
22 $report_list["report.wip.php"] = 'WIP (rapport en cours de développement)';
24 $PLUGIN_HOOKS['reports']['auf'] = $report_list;
29 // Get the name and the version of the plugin - Needed
30 function plugin_version_auf() {
34 'author' => 'Jean Christophe André',
35 'license' => 'GPLv2+',
36 'homepage' => 'http://git.auf.org/?p=glpi',
37 'minGlpiVersion' => '0.84');// For compatibility / no install in version < 0.80
40 // Optional : check prerequisites before install : may print errors or add to message after redirect
41 function plugin_auf_check_prerequisites() {
42 if (version_compare(GLPI_VERSION
,'0.84','lt') ||
version_compare(GLPI_VERSION
,'0.85','ge')) {
43 _e('This plugin requires GLPI >= 0.84', 'auf');
49 // Uninstall process for plugin : need to return true if succeeded : may display messages or add to message after redirect
50 function plugin_auf_check_config() {
54 function plugin_auf_haveRight($module,$right) {