Active
Project:
Image Upload
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2010 at 12:46 UTC
Updated:
25 Mar 2010 at 12:46 UTC
When I assign a category term to a particular node type, I expect that only the selected categories will appear when editing a node of that type. This is not the case, all categories still appear for node types where specific categories were selected.
Assuming this is the expected behavior, I believe the following code will fix the problem... although I haven't thoroughly tested it yet.
In... _image_upload_form_get_terms
foreach($terms as $tid => $term_name) {
if(! variable_get('image_upload_category_'. $tid .'_'. $node_type, 0)) {
unset($terms[$tid]);
}
}