1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } |
---|
4 | |
---|
5 | // ini_set('error_reporting', E_ALL); |
---|
6 | // ini_set('display_errors', true); |
---|
7 | |
---|
8 | include_once('gpc_version.inc.php'); // => Don't forget to update this file !! |
---|
9 | include_once('gpc_install.class.inc.php'); // => Don't forget to update this file !! |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | function plugin_install($plugin_id, $plugin_version, &$errors) |
---|
14 | { |
---|
15 | global $prefixeTable; |
---|
16 | |
---|
17 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
18 | $result=$obj->install(); |
---|
19 | if(!$result) |
---|
20 | { |
---|
21 | array_push($errors, "error"); |
---|
22 | } |
---|
23 | unset($obj); |
---|
24 | } |
---|
25 | |
---|
26 | function plugin_activate($plugin_id, $plugin_version, &$errors) |
---|
27 | { |
---|
28 | global $prefixeTable; |
---|
29 | |
---|
30 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
31 | $result=$obj->activate(); |
---|
32 | if(!$result) |
---|
33 | { |
---|
34 | array_push($errors, "error"); |
---|
35 | } |
---|
36 | unset($obj); |
---|
37 | } |
---|
38 | |
---|
39 | function plugin_deactivate($plugin_id) |
---|
40 | { |
---|
41 | global $prefixeTable; |
---|
42 | |
---|
43 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
44 | $result=$obj->deactivate(); |
---|
45 | } |
---|
46 | |
---|
47 | function plugin_uninstall($plugin_id) |
---|
48 | { |
---|
49 | global $prefixeTable; |
---|
50 | |
---|
51 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
52 | $result=$obj->uninstall(); |
---|
53 | /* |
---|
54 | * piwigo don't alllow to manage errors during the uninstall process... |
---|
55 | if(!$result or is_string($result)) |
---|
56 | { |
---|
57 | array_push($errors, l10n($result)); |
---|
58 | } |
---|
59 | */ |
---|
60 | unset($obj); |
---|
61 | } |
---|
62 | |
---|
63 | |
---|
64 | ?> |
---|