Mercurial > hg > soundsoftware-site
diff app/controllers/attachments_controller.rb @ 957:35782bf2eb58 bug_521
Tally all downloads, not only project/version attachments
author | Chris Cannam |
---|---|
date | Tue, 16 Oct 2012 15:34:00 +0100 |
parents | 5e80956cc792 |
children | 19884e9d5eff |
line wrap: on
line diff
--- a/app/controllers/attachments_controller.rb Tue Oct 16 15:25:22 2012 +0100 +++ b/app/controllers/attachments_controller.rb Tue Oct 16 15:34:00 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),