function xmlsitemap_menu_uninstall in XML sitemap 5.2
Same name and namespace in other branches
- 6.2 xmlsitemap_menu/xmlsitemap_menu.install \xmlsitemap_menu_uninstall()
- 7.2 xmlsitemap_menu/xmlsitemap_menu.install \xmlsitemap_menu_uninstall()
Implementation of hook_uninstall().
File
- xmlsitemap_menu/
xmlsitemap_menu.install, line 79 - Install file for XML sitemap menu
Code
function xmlsitemap_menu_uninstall() {
$xid = db_result(db_query("SELECT mid FROM {menu} WHERE pid = 0 AND title = '%s'", t('XML sitemap')));
if ($xid !== FALSE) {
db_query('DELETE FROM {menu} WHERE pid = %d', $xid);
db_query('DELETE FROM {menu} WHERE mid = %d', $xid);
menu_rebuild();
}
db_query("DELETE FROM {variable} WHERE name LIKE 'xmlsitemap\\_menu\\_%'");
}