1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2024-05-06 18:23:21 +02:00
8 changed files with 193 additions and 3 deletions

View File

@@ -1427,7 +1427,14 @@ if ($submit || $preview || $refresh)
// Store message, sync counters
if (!count($error) && $submit)
{
if ($submit)
/** @var \phpbb\lock\posting $posting_lock */
$posting_lock = $phpbb_container->get('posting.lock');
// Get creation time and form token, must be already checked at this point
$creation_time = abs($request->variable('creation_time', 0));
$form_token = $request->variable('form_token', '');
if ($posting_lock->acquire($creation_time, $form_token))
{
// Lock/Unlock Topic
$change_topic_status = $post_data['topic_status'];
@@ -1618,6 +1625,11 @@ if ($submit || $preview || $refresh)
redirect($redirect_url);
}
else
{
// Posting was already locked before, hence form submission was already attempted once and is now invalid
$error[] = $language->lang('FORM_INVALID');
}
}
}