Uninstall hook missing
beltofte - January 22, 2009 - 13:40
| Project: | Scheduler |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | uninstall |
Description
The uninstall hook is not implemented in scheduler.install, which means that the databasetables, variables etc. are not cleaned up when uninstalling the module.

#1
You are right. We should have an uninstall procedure.
#2
Here is a patch with the uninstall function. Please review.
#3
Looks good. Two minor points:
(a) why is it necessary to delete the 'scheduler_date_format' variable explicitly, when it would appear that the db_query will delete this anyway?
(b) when the patch was applied I got the message 'stripping trailing CRs from patch'. It worked fine, though.
Jonathan
#4
a) Originally I wanted to delete all variables via
variable_del().b) I diff'ed with eclipse in Windows. I guess you patched with something unixey?
I want to make some changes to this anyways. Larry Garfield pointed out it would be better to track removed node types via
hook_node_type()and remove their configuration variables imediately ('scheduler_NODETYPE'and'scheduler_touch_NODETYPE'). On uninstall only the variables regarding the remaining node types need to be removed (e.g. vianode_get_types()). Sound much better and cleaner to me. I'll try it later today.Thanks for testing.
#5
Committed: http://drupal.org/cvs?commit=199040
#6
Trying to keep 5.x in sync: http://drupal.org/cvs?commit=199044
#7
Automatically closed -- issue fixed for 2 weeks with no activity.