You are here

function biblio_get_orphan_authors in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.contributors.inc \biblio_get_orphan_authors()
  2. 6 biblio.contributors.inc \biblio_get_orphan_authors()
  3. 7.2 includes/biblio.contributors.inc \biblio_get_orphan_authors()

Get an array of authors which are not associated with any biblio entires.

Return value

array

2 calls to biblio_get_orphan_authors()
BiblioContributorWebTestCase::testBiblioDeleteOrphanAuthors in tests/BiblioContributorWebTestCase.test
biblio_admin_orphans_form in includes/biblio.admin.inc
_state

File

includes/biblio.contributors.inc, line 264

Code

function biblio_get_orphan_authors() {
  $authors = array();
  $cids = biblio_get_orphan_author_ids();
  if (count($cids)) {
    $query = db_select('biblio_contributor_data', 'bcd');
    $result = $query
      ->fields('bcd')
      ->condition('cid', $cids, 'IN')
      ->orderBy('lastname')
      ->execute();
    foreach ($result as $author) {
      $authors[] = $author;
    }
  }
  return $authors;
}