Download Original Link fix for private download method
| Project: | Lightbox2 |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Did some searches to see if I could find a similar issue/topic but wasn't too sure on what all I had found.
But what I wanted to share is if Drupal is set to Private for file downloads the 'Download Original Image' link on the lightbox frame would still link to the public(sites/xxxxxx/files/blah/blah/blah/etc) file path instead of the private(system/files/blah/blah/blah/etc) file path.
I found that in lightbox2.formatter.inc on line number 187 if you change it to the following it fixes this minor little detail
$node_links[] = l($download_link_text, file_create_url($item['filepath']), array('attributes' => array('target' => '_blank', 'id' => 'download_link_text')));
what i did was simply add the file_create_url() function for $item['filepath'] and now all download original links when drupal is set to private are correct.
Oh and I wasn't sure what category to pick for this so please don't skin me if you feel its wrong :(

#1
Fixed, thanks!
#2
Automatically closed -- issue fixed for 2 weeks with no activity.