Feature #2852 » redmine-0.8.3-strip_quoted_top_and_bottom.patch
redmine-0.8.3/app/models/mail_handler.rb 2009-04-26 00:18:37.000000000 -0400 | ||
---|---|---|
126 | 126 |
raise UnauthorizedAction unless user.allowed_to?(:add_issue_notes, issue.project) || user.allowed_to?(:edit_issues, issue.project) |
127 | 127 |
raise UnauthorizedAction unless status.nil? || user.allowed_to?(:edit_issues, issue.project) |
128 | 128 | |
129 |
# strip quoted text |
|
130 |
note_details = plain_text_body |
|
131 |
regexp = /^(\>|:|\|)*\s*----- REPLY ABOVE THIS LINE$(.*?)^(\>|:|\|)*\s*----- REPLY BELOW THIS LINE$/m |
|
132 |
if regexp =~ note_details |
|
133 |
note_details = $` + $' |
|
134 |
end |
|
129 | 135 |
# add the note |
130 |
journal = issue.init_journal(user, plain_text_body)
|
|
136 |
journal = issue.init_journal(user, note_details)
|
|
131 | 137 |
add_attachments(issue) |
132 | 138 |
# check workflow |
133 | 139 |
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 | ||
---|---|---|
25 | 25 |
</style> |
26 | 26 |
</head> |
27 | 27 |
<body> |
28 |
----- REPLY ABOVE THIS LINE<br /> |
|
28 | 29 |
<%= yield %> |
29 | 30 |
<hr /> |
30 | 31 |
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer) %></span> |
32 |
----- REPLY BELOW THIS LINE<br /> |
|
31 | 33 |
</body> |
32 | 34 |
</html> |
redmine-0.8.3/app/views/mailer/layout.text.plain.rhtml 2009-04-26 00:40:24.000000000 -0400 | ||
---|---|---|
1 |
----- REPLY ABOVE THIS LINE |
|
1 | 2 |
<%= yield %> |
2 | 3 |
-- |
3 | 4 |
<%= Setting.emails_footer %> |
5 |
----- REPLY BELOW THIS LINE |
- « Previous
- 1
- 2
- Next »