Delete variables when uninstalling Mollom
Gurpartap Singh - June 15, 2008 - 21:22
| Project: | Mollom |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Gurpartap Singh |
| Status: | closed |
Description
| Attachment | Size |
|---|---|
| mollom_hook_uninstall.patch | 549 bytes |

#1
Nice, yeah, this is definitely needed.
I'm personally a little paranoid about wildcard variable deletion; it really doesn't take a whole lot for another module's variables to accidentally get deleted by code like this.... The attached version uses "mollom_%" rather than "mollom%" (which gives a bit more protection but not much).
A safer way would be to explicitly delete only the variables defined by this module, and use node_get_types() here -- as well as hook_node_type() in the main module -- to deal with cleaning up the variables whose names depend on the node type names. That would be both cleaner and safer... whether it's really worth the effort I'm not sure ;)
#2
Oops, here's the attachment.
#3
And here it is for real. Firefox 3 is having some serious issues with drupal.org today...
#4
This is unbelievable... The file shows up in the preview comment but not in the final post. Looks like I might be filing a bug report after this ;)
#5
Committed to DRUPAL-6. I've also backported the change to DRUPAL-5. Thanks all.
#6
#7
Automatically closed -- issue fixed for two weeks with no activity.