redmine-0.8.3-strip_quoted.patch

James Blanding, 2009-04-19 18:08

Download (2.84 KB)

View differences:

redmine-0.8.3/app/models/mail_handler.rb 2009-04-18 19:27:44.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
    if /^(\>|:|\|)*\s*----- REPLY ABOVE THIS LINE/ =~ note_details
132
      note_details = $`
133
    end
129 134
    # add the note
130
    journal = issue.init_journal(user, plain_text_body)
135
    journal = issue.init_journal(user, note_details)
131 136
    add_attachments(issue)
132 137
    # check workflow
133 138
    if status && issue.new_statuses_allowed_to(user).include?(status)
redmine-0.8.3/app/views/mailer/issue_add.text.html.rhtml 2009-04-19 11:06:21.000000000 -0400
1
----- REPLY ABOVE THIS LINE<br />
1 2
<%= l(:text_issue_added, "##{@issue.id}", @issue.author) %>
2 3
<hr />
3 4
<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %>
redmine-0.8.3/app/views/mailer/issue_add.text.plain.rhtml 2009-04-19 11:06:32.000000000 -0400
1
----- REPLY ABOVE THIS LINE
1 2
<%= l(:text_issue_added, "##{@issue.id}", @issue.author) %>
2 3

  
3 4
----------------------------------------
redmine-0.8.3/app/views/mailer/issue_edit.text.html.rhtml 2009-04-19 11:07:00.000000000 -0400
1
----- REPLY ABOVE THIS LINE<br />
1 2
<%= l(:text_issue_updated, "##{@issue.id}", @journal.user) %>
2 3

  
3 4
<ul>
redmine-0.8.3/app/views/mailer/issue_edit.text.plain.rhtml 2009-04-19 11:07:06.000000000 -0400
1
----- REPLY ABOVE THIS LINE
1 2
<%= l(:text_issue_updated, "##{@issue.id}", @journal.user) %>
2 3

  
3 4
<% for detail in @journal.details -%>