Project

General

Profile

Feature #2852 » redmine-0.8.3-strip_quoted_top_and_bottom.patch

James Blanding, 2009-04-26 06:45

View differences:

redmine-0.8.3/app/models/mail_handler.rb 2009-04-26 00:18:37.000000000 -0400
raise UnauthorizedAction unless user.allowed_to?(:add_issue_notes, issue.project) || user.allowed_to?(:edit_issues, issue.project)
raise UnauthorizedAction unless status.nil? || user.allowed_to?(:edit_issues, issue.project)
# strip quoted text
note_details = plain_text_body
regexp = /^(\>|:|\|)*\s*----- REPLY ABOVE THIS LINE$(.*?)^(\>|:|\|)*\s*----- REPLY BELOW THIS LINE$/m
if regexp =~ note_details
note_details = $` + $'
end
# add the note
journal = issue.init_journal(user, plain_text_body)
journal = issue.init_journal(user, note_details)
add_attachments(issue)
# check workflow
if status && issue.new_statuses_allowed_to(user).include?(status)
redmine-0.8.3/app/views/mailer/layout.text.html.rhtml 2009-04-26 00:40:11.000000000 -0400
</style>
</head>
<body>
----- REPLY ABOVE THIS LINE<br />
<%= yield %>
<hr />
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer) %></span>
----- REPLY BELOW THIS LINE<br />
</body>
</html>
redmine-0.8.3/app/views/mailer/layout.text.plain.rhtml 2009-04-26 00:40:24.000000000 -0400
----- REPLY ABOVE THIS LINE
<%= yield %>
--
<%= Setting.emails_footer %>
----- REPLY BELOW THIS LINE
(2-2/2)