Provide uninstall to remove variables

Dave Reid - October 9, 2008 - 07:54
Project:Sphere
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

The Sphere module needs to provide a sphere.install file, with the hook_uninstall function to remove it's variable 'sphere_node_types'

<?php
/**
* Implementation of hook_uninstall().
*/
function sphere_uninstall() {
 
variable_del('sphere_node_types');
}
?>

You can do this for the 5.x-1.x-dev version as well. It's always courteous to make sure your module cleans up after itself.

 
 

Drupal is a registered trademark of Dries Buytaert.