function biblio_reset_types in Bibliography Module 7
Same name and namespace in other branches
- 5 biblio.install \biblio_reset_types()
- 6.2 biblio.install \biblio_reset_types()
- 6 biblio.install \biblio_reset_types()
- 7.2 biblio.install \biblio_reset_types()
1 call to biblio_reset_types()
- biblio_admin_types_reset_form_submit in includes/
biblio.admin.inc - _state
File
- ./
biblio.install, line 1426
Code
function biblio_reset_types() {
$result = array();
db_drop_table('biblio_field_type_data');
db_drop_table('biblio_field_type');
db_drop_table('biblio_fields');
db_drop_table('biblio_contributor_type');
db_drop_table('biblio_contributor_type_data');
db_query('DELETE FROM {biblio_types} WHERE tid>999');
db_query('UPDATE {biblio_types} SET visible=1 WHERE visible=0');
$schema = biblio_schema();
db_create_table('biblio_field_type_data', $schema['biblio_field_type_data']);
db_create_table('biblio_field_type', $schema['biblio_field_type']);
db_create_table('biblio_fields', $schema['biblio_fields']);
db_create_table('biblio_contributor_type', $schema['biblio_contributor_type']);
db_create_table('biblio_contributor_type_data', $schema['biblio_contributor_type_data']);
// Reset custom field type id too.
variable_set('biblio_last_ftdid', 100);
// _add_db_field_data_XML();
_add_db_field_data();
_add_custom_field_data();
}