From 0241003590ccf67a5b148c028080b0d8addefb92 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 13 Nov 2009 17:46:38 +0000 Subject: [PATCH] Fixed: Quoting in forums does not take the subject from the message being quoted (#4215). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3035 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/messages_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 88609738a..7dd0fbec9 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -93,9 +93,11 @@ class MessagesController < ApplicationController def quote user = @message.author text = @message.content + subject = @message.subject.gsub('"', '\"') content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " content << text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" render(:update) { |page| + page << "$('reply_subject').value = \"RE: #{subject}\";" page.<< "$('message_content').value = \"#{content}\";" page.show 'reply' page << "Form.Element.focus('message_content');" -- 2.39.5