]> source.dussan.org Git - redmine.git/commitdiff
Increment project files downloads.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 30 Dec 2008 13:32:51 +0000 (13:32 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 30 Dec 2008 13:32:51 +0000 (13:32 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2209 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/attachments_controller.rb

index 2851f91a6da17538c8fd4bc3fc430a1b756e1fe7..c10834c1124c13a0208944277af2c89f755c57ba 100644 (file)
@@ -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),