Repository navigation
Expand file tree
/
Copy pathsetup.php
More file actions
67 lines (54 loc) · 1.77 KB
/
Copy pathsetup.php
File metadata and controls
67 lines (54 loc) · 1.77 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
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Initialization function for the 'disableactiontime' plugin
*/
function plugin_init_disableactiontime() {
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['disableactiontime'] = true;
$PLUGIN_HOOKS['add_javascript']['disableactiontime'][] = 'scripts/hideactiontime.js';
}
/**
* Plugin version and information
*/
function plugin_version_disableactiontime() {
return [
'name' => 'Disable ActionTime',
'version' => '1.0.1',
'author' => 'Paulo Lima',
'license' => 'GPLv2+',
'homepage' => 'https://github.com/Gambware',
'minGlpiVersion' => '10.0' // Minimum version of GLPI required for this plugin
];
}
/**
* Check prerequisites before installing the plugin
*/
function plugin_disableactiontime_check_prerequisites() {
if (version_compare(GLPI_VERSION, '10.0', '<')) {
echo "Este plugin requer GLPI versão 10.0 ou superior";
return false;
}
return true;
}
/**
* Installation function for the plugin
*/
function plugin_disableactiontime_install() {
// Aqui você pode adicionar lógica para configurar seu plugin durante a instalação,
// como configurar tabelas de banco de dados ou configurações iniciais.
return true; // Indica que a instalação foi bem sucedida.
}
/**
* Uninstallation function for the plugin
*/
function plugin_disableactiontime_uninstall() {
// Aqui você pode adicionar lógica para limpar a configuração do seu plugin,
// como remover tabelas de banco de dados ou limpar configurações.
return true; // Indica que a desinstalação foi bem sucedida.
}
/**
* Check if the plugin can be uninstalled
*/
function plugin_disableactiontime_check_config() {
return true;
}