Conflict with download_count
infernix - April 22, 2008 - 01:24
| Project: | Private Upload |
| Version: | 5.x-1.0-beta6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | infernix |
| Status: | closed |
Jump to:
Description
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!

#1
I 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.
#2