isActivated('auf')) { // check if plugin is active Plugin::registerClass('PluginAufProfile', array('addtabon'=>array('Profile'))); Plugin::registerClass('PluginAufComputer', array('addtabon'=>array('Computer'))); $PLUGIN_HOOKS['change_profile']['auf'] = array('PluginAufProfile', 'changeProfile'); $PLUGIN_HOOKS['add_css']['auf'] = "auf.css"; // if (Session::getLoginUserID()) { // } if (isset($_SESSION["glpiname"])) { $report_list = array(); if (Session::haveRight("computer", "r")) { $report_list["rapport.migrationubuntu.php"] = "Progression des mises à niveau Ubuntu"; $report_list["rapport.migrationdebian.php"] = "Progression des mises à niveau Debian"; $report_list["report.operatingsystems.php"] = "Systèmes d'exploitation par implantation"; $report_list["report.computers.php"] = "Nombre de machines par catégorie"; // $report_list["report.wip.php"] = 'WIP (rapport en cours de développement)'; } $PLUGIN_HOOKS['reports']['auf'] = $report_list; } } } // Get the name and the version of the plugin - Needed function plugin_version_auf() { return array( 'name' => 'AUF', 'version' => '0.3.1', 'author' => 'Jean Christophe André', 'license' => 'GPLv2+', 'homepage' => 'http://git.auf.org/?p=auf-serveur.git;a=tree;f=glpi-plugin-auf', 'minGlpiVersion' => '0.84');// For compatibility / no install in version < 0.80 } // Optional : check prerequisites before install : may print errors or add to message after redirect function plugin_auf_check_prerequisites() { if (version_compare(GLPI_VERSION,'0.84','lt') || version_compare(GLPI_VERSION,'0.85','ge')) { echo 'This plugin requires GLPI >= 0.84 and GLPI < 0.85'; return FALSE; } return TRUE; } // Uninstall process for plugin : need to return true if succeeded ; // may display messages or add to message after redirect function plugin_auf_check_config() { return TRUE; } function plugin_auf_haveRight($module,$right) { return TRUE; } ?>