function content_module_delete in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 includes/content.crud.inc \content_module_delete()
- 6.2 includes/content.crud.inc \content_module_delete()
Delete all data related to a module.
Parameters
string $module:
1 call to content_module_delete()
- content_notify in ./
content.module - Modules notify Content module when uninstalled, disabled, etc.
File
- includes/
content.crud.inc, line 518 - Create/Read/Update/Delete functions for CCK-defined object types.
Code
function content_module_delete($module) {
// Delete the field data.
$results = db_query("SELECT field_name, type_name FROM {" . content_instance_tablename() . "} WHERE widget_module = '%s'", $module);
while ($field = db_fetch_array($results)) {
content_field_instance_delete($field['field_name'], $field['type_name']);
}
// Force the caches and static arrays to update to the new info.
_content_type_info(TRUE, TRUE);
}