source: extensions/GrumPluginClasses/maintain.inc.php @ 6299

Last change on this file since 6299 was 6106, checked in by grum, 14 years ago

Update plugin with some new functions

  • Property svn:executable set to *
File size: 1004 bytes
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
4
5// ini_set('error_reporting', E_ALL);
6// ini_set('display_errors', true);
7
8include_once('gpc_version.inc.php'); // => Don't forget to update this file !!
9include_once('gpc_install.class.inc.php'); // => Don't forget to update this file !!
10
11
12
13function 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
26function plugin_activate($plugin_id, $plugin_version, &$errors)
27{
28}
29
30function plugin_deactivate($plugin_id)
31{
32}
33
34function plugin_uninstall($plugin_id)
35{
36  global $prefixeTable;
37
38  $obj = new GPC_Install($prefixeTable, __FILE__);
39  $result=$obj->uninstall();
40  /*
41   * piwigo don't alllow to manage errors during the uninstall process...
42  if(!$result or is_string($result))
43  {
44    array_push($errors, l10n($result));
45  }
46  */
47  unset($obj);
48}
49
50
51?>
Note: See TracBrowser for help on using the repository browser.