From b304e7f770de1290624bf776da05f2886a16ecf5 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 13 Feb 2007 05:25:45 +0000 Subject: [PATCH] Merged from 1.7. --- mod/forum/post.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/forum/post.php b/mod/forum/post.php index 6e53f6da34..1ef1150333 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -673,9 +673,11 @@ error("You cannot start a new discussion in this forum"); } - if ($forum->type == 'qanda' && !has_capability('mod/forum:viewqandawithoutposting', $modcontext) && - !forum_user_has_posted($forum->id, $discussion->id, $USER->id)) { - notify(get_string('qandanotify', 'forum')); + if ($forum->type == 'qanda' + && !has_capability('mod/forum:viewqandawithoutposting', $modcontext) + && !empty($discussion->id) + && !forum_user_has_posted($forum->id, $discussion->id, $USER->id)) { + notify(get_string('qandanotify','forum')); } forum_check_throttling($forum); -- 2.39.5