function _reset_ris_map in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/RIS/biblio_ris.install \_reset_ris_map()
- 7.2 modules/RIS/biblio_ris.install \_reset_ris_map()
1 call to _reset_ris_map()
- biblio_ris_ris_map_reset in modules/
RIS/ biblio_ris.module
File
- modules/
RIS/ biblio_ris.install, line 64 - Database table creation for biblio_ris module.
Code
function _reset_ris_map($type) {
$count = db_result(db_query("SELECT COUNT(*) FROM {biblio_type_maps} WHERE format='ris'"));
if ($count && $type) {
//update
$function = '_get_ris_' . $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='ris'");
_save_ris_maps();
}
}