Closed (fixed)
Project:
Private Upload
Version:
5.x-1.0-beta6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Apr 2008 at 01:24 UTC
Updated:
21 Jul 2009 at 21:22 UTC
Hi,
When using the download_counter module together with Private Upload, the URL for file attachments loses the '/system' part, effectively linking the user directly to the (inaccessible) private path:
http://website.tld/files/private/filename.ext
Instead it should link to http://website.tld/system/files/private/filename.ext. I had a quick look at the download_counter code but couldn't find out why this is happening.
Any help would be greatly appreciated.
Thanks!
Comments
Comment #1
infernix commentedI found a solution.
In download_count, edit download_count.module.
In the function theme_download_count_body, find:
$href = $file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path()));change this to:
$href = _private_upload_create_url($file); // this is the changed lineAnd it's fixed.
Comment #2
starbow commented