]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8629 - Outputting correct messages during redirection after forum posting with...
authornicolasconnault <nicolasconnault>
Thu, 1 Mar 2007 06:01:43 +0000 (06:01 +0000)
committernicolasconnault <nicolasconnault>
Thu, 1 Mar 2007 06:01:43 +0000 (06:01 +0000)
mod/forum/post.php

index b26815d11b6408760d49f0a909e2915acab1703a..5ef4958b57eb844373f41fd76fddd2dedc37e9a7 100644 (file)
                 if (!empty($message)) { // if we're printing stuff about the file upload
                     $timemessage = 4;
                 }
-                $message .= '<br />'.get_string("postadded", "forum", format_time($CFG->maxeditingtime));
-
+                
                 if ($subscribemessage = forum_post_subscription($fromform)) {
                     $timemessage = 4;
                 }
 
-                if (!empty($fromform->mailnow)) {
+                if ($fromform->mailnow) {
                     $message .= get_string("postmailnow", "forum");
                     $timemessage = 4;
+                } else {
+                    $message .= '<br />'.get_string("postadded", "forum", format_time($CFG->maxeditingtime));
                 }
 
                 if ($forum->type == 'single') {
                 if (!empty($message)) { // if we're printing stuff about the file upload
                     $timemessage = 4;
                 }
-                $message .= '<br />'.get_string("postadded", "forum", format_time($CFG->maxeditingtime));
-
+                
                 if ($fromform->mailnow) {
                     $message .= get_string("postmailnow", "forum");
                     $timemessage = 4;
-                }
+                } else {
+                    $message .= '<br />'.get_string("postadded", "forum", format_time($CFG->maxeditingtime));
+                }    
 
                 if ($subscribemessage = forum_post_subscription($discussion)) {
                     $timemessage = 4;