]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from 1.7.
authorvyshane <vyshane>
Tue, 13 Feb 2007 05:25:45 +0000 (05:25 +0000)
committervyshane <vyshane>
Tue, 13 Feb 2007 05:25:45 +0000 (05:25 +0000)
mod/forum/post.php

index 6e53f6da348eaf1bb852dc76733b15e13049f272..1ef11503337bbfa0e525f1858dad85bf0fdc40fd 100644 (file)
         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);