Commit 6303e1d5 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Send forum post immediately after submission when post delay is zero

parent 2d86fd5b
......@@ -216,6 +216,10 @@ function addpost_submit(Pieform $form, $values) {
),
'id', true
);
$delay = get_config_plugin('interaction', 'forum', 'postdelay');
if (!is_null($delay) && $delay == 0) {
PluginInteractionForum::interaction_forum_new_post(array($postid));
}
$SESSION->add_ok_msg(get_string('addpostsuccess', 'interaction.forum'));
redirect('/interaction/forum/topic.php?id=' . $values['topic'] . '#post' . $postid);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment