Increment project files downloads.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2209 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0819f00380
commit
6eee9dbf88
|
@ -35,7 +35,9 @@ class AttachmentsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def download
|
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
|
# images are sent inline
|
||||||
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
||||||
|
|
Loading…
Reference in New Issue