mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:28:55 +00:00
Add confirmation stuff here ... save time elsehwere ... MSAccess note yet updated
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4104 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6636b1817d
commit
ed318a39d6
6 changed files with 95 additions and 10 deletions
|
@ -48,6 +48,15 @@ CREATE TABLE [phpbb_config] (
|
|||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
CREATE TABLE [phpbb_confirm] (
|
||||
[confirm_id] [char] (32) NOT NULL ,
|
||||
[session_id] [char] (32) NOT NULL ,
|
||||
[code] [char] (6) NOT NULL ,
|
||||
[time] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_disallow] (
|
||||
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[disallow_username] [varchar] (100) NULL
|
||||
|
@ -401,6 +410,13 @@ ALTER TABLE [phpbb_categories] WITH NOCHECK ADD
|
|||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[session_id,confirm_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
|
@ -553,6 +569,13 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
|
|||
CONSTRAINT [DF_phpbb_forums_auth_attachments] DEFAULT (0) FOR [auth_attachments]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_confirm_confirm_id] DEFAULT ('') FOR [confirm_id],
|
||||
CONSTRAINT [DF_phpbb_confirm_session_id] DEFAULT ('') FOR [session_id],
|
||||
CONSTRAINT [DF_phpbb_confirm_code] DEFAULT ('') FOR [code],
|
||||
CONSTRAINT [DF_phpbb_confirm_time] DEFAULT (0) FOR [time]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_posts_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||
CONSTRAINT [DF_phpbb_posts_enable_html] DEFAULT (0) FOR [enable_html],
|
||||
|
|
|
@ -93,14 +93,15 @@ CREATE TABLE phpbb_config (
|
|||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table `phpbb_confirm`
|
||||
# Table structure for table 'phpbb_confirm'
|
||||
#
|
||||
CREATE TABLE phpbb_confirm (
|
||||
confirm_id char(32) NOT NULL default '',
|
||||
session_id char(32) NOT NULL default '',
|
||||
code char(6) NOT NULL default '',
|
||||
confirm_id char(32) DEFAULT '' NOT NULL,
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
code char(6) DEFAULT '' NOT NULL,
|
||||
time int(11) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (session_id,confirm_id),
|
||||
KEY session_id (session_id)
|
||||
KEY time (time)
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -33,16 +33,29 @@ CREATE TABLE phpbb_auth_access (
|
|||
auth_reply int2 DEFAULT '0' NOT NULL,
|
||||
auth_edit int2 DEFAULT '0' NOT NULL,
|
||||
auth_delete int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_sticky int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_vote int2 DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate int2 DEFAULT '0' NOT NULL,
|
||||
auth_attachments int2 DEFAULT '0' NOT NULL,
|
||||
auth_vote int2 DEFAULT '0' NOT NULL,
|
||||
auth_mod int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id, forum_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_confirm
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_confirm (
|
||||
confirm_id char(32) DEFAULT '' NOT NULL,
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
code char(6) DEFAULT '' NOT NULL,
|
||||
time int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id)
|
||||
);
|
||||
CREATE INDEX time_phpbb_confirm_index ON phpbb_confirm (time);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_groups
|
||||
-------------------------------------------------------- */
|
||||
|
|
|
@ -496,6 +496,33 @@ switch ($row['config_value'])
|
|||
CONSTRAINT [DF_" . POSTS_TABLE . "_post_edit_count] DEFAULT (0) FOR [post_edit_count]";
|
||||
break;
|
||||
}
|
||||
|
||||
// Add tables for visual confirmation ... saves me the trouble of writing a seperate
|
||||
// script :D
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = 'CREATE TABLE ' . $table_prefix . 'confirm (confirm_id char(32) DEFAULT \'\' NOT NULL, session_id char(32) DEFAULT \'\' NOT NULL, code char(6) DEFAULT \'\' NOT NULL, time int(11) DEFAULT \'0\' NOT NULL, PRIMARY KEY (session_id, confirm_id), KEY time (time))';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$sql[] = 'CREATE TABLE [' . $table_prefix . 'confirm] ([confirm_id] [char] (32) NOT NULL , [session_id] [char] (32) NOT NULL , [code] [char] (6) NOT NULL , [time] [int] NOT NULL ) ON [PRIMARY]';
|
||||
$sql[] = 'ALTER TABLE [' . $table_prefix . 'confirm] WITH NOCHECK ADD CONSTRAINT [PK_' . $table_prefix . 'confirm] PRIMARY KEY CLUSTERED ( [session_id,confirm_id]) ON [PRIMARY]';
|
||||
$sql[] = 'ALTER TABLE [' . $table_prefix . 'confirm] WITH NOCHECK ADD CONSTRAINT [DF_' . $table_prefix . 'confirm_confirm_id] DEFAULT (\'\') FOR [confirm_id], CONSTRAINT [DF_' . $table_prefix . 'confirm_session_id] DEFAULT (\'\') FOR [session_id], CONSTRAINT [DF_' . $table_prefix . 'confirm_code] DEFAULT (\'\') FOR [code], CONSTRAINT [DF_' . $table_prefix . 'confirm_time] DEFAULT (0) FOR [time]';
|
||||
break;
|
||||
|
||||
case 'msaccess':
|
||||
// TODO
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql[] = 'CREATE TABLE ' . $table_prefix . 'confirm (confirm_id char(32) DEFAULT \'\' NOT NULL, session_id char(32) DEFAULT \'\' NOT NULL, code char(6) DEFAULT \'\' NOT NULL, time int2 DEFAULT \'0\' NOT NULL, CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id))';
|
||||
$sql[] = 'CREATE INDEX time_' . $table_prefix . 'confirm_index ON ' . $table_prefix . 'confirm (time)';
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<h2>Updating database schema</h2>\n";
|
||||
|
@ -850,11 +877,18 @@ switch ($row['config_value'])
|
|||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
case '.0.4':
|
||||
|
||||
// Add the confirmation code switch ... save time and trouble elsewhere
|
||||
$sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('enable_confirm', '0')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
echo " No updates where required</b></p>\n";
|
||||
break;
|
||||
default:
|
||||
echo " No updates where required</b></p>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<h2>Updating version and optimizing tables</h2>\n";
|
||||
|
|
|
@ -331,6 +331,9 @@ $lang['Cookie_secure'] = 'Cookie secure';
|
|||
$lang['Cookie_secure_explain'] = 'If your server is running via SSL, set this to enabled, else leave as disabled';
|
||||
$lang['Session_length'] = 'Session length [ seconds ]';
|
||||
|
||||
// Visual Confirmation
|
||||
$lang['Visual_confirm'] = 'Enable Visual Confirmation';
|
||||
$lang['Visual_confirm_explain'] = 'Requires users enter a code defined by an image when registering.';
|
||||
|
||||
//
|
||||
// Forum Management
|
||||
|
|
|
@ -658,6 +658,17 @@ $lang['Empty_subject_email'] = 'You must specify a subject for the e-mail.';
|
|||
$lang['Empty_message_email'] = 'You must enter a message to be e-mailed.';
|
||||
|
||||
|
||||
//
|
||||
// Visual confirmation system strings
|
||||
//
|
||||
$lang['Confirm_code_wrong'] = 'The confirmation code you entered was incorrect';
|
||||
$lang['Too_many_registers'] = 'You have exceeded the number of registration attempts for this session. Please try again later.';
|
||||
$lang['Confirm_code_impaired'] = 'If you are visually impaired or cannot otherwise read this code please contact the %sAdministrator%s for help.';
|
||||
$lang['Confirm_code'] = 'Confirmation code';
|
||||
$lang['Confirm_code_explain'] = 'Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.';
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Memberslist
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue