]> source.dussan.org Git - redmine.git/commitdiff
Merged r4177 from trunk.
authorEric Davis <edavis@littlestreamsoftware.com>
Sun, 26 Sep 2010 22:33:06 +0000 (22:33 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sun, 26 Sep 2010 22:33:06 +0000 (22:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4198 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/files_controller.rb

index fe5eb48c8b4a4d3fc305177a5ac59ca71a2e7c7e..7868d0ddfb5c62e322db193604a0e718f60cf758 100644 (file)
@@ -26,7 +26,7 @@ class FilesController < ApplicationController
       attachments = Attachment.attach_files(container, params[:attachments])
       render_attachment_warning_if_needed(container)
 
-      if !attachments.empty? && Setting.notified_events.include?('file_added')
+      if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
         Mailer.deliver_attachments_added(attachments[:files])
       end
       redirect_to :controller => 'files', :action => 'index', :id => @project