Project:Scheduler
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:uninstall

Issue Summary

The uninstall hook is not implemented in scheduler.install, which means that the databasetables, variables etc. are not cleaned up when uninstalling the module.

Comments

#1

You are right. We should have an uninstall procedure.

#2

Status:active» needs review

Here is a patch with the uninstall function. Please review.

AttachmentSize
scheduler_uninstall.patch 705 bytes

#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. via node_get_types()). Sound much better and cleaner to me. I'll try it later today.

Thanks for testing.

#5

Status:needs review» fixed

Committed: http://drupal.org/cvs?commit=199040

#6

Trying to keep 5.x in sync: http://drupal.org/cvs?commit=199044

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here