function biblio_get_contributor_by_name in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/biblio.contributors.inc \biblio_get_contributor_by_name()
- 6 biblio.contributors.inc \biblio_get_contributor_by_name()
- 7.2 biblio.module \biblio_get_contributor_by_name()
Parameters
$name:
Return value
unknown
2 calls to biblio_get_contributor_by_name()
- biblio_get_cid_by_name in includes/
biblio.contributors.inc - Get an author id from the database using the "name" field as a key. If the "cid" value is negative, this means we found an "alternate" form of the name, which should have an "aka" value which points to the…
- _save_contributors in includes/
biblio.contributors.inc - Save contributors to the database.
File
- includes/
biblio.contributors.inc, line 94
Code
function biblio_get_contributor_by_name($name) {
$contributors =& drupal_static(__FUNCTION__);
$name = trim($name);
if (!isset($contributors[$name]) || $contributors[$name] === FALSE) {
$query = db_select('biblio_contributor_data', 'bcd');
$contributors[$name] = $query
->fields('bcd')
->condition('bcd.name', $name)
->execute()
->fetchObject();
}
return $contributors[$name];
}