Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The hook_file_download implementation in photo.inc is currently broken. The function receives a file URI, which needs to be mapped to a database record to check file ID and return file download information.
Comment | File | Size | Author |
---|---|---|---|
#1 | fbsmp_photo_file_download-errors-2344595-1.patch | 817 bytes | thirdender |
Comments
Comment #1
thirdender CreditAttribution: thirdender commentedPatch attached. I didn't realize the old version of the file used
db_query
and I accidentally wrote a fix usingdb_select
. I realizedb_query
is used extensively in the rest of the code, so let me know if I should re-roll the code to use that function instead.Comment #2
IceCreamYou CreditAttribution: IceCreamYou commentedThe top of the Dynamic queries page in the documentation explains when to use db_query vs db_select. Either is fine here.
Comment #4
IceCreamYou CreditAttribution: IceCreamYou commentedCommitted to dev. Thanks.