[5550] | 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 !! |
---|
[6106] | 9 | include_once('gpc_install.class.inc.php'); // => Don't forget to update this file !! |
---|
[5550] | 10 | |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | function plugin_install($plugin_id, $plugin_version, &$errors) |
---|
| 14 | { |
---|
[6106] | 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); |
---|
[5550] | 24 | } |
---|
| 25 | |
---|
| 26 | function plugin_activate($plugin_id, $plugin_version, &$errors) |
---|
| 27 | { |
---|
[6975] | 28 | global $prefixeTable; |
---|
| 29 | |
---|
[6902] | 30 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
| 31 | $result=$obj->activate(); |
---|
| 32 | if(!$result) |
---|
| 33 | { |
---|
| 34 | array_push($errors, "error"); |
---|
| 35 | } |
---|
| 36 | unset($obj); |
---|
[5550] | 37 | } |
---|
| 38 | |
---|
| 39 | function plugin_deactivate($plugin_id) |
---|
| 40 | { |
---|
[6975] | 41 | global $prefixeTable; |
---|
| 42 | |
---|
| 43 | $obj = new GPC_Install($prefixeTable, __FILE__); |
---|
| 44 | $result=$obj->deactivate(); |
---|
[5550] | 45 | } |
---|
| 46 | |
---|
| 47 | function plugin_uninstall($plugin_id) |
---|
| 48 | { |
---|
[6106] | 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); |
---|
[5550] | 61 | } |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | ?> |
---|