Only do posting timeout check when creating a topic or post.
This commit is contained in:
parent
bb9685b85d
commit
aecee4b368
1 changed files with 7 additions and 4 deletions
|
@ -135,11 +135,14 @@ if (!empty($_POST)) {
|
||||||
$notices[] = 'Could not verify request.';
|
$notices[] = 'Could not verify request.';
|
||||||
} else {
|
} else {
|
||||||
$isEditingTopic = empty($topic) || ($mode === 'edit' && $post['is_opening_post']);
|
$isEditingTopic = empty($topic) || ($mode === 'edit' && $post['is_opening_post']);
|
||||||
$timeoutCheck = max(1, forum_timeout($forumId, user_session_current('user_id')));
|
|
||||||
|
|
||||||
if ($timeoutCheck < 5) {
|
if ($mode === 'create') {
|
||||||
$notices[] = sprintf("You're posting too quickly! Please wait %s seconds before posting again.", number_format($timeoutCheck));
|
$timeoutCheck = max(1, forum_timeout($forumId, user_session_current('user_id')));
|
||||||
$notices[] = "It's possible that your post went through successfully and you pressed the submit button twice by accident.";
|
|
||||||
|
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) {
|
if ($isEditingTopic) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue