function nodesymlinks_uninstall in NodeSymlinks 6
Same name and namespace in other branches
- 7 nodesymlinks.install \nodesymlinks_uninstall()
Implementation of hook_uninstall().
File
- ./
nodesymlinks.install, line 23 - Installation functions for NodeSymlinks.
Code
function nodesymlinks_uninstall() {
// Delete the duplicate paths we created.
$result = db_query("SELECT mlid FROM {menu_links} WHERE module = 'nodesymlinks' ");
while ($m = db_fetch_array($result)) {
menu_link_delete($m['mlid']);
}
// Delete the duplicate aliases we created.
db_query("DELETE FROM {url_alias} WHERE src LIKE 'node/%%/mid/%%'");
// Delete our schema
drupal_uninstall_schema('nodesymlinks');
// Delete variables
variable_del('nodesymlinks_node_tokens');
variable_del('nodesymlinks_crumbs_include_home');
variable_del('nodesymlinks_crumbs_lastcrumb');
variable_del('nodesymlinks_check_menuitem');
variable_del('nodesymlinks_node_tokens');
}