source: extensions/Register_FluxBB/trunk/maintain.inc.php @ 4285

Last change on this file since 4285 was 4285, checked in by Eric, 14 years ago

[Register_FluxBB]

  • 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
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 = '
19INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
20VALUES ("Register_FluxBB","FluxBB_;PhpWebGallery;Guest;false;false;true","Parametres Register_FluxBB")
21;';
22   
23  pwg_query($q);
24 
25  $q = "
26CREATE 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',
29PRIMARY 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 = '
50DELETE FROM '.CONFIG_TABLE.'
51WHERE 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.