Last change
on this file since 4143 was
3742,
checked in by Eric, 15 years ago
|
Working directory - Compatibility improvement with PHP 5.3 - Some old functions will be deprecated.
ereg() was replaced by preg_match()
eregi() was replace by preg_match() with "i" moderator
split() was replace by preg_split()
|
-
Property svn:eol-style set to
LF
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if(!defined("NBC_UserAdvManager_PATH")) |
---|
4 | define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
5 | |
---|
6 | include_once (NBC_UserAdvManager_PATH.'include/constants.php'); |
---|
7 | |
---|
8 | function 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 | |
---|
17 | $q = " |
---|
18 | CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( |
---|
19 | id varchar(50) NOT NULL default '', |
---|
20 | user_id smallint(5) NOT NULL default '0', |
---|
21 | mail_address varchar(255) default NULL, |
---|
22 | status enum('webmaster','admin','normal','generic','guest') default NULL, |
---|
23 | date_check datetime default NULL, |
---|
24 | PRIMARY KEY (id) |
---|
25 | ) |
---|
26 | ;"; |
---|
27 | pwg_query($q); |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | function plugin_uninstall() |
---|
33 | { |
---|
34 | global $conf; |
---|
35 | |
---|
36 | if (isset($conf['nbc_UserAdvManager'])) |
---|
37 | { |
---|
38 | $q = ' |
---|
39 | DELETE FROM '.CONFIG_TABLE.' |
---|
40 | WHERE param="nbc_UserAdvManager" |
---|
41 | ;'; |
---|
42 | |
---|
43 | pwg_query($q); |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | $q = 'DROP TABLE '.USER_CONFIRM_MAIL_TABLE.';'; |
---|
48 | pwg_query( $q ); |
---|
49 | } |
---|
50 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.