From aecee4b3684053a65ba22b433b1a5effb0676a4f Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 10 Apr 2019 20:32:13 +0200 Subject: [PATCH] Only do posting timeout check when creating a topic or post. --- public/forum/posting.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/forum/posting.php b/public/forum/posting.php index 52fd945e..ce3d2a9e 100644 --- a/public/forum/posting.php +++ b/public/forum/posting.php @@ -135,11 +135,14 @@ if (!empty($_POST)) { $notices[] = 'Could not verify request.'; } else { $isEditingTopic = empty($topic) || ($mode === 'edit' && $post['is_opening_post']); - $timeoutCheck = max(1, forum_timeout($forumId, user_session_current('user_id'))); - if ($timeoutCheck < 5) { - $notices[] = sprintf("You're posting too quickly! Please wait %s seconds before posting again.", number_format($timeoutCheck)); - $notices[] = "It's possible that your post went through successfully and you pressed the submit button twice by accident."; + if ($mode === 'create') { + $timeoutCheck = max(1, forum_timeout($forumId, user_session_current('user_id'))); + + if ($timeoutCheck < 5) { + $notices[] = sprintf("You're posting too quickly! Please wait %s seconds before posting again.", number_format($timeoutCheck)); + $notices[] = "It's possible that your post went through successfully and you pressed the submit button twice by accident."; + } } if ($isEditingTopic) {