Mercurial > hg > soundsoftware-site
comparison app/controllers/files_controller.rb @ 51:371eac10df0b live
* Merge from "cannam" branch. This includes update to Redmine trunk, plus welcome/tip-of-the-day from luisf branch.
author | Chris Cannam |
---|---|
date | Wed, 24 Nov 2010 12:20:08 +0000 |
parents | 94944d00e43c |
children | 0c9da2b87ad6 cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
34:09b1d4349da3 | 51:371eac10df0b |
---|---|
26 def create | 26 def create |
27 container = (params[:version_id].blank? ? @project : @project.versions.find_by_id(params[:version_id])) | 27 container = (params[:version_id].blank? ? @project : @project.versions.find_by_id(params[:version_id])) |
28 attachments = Attachment.attach_files(container, params[:attachments]) | 28 attachments = Attachment.attach_files(container, params[:attachments]) |
29 render_attachment_warning_if_needed(container) | 29 render_attachment_warning_if_needed(container) |
30 | 30 |
31 if !attachments.empty? && Setting.notified_events.include?('file_added') | 31 if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added') |
32 Mailer.deliver_attachments_added(attachments[:files]) | 32 Mailer.deliver_attachments_added(attachments[:files]) |
33 end | 33 end |
34 redirect_to project_files_path(@project) | 34 redirect_to project_files_path(@project) |
35 end | 35 end |
36 end | 36 end |