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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thirdender’s picture

Patch attached. I didn't realize the old version of the file used db_query and I accidentally wrote a fix using db_select. I realize db_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.

IceCreamYou’s picture

The top of the Dynamic queries page in the documentation explains when to use db_query vs db_select. Either is fine here.

  • IceCreamYou committed 038e87e on 7.x-1.x
    Issue #2344595 by thirdender: fbsmp_photo_file_download Errors
    
IceCreamYou’s picture

Status: Active » Fixed

Committed to dev. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.