forked from yllen/reports
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhook.php
More file actions
53 lines (47 loc) · 1.97 KB
/
Copy pathhook.php
File metadata and controls
53 lines (47 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* -------------------------------------------------------------------------
* LICENSE
*
* This file is part of Reports plugin for GLPI.
*
* Reports is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Reports is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Reports. If not, see <http://www.gnu.org/licenses/>.
*
* @authors Nelly Mahu-Lasson, Remi Collet, Alexandre Delaunay, Xavier Caillaud, Infotel
* @copyright Copyright (c) 2009-2026 Reports plugin team
* @license AGPL License 3.0 or (at your option) any later version
* @link https://github.com/InfotelGLPI/reports
* @link http://www.glpi-project.org/
* @package reports
* @since 2009
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
* --------------------------------------------------------------------------
*/
function plugin_reports_install()
{
return true;
}
function plugin_reports_uninstall()
{
// Remove every profile right the plugin dynamically created (name LIKE 'plugin_reports_%'),
// otherwise these lines stay orphaned in glpi_profilerights after uninstall.
(new ProfileRight())->deleteByCriteria(['name' => ['LIKE', 'plugin_reports_%']]);
// Drop the legacy tables inherited from older versions of the plugin, if they still exist.
$migration = new Migration(PLUGIN_REPORTS_VERSION);
foreach (['glpi_plugin_reports_profiles', 'glpi_plugin_reports_oldprofiles'] as $table) {
$migration->dropTable($table);
}
$migration->executeMigration();
return true;
}