diff app/controllers/files_controller.rb @ 41:7f0e922c8982 luisf

merged with new version from trunk
author luisf
date Fri, 19 Nov 2010 14:45:28 +0000
parents 94944d00e43c
children 0c9da2b87ad6 cbce1fd3b1b7
line wrap: on
line diff
--- a/app/controllers/files_controller.rb	Thu Nov 18 17:50:11 2010 +0000
+++ b/app/controllers/files_controller.rb	Fri Nov 19 14:45:28 2010 +0000
@@ -28,7 +28,7 @@
     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 project_files_path(@project)