]> source.dussan.org Git - redmine.git/commitdiff
Ported r1009 from 0.6-stable branch.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 18 Dec 2007 19:07:54 +0000 (19:07 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 18 Dec 2007 19:07:54 +0000 (19:07 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1013 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb

index 84203a34d00b374862c1ed8aefd8c81cfcb9a69a..a58eef7194ebdcf4459bbc07b2bac080cea31cd1 100644 (file)
@@ -311,7 +311,7 @@ class ProjectsController < ApplicationController
   def add_file
     if request.post?
       @version = @project.versions.find_by_id(params[:version_id])
-      attachments = attach_files(@issue, params[:attachments])
+      attachments = attach_files(@version, params[:attachments])
       Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
       redirect_to :controller => 'projects', :action => 'list_files', :id => @project
     end