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

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

Migration from version 3.1.0 to 3.2.0 implemented

  • Property svn:executable set to *
File size: 1.3 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  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
39function plugin_deactivate($plugin_id)
40{
41  global $prefixeTable;
42
43  $obj = new GPC_Install($prefixeTable, __FILE__);
44  $result=$obj->deactivate();
45}
46
47function 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?>
Note: See TracBrowser for help on using the repository browser.