mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
git-svn-id: file:///svn/phpbb/trunk@6448 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
0f0d160ded
commit
7777bd5f50
1 changed files with 24 additions and 15 deletions
|
@ -523,6 +523,8 @@ if ($load && $post_data['drafts'])
|
|||
load_drafts($topic_id, $forum_id);
|
||||
}
|
||||
|
||||
$solved_captcha = false;
|
||||
|
||||
if ($submit || $preview || $refresh)
|
||||
{
|
||||
$post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0);
|
||||
|
@ -718,6 +720,10 @@ if ($submit || $preview || $refresh)
|
|||
{
|
||||
$error[] = $user->lang['CONFIRM_CODE_WRONG'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$solved_captcha = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Parse subject
|
||||
|
@ -1125,6 +1131,8 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && ($mode ==
|
|||
$db->sql_query($sql);
|
||||
|
||||
// Generate code
|
||||
if ($solved_captcha === false)
|
||||
{
|
||||
$code = gen_rand_string(mt_rand(5, 8));
|
||||
$confirm_id = md5(unique_id($user->ip));
|
||||
|
||||
|
@ -1143,6 +1151,7 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && ($mode ==
|
|||
'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlentities($config['board_contact']) . '">', '</a>'),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
$s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : '';
|
||||
$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
|
||||
|
|
Loading…
Add table
Reference in a new issue