function suggestion_uninstall in Autocomplete Search Suggestions 7
Implements hook_uninstall().
File
- ./
suggestion.install, line 99 - The installation file for the suggestion module.
Code
function suggestion_uninstall() {
$uri = variable_get('suggestion_stopword_uri', '');
if ($uri) {
file_unmanaged_delete($uri);
}
$uri = preg_replace('/\\/[^\\/]+$/', '', $uri);
if ($uri) {
drupal_rmdir($uri);
}
$vars = db_query("SELECT name FROM {variable} WHERE name LIKE :name", array(
':name' => 'suggestion\\_%',
))
->fetchCol();
foreach ($vars as $var) {
variable_del($var);
}
cache_clear_all('variables', 'cache_bootstrap');
}