Closed (fixed)
Project:
Ubercart
Version:
7.x-3.3
Component:
File downloads
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2013 at 03:02 UTC
Updated:
4 Mar 2013 at 06:50 UTC
According to uc_file_api.php, the name of the hook is hook_uc_file_transfer_alter(), but it's never called. Instead, in file uc_file_pages.inc, we have at line 311:
// Check if any hook_file_transfer_alter calls alter the download.
foreach (module_implements('file_transfer_alter') as $module) {
$name = $module . '_file_transfer_alter';
$file_user->full_path = $name($file_user, $ip, $file_user->fid, $file_user->full_path);
}
Should be
// Check if any hook_uc_file_transfer_alter calls alter the download.
foreach (module_implements('uc_file_transfer_alter') as $module) {
$name = $module . '_uc_file_transfer_alter';
$file_user->full_path = $name($file_user, $ip, $file_user->fid, $file_user->full_path);
}
Comments
Comment #1
tr commentedAll the Ubercart hooks were renamed from hook_xxx() in D6 to hook_uc_xxx() in D7. While the documentation for this one was changed, it looks like the actual hook invocation never was. Thanks for catching that. I committed the fix.