Created
September 13, 2012 10:49
-
-
Save stevesmename/3713541 to your computer and use it in GitHub Desktop.
Drupal 6.x Uninstall method for best removing variables.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hook_uninstall() { | |
// Remove module variables. | |
$result = db_query("SELECT name FROM {variable} WHERE name LIKE 'hook_%'"); | |
while ($var_name = db_result($result)) { | |
variable_del($var_name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment