changeset 961:5251072c02b6 feature_523

Merge from branch cannam
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 16 Oct 2012 16:27:43 +0100
parents c09e40c4a410 (current diff) 910830dc222a (diff)
children f8985bd5d0d6 3c5858c5794d
files
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controllers/attachments_controller.rb	Tue Oct 16 16:27:29 2012 +0100
+++ b/app/controllers/attachments_controller.rb	Tue Oct 16 16:27:43 2012 +0100
@@ -49,9 +49,9 @@
   end
 
   def download
-    if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
-      @attachment.increment_download
-    end
+    # cc: formerly this happened only if "@attachment.container.is_a?(Version)"
+    # or Project. Not good for us, we want to tally all downloads
+    @attachment.increment_download
 
     # images are sent inline
     send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),