Closed (fixed)
Project:
FileField
Version:
5.x-2.3-rc4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 May 2008 at 21:02 UTC
Updated:
31 Jul 2008 at 16:33 UTC
looks like it does, but it actually doesn't receive it in the first place. i need it for audio filefield... here's a patch
| Comment | File | Size | Author |
|---|---|---|---|
| filefield_file_load.patch | 1.27 KB | aaron |
Comments
Comment #1
jpetso commentedHm... hook_file() does not pass any additional info at all for the 'file_load' action. I wonder if it's a good idea to add this when we know it'll be gone soon anyways.
And more questions, just because I'm interested:
- why do you pass $item one time and $node the other time?
- why is there an additional unused $file parameter in the _filefield_file_load() function signature? doesn't that even conflict with $fid being passed?
- if you need $item, wouldn't it make more sense to merge the CCK-provided part of $item first, before invoking the hook?
- how (and which parameters) are you going to use this when it gets in?
I'm setting this back to "code needs work", if not for the other issues then at least because the $file parameter seems odd to me.
Comment #2
dopry commented@aaron, hook_filefield is a prototype of hook_file... Why do you need the field information when saving the file data? how are you using it? I need clarification on the use case... we may need to overload hook_file for field based purposes, or attach the field info to the items if there isn't a work around.
Comment #3
dopry commentedno response and this issue is by design to match hook_file as proposed for core.