Mail notification options restored (default is: issue_added and issue_updated).

Added mail notification when adding a news (disabled by default).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@728 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-09-14 15:30:46 +00:00
parent 1fa1f62018
commit 23264ec3eb
10 changed files with 65 additions and 15 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ class DocumentsController < ApplicationController
a = Attachment.create(:container => @document, :file => file, :author => logged_in_user)
@attachments << a unless a.new_record?
} if params[:attachments] and params[:attachments].is_a? Array
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? #and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? && Setting.notified_events.include?('document_added')
redirect_to :action => 'show', :id => @document
end