function _biblio_get_auth_types in Bibliography Module 7
Same name and namespace in other branches
- 6.2 biblio.module \_biblio_get_auth_types()
- 6 biblio.module \_biblio_get_auth_types()
- 7.2 biblio.module \_biblio_get_auth_types()
1 call to _biblio_get_auth_types()
File
- ./
biblio.module, line 11 - Bibliography Module for Drupal.
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.
$result = isset($auth_types[$auth_category][$biblio_type]) ? $auth_types[$auth_category][$biblio_type] : $auth_types[$auth_category][0];
return $result;
}