Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Currently, many of our modules have no .install file, yet they set Druapl system variables that would get left behind in the database if the module were disabled/removed. Adding this function to an existing .install file, or creating a blank .install file with just this function will remedy this. If the .install file already has a hook_uninstall() function, check the code to make sure it does something similar to this funciton to clean up its variables.

{{
<?php

function modulename_uninstall() {
$vars = db_query("select * from

Unknown macro: {variable}

where name like 'modulename%'");
while ($var = db_fetch_object($vars))

Unknown macro: { variable_del($var->name); }

}
}}

  • No labels