function biblio_load_contributors in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.contributors.inc \biblio_load_contributors()
- 7 includes/biblio.contributors.inc \biblio_load_contributors()
- 7.2 includes/biblio.contributors.inc \biblio_load_contributors()
Retrieves all biblio contributor objects associated with node revision ID.
// @todo: What happens if array or non-existant ID passed?
Parameters
integer $vid: A node revision ID.
Return value
array A array of contributor objects if $vid found; otherwise empty array.
3 calls to biblio_load_contributors()
- biblio_diff in ./
biblio.module - Implements hook_diff().
- biblio_load in ./
biblio.module - Implements hook_load().
- biblio_update_6027 in ./
biblio.install - Update ...
File
- includes/
biblio.contributors.inc, line 101 - Functions related to contributors in Drupal biblio module.
Code
function biblio_load_contributors($vid) {
$contributors = array();
// Do not change order of presentation of contributors.
$sql = "SELECT * " . "FROM {biblio_contributor} bc INNER JOIN {biblio_contributor_data} bcd ON bc.cid = bcd.cid " . "WHERE bc.vid = %d " . "ORDER BY bc.rank ASC";
$resource = db_query($sql, $vid);
while ($creator = db_fetch_array($resource)) {
$contributors[$creator['auth_category']][] = $creator;
}
return $contributors;
}