source: extensions/Register_FluxBB/tags/2.1.1/maintain.inc.php @ 3738

Last change on this file since 3738 was 3738, checked in by Eric, 15 years ago
  • Property svn:eol-style set to LF
File size: 1.2 KB
Line 
1<?php
2
3define('Register_FluxBB_DIR' , basename(dirname(__FILE__)));
4define('Register_FluxBB_PATH' , PHPWG_PLUGINS_PATH . Register_FluxBB_DIR . '/');
5
6//ini_set('error_reporting', E_ALL);
7//ini_set('display_errors', true);
8
9include_once (PHPWG_ROOT_PATH.'/include/constants.php');
10include_once (Register_FluxBB_PATH.'include/constants.php');
11
12
13
14function plugin_install()
15{
16  global $prefixeTable;
17
18  $q = '
19    INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
20    VALUES ("Register_FluxBB","FluxBB_;PhpWebGallery;Guest;false;false;true","Parametres Register_FluxBB")
21  ;';
22   
23  pwg_query($q);
24 
25        $q = "
26    CREATE TABLE IF NOT EXISTS ".Register_FluxBB_ID_TABLE." (
27      id_user_pwg smallint(5) NOT NULL default '0',
28      id_user_FluxBB int(10) NOT NULL default '0',
29      PRIMARY KEY  (id_user_pwg),
30      KEY id_user_pwg (id_user_pwg, id_user_FluxBB)
31    )
32  ;";
33
34  pwg_query($q);
35
36}
37
38function plugin_activate()
39{
40
41}
42
43function plugin_uninstall()
44{
45  global $conf;
46
47  if (isset($conf['Register_FluxBB']))
48  {
49    $q = '
50      DELETE FROM '.CONFIG_TABLE.'
51      WHERE param="Register_FluxBB" LIMIT 1
52    ;';
53
54    pwg_query($q);
55  }
56 
57  $q = 'DROP TABLE '.Register_FluxBB_ID_TABLE.';';
58  pwg_query( $q );
59
60}
61
62?>
Note: See TracBrowser for help on using the repository browser.