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
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

infernix - May 2, 2008 - 16:39
Title:Conflict with Download_counter» Conflict with download_count
Assigned to:Anonymous» infernix
Status:active» needs review

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 line

And it's fixed.

#2

starbow - July 21, 2009 - 21:22
Status:needs review» closed
 
 

Drupal is a registered trademark of Dries Buytaert.