source: extensions/NBC_UserAdvManager-Trunk/maintain.inc.php @ 3444

Last change on this file since 3444 was 3444, checked in by Eric, 15 years ago

Preview, sharing and working directory for new plugin version. !! Warning !! For coding only !! This is not a stable release nor a release candidate.

Initial coding version is 2.11.0.x. The next stable release should be committed in NBC_UserAdvManager directory under version 2.11.x.

  • Property svn:eol-style set to LF
File size: 1.3 KB
Line 
1<?php
2
3if(!defined("NBC_UserAdvManager_PATH"))
4  define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
5
6include_once (NBC_UserAdvManager_PATH.'include/constants.php');
7
8function plugin_install()
9{
10  $q = '
11    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
12    VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;","Parametres du plugin nbc UserAdvManager")
13  ;';
14  pwg_query($q);
15
16  $q = '
17    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
18    VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;","Parametres nbc_UserAdvManager - ConfirmMail")
19  ;';
20  pwg_query($q);
21
22        $q = "
23    CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." (
24      id varchar(50) NOT NULL default '',
25      user_id smallint(5) NOT NULL default '0',
26      mail_address varchar(255) default NULL,
27      status enum('webmaster','admin','normal','generic','guest') default NULL,
28      date_check datetime default NULL,
29      PRIMARY KEY  (id)
30    )
31  ;";
32  pwg_query($q);
33}
34
35
36
37function plugin_uninstall()
38{
39  global $conf;
40
41  if (isset($conf['nbc_UserAdvManager']))
42  {
43    $q = '
44      DELETE FROM '.CONFIG_TABLE.'
45      WHERE param="nbc_UserAdvManager"
46    ;';
47
48    pwg_query($q);
49  }
50
51
52  $q = 'DROP TABLE '.USER_CONFIRM_MAIL_TABLE.';';
53  pwg_query( $q );
54}
55?>
Note: See TracBrowser for help on using the repository browser.