function _reset_bibtex_map in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/bibtexParse/biblio_bibtex.install \_reset_bibtex_map()
- 7.2 modules/bibtexParse/biblio_bibtex.install \_reset_bibtex_map()
1 call to _reset_bibtex_map()
- biblio_bibtex_bibtex_map_reset in modules/
bibtexParse/ biblio_bibtex.module
File
- modules/
bibtexParse/ biblio_bibtex.install, line 148 - Database table creation for biblio_bibtex module.
Code
function _reset_bibtex_map($type) {
$count = db_result(db_query("SELECT COUNT(*) FROM {biblio_type_maps} WHERE format='bibtex'"));
if ($count && $type) {
//update
$function = '_get_bibtex_' . $type;
if (!function_exists($function)) {
return;
}
$map = $function();
drupal_write_record('biblio_type_maps', $map, 'format');
}
else {
// install
db_query("DELETE FROM {biblio_type_maps} WHERE format='bibtex'");
_save_bibtex_maps();
}
}