3.12.4. file_retrieve

This hook allows modules to handle the file data retrieval. The hook can use phorum_api_error_set() to return an error. Hooks should be aware that their input might not be $file, but FALSE instead, in which case they should immediately return FALSE themselves.

Call time:

In include/api/file_storage.php, right before a file attachment is retrieved from the database.

Hook input:

Two part array where the first element is an empty file array and the second element is the flags variable.

Hook output:

Same as input with file_data filled in.