summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-30 13:32:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-30 13:32:51 +0000
commit6eee9dbf88de71b28cc78f3b4003f54f04795e04 (patch)
treede8eaaea0133031f6e99a9660c64e96d41b9ef42 /app
parent0819f00380f11577497ca77f7086ed3046721305 (diff)
downloadredmine-6eee9dbf88de71b28cc78f3b4003f54f04795e04.tar.gz
redmine-6eee9dbf88de71b28cc78f3b4003f54f04795e04.zip
Increment project files downloads.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2209 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/attachments_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 2851f91a6..c10834c11 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -35,7 +35,9 @@ class AttachmentsController < ApplicationController
end
def download
- @attachment.increment_download if @attachment.container.is_a?(Version)
+ if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
+ @attachment.increment_download
+ end
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),