function _biblio_get_auth_types in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 biblio.module \_biblio_get_auth_types()
- 6 biblio.module \_biblio_get_auth_types()
- 7 biblio.module \_biblio_get_auth_types()
1 call to _biblio_get_auth_types()
File
- ./
biblio.module, line 24
Code
function _biblio_get_auth_types($auth_category, $biblio_type) {
static $auth_types = array();
if (empty($auth_types)) {
$db_res = db_query("SELECT * FROM {biblio_contributor_type}");
foreach ($db_res as $row) {
$auth_types[$row->auth_category][$row->biblio_type][] = $row->auth_type;
}
}
// fall back to defaults, if no author types are defined for this biblio_type
// todo: this is throwing errors in the log. fix it. supressing errors for now...
$result = isset($auth_types[$auth_category][$biblio_type]) ? $auth_types[$auth_category][$biblio_type] : @$auth_types[$auth_category][0];
return $result;
}