Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2005 at 16:13 UTC
Updated:
2 Nov 2005 at 22:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
kuba.zygmunt commentedI added diff patch
Comment #2
dries commentedPlease resubmit without tabs and proper coding conventions. Thanks.
Comment #3
Steven commentedPutting all these tests into separate functions is a bit too much IMO.
Comment #4
kuba.zygmunt commentedOk, I've updated these functions, improved my style and changed a little code which prevents from deleting voc. and terms after changing name to 0.
1.
Changing name to '0' (single number) causes that the condition:
will fail.
2. There was an error in taxonomy_del_term() function which gives error/warning message.
Comment #5
drummAfter deleting a forum (which is internally stored as a term) I get two messages:
* Deleted term fdgfd.
* The forum 0 has been updated.
The forum was named "fdgfd." I think that deleting terms needs to return the same status and name array as the other operations and not call drupal_set_message(). This is needed so modules built on taxonomy such as forum and image can fully override the terminology used. And this also separates the model and controller layers.
This becomes problematic quickly since the delete function is recursive and the return type does not currently have room to store information about multiple deleted terms. I think deleting terms should not be recursive and any child terms should have their parent set to the deleted term's parent. I think this would be easier to code and makes this action more forgiving for users.
Comment #6
drummforgot to change the status
And two small indentation problems:
and
Comment #7
moshe weitzman commentedthe form API renders this patch badly out of date.