Last change
on this file since 9075 was
4288,
checked in by Eric, 15 years ago
|
[Register_FluxBB] Merged frim trunk to branch 2.1
- Using sha1 hash instead of md5 for password hashing in FluxBB because FluxBB uses prior sha1 hash and md5 only in last sentence.
- Escaping all characters in login names and be able to retreive them without slashes - FluxBB does not allow this so Piwigo's user names with escaped characters will not been escaped in FluxBB (ie : "it's" in Piwigo will be "It\'s" in FluxBB)
- Code refactoring
- Full HTML 4.0 for tpl
|
-
Property svn:eol-style set to
LF
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | define('Register_FluxBB_DIR' , basename(dirname(__FILE__))); |
---|
4 | define('Register_FluxBB_PATH' , PHPWG_PLUGINS_PATH . Register_FluxBB_DIR . '/'); |
---|
5 | |
---|
6 | //ini_set('error_reporting', E_ALL); |
---|
7 | //ini_set('display_errors', true); |
---|
8 | |
---|
9 | include_once (PHPWG_ROOT_PATH.'/include/constants.php'); |
---|
10 | include_once (Register_FluxBB_PATH.'include/constants.php'); |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | function 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 | |
---|
38 | function plugin_activate() |
---|
39 | { |
---|
40 | |
---|
41 | } |
---|
42 | |
---|
43 | function 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 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.