function merci_inventory_uninstall in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Same name and namespace in other branches
- 6.2 modules/merci_inventory/merci_inventory.install \merci_inventory_uninstall()
- 7.3 merci_inventory/merci_inventory.install \merci_inventory_uninstall()
- 7.2 modules/merci_inventory/merci_inventory.install \merci_inventory_uninstall()
Implementation of hook_uninstall().
File
- modules/
merci_inventory/ merci_inventory.install, line 27
Code
function merci_inventory_uninstall() {
// delete any merci_inventory_master nodes... even though there really shouldn't be any
$result = db_query("SELECT nid FROM {node} WHERE type = 'merci_inventory_master'");
while ($node = db_fetch_object($result)) {
node_delete($node->nid);
}
// delete CCK content_types
$return = node_type_delete('merci_inventory_master');
drupal_set_message(t('MERCI Inventory module successfully uninstalled. merci_inventory_master content type and nodes deleted.'));
}