Some bugs and code cleanups
thePanz - March 10, 2009 - 22:37
| Project: | Taxonomy Image |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I found some errors in TI module (in logic and code):
- upload directories created/checked more than once
- called taxonomy_image_delete() more than once in a single code flow
- TI cache flushed more than once in a single code flow (like above)
- wrong parameter for t() in external link check ( '@where' => @where)
- wrong (not working) call to file_save_upload(): first parameter must be a file field, "path" given instead
It's a *huge* and deep patch, with a lot of changes.
Please review.
| Attachment | Size |
|---|---|
| cleanup_taxonomy_image_module.patch | 9.41 KB |

#1
Why are you changing form element names?
#2
I'm changing form elements names for better inter-operability with other hook_form() calls: each form element have a "module name" prefix like functions names and variables names.
Is it a wrong idea?
#3
I didn't do that because they were all within the fieldset that already identified them.
#4
You're right, but take the case of an external "validator" function in another module, it will receive, in $form_values, only the form element name, and not the entire form-tree.
What do you think about other changes in my patch?
Regards, and thank you for your replies!
#5
So far the only problem I see is that it says "Image upload failed" when all I do is to delete an image without adding a new one. That problem was probably already there. I fixed it.
#6
Committed. You fixed the upload problem, thanks.
#7
Ok, thank you for committing my changes.
I'll post some other fixes and cleanup later..
#8
Automatically closed -- issue fixed for 2 weeks with no activity.