MDL-48148 mod_forum: Use correct original subject when handling replies
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 26 Nov 2014 07:58:05 +0000 (15:58 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 26 Nov 2014 07:58:05 +0000 (15:58 +0800)
mod/forum/classes/message/inbound/reply_handler.php

index 90a8045..86d91d5 100644 (file)
@@ -147,7 +147,7 @@ class reply_handler extends \core\message\inbound\handler {
             $newsubject = $post->subject;
             if (!strpos($restring, $post->subject)) {
                 // The previous post did not contain a re string, add it.
             $newsubject = $post->subject;
             if (!strpos($restring, $post->subject)) {
                 // The previous post did not contain a re string, add it.
-                $newsubject = $restring . ' ' . $subject;
+                $newsubject = $restring . ' ' . $newsubject;
             }
             mtrace("--> Note: Post subject matched original post subject. Optimising from {$subject} to {$newsubject}");
             $subject = $newsubject;
             }
             mtrace("--> Note: Post subject matched original post subject. Optimising from {$subject} to {$newsubject}");
             $subject = $newsubject;