mailhandlerhook.diff

patch file - Jie Ma, 2010-03-10 08:11

Download (923 Bytes)

View differences:

app/models/mail_handler.rb (working copy)
127 127
    end
128 128
    
129 129
    issue = Issue.new(:author => user, :project => project, :tracker => tracker, :category => category, :priority => priority)
130
    Redmine::Hook.call_hook(:model_mail_handler_before_save, { :issue => issue, :mailhandler => self })
130 131
    # check workflow
131 132
    if status && issue.new_statuses_allowed_to(user).include?(status)
132 133
      issue.status = status
......
239 240
    end
240 241
  end
241 242
  
243
  public
242 244
  def get_keyword(attr, options={})
243 245
    @keywords ||= {}
244 246
    if @keywords.has_key?(attr)
......
254 256
    end
255 257
  end
256 258
  
259
  private
257 260
  # Returns the text/plain part of the email
258 261
  # If not found (eg. HTML-only email), returns the body with tags removed
259 262
  def plain_text_body