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

Last change on this file since 6943 was 6902, checked in by grum, 14 years ago

Version 3.2.0
Add process for update from GPC 3.1.0

  • Property svn:executable set to *
File size: 1.1 KB
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  $obj = new GPC_Install($prefixeTable, __FILE__);
29  $result=$obj->activate();
30  if(!$result)
31  {
32    array_push($errors, "error");
33  }
34  unset($obj);
35}
36
37function plugin_deactivate($plugin_id)
38{
39}
40
41function plugin_uninstall($plugin_id)
42{
43  global $prefixeTable;
44
45  $obj = new GPC_Install($prefixeTable, __FILE__);
46  $result=$obj->uninstall();
47  /*
48   * piwigo don't alllow to manage errors during the uninstall process...
49  if(!$result or is_string($result))
50  {
51    array_push($errors, l10n($result));
52  }
53  */
54  unset($obj);
55}
56
57
58?>
Note: See TracBrowser for help on using the repository browser.