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();
15 if ($Plugin->isActivated('auf')) { // check if plugin is active
17 Plugin
::registerClass('PluginAufProfile',
18 array('addtabon'=>array('Profile')));
19 Plugin
::registerClass('PluginAufComputer',
20 array('addtabon'=>array('Computer')));
23 $PLUGIN_HOOKS['change_profile']['auf'] = array('PluginAufProfile', 'changeProfile');
25 $PLUGIN_HOOKS['add_css']['auf'] = "auf.css";
27 // if (Session::getLoginUserID()) {
30 if (isset($_SESSION["glpiname"])) {
31 $report_list = array();
32 if (Session
::haveRight("computer", "r")) {
33 $report_list["rapport.migrationubuntu.php"] = "Progression des mises à niveau Ubuntu";
34 $report_list["rapport.migrationdebian.php"] = "Progression des mises à niveau Debian";
35 $report_list["report.operatingsystems.php"] = "Systèmes d'exploitation par implantation";
36 $report_list["report.computers.php"] = "Nombre de machines par catégorie";
37 // $report_list["report.wip.php"] = 'WIP (rapport en cours de développement)';
39 $PLUGIN_HOOKS['reports']['auf'] = $report_list;
44 // Get the name and the version of the plugin - Needed
45 function plugin_version_auf() {
49 'author' => 'Jean Christophe André',
50 'license' => 'GPLv2+',
51 'homepage' => 'http://git.auf.org/?p=auf-serveur.git;a=tree;f=glpi-plugin-auf',
52 'minGlpiVersion' => '0.84');// For compatibility / no install in version < 0.80
55 // Optional : check prerequisites before install : may print errors or add to message after redirect
56 function plugin_auf_check_prerequisites() {
57 if (version_compare(GLPI_VERSION
,'0.84','lt') ||
version_compare(GLPI_VERSION
,'0.85','ge')) {
58 echo 'This plugin requires GLPI >= 0.84 and GLPI < 0.85';
64 // Uninstall process for plugin : need to return true if succeeded ;
65 // may display messages or add to message after redirect
66 function plugin_auf_check_config() {
70 function plugin_auf_haveRight($module,$right) {