You are here

function biblio_delete_orphan_authors in Bibliography Module 7

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

Parameters

$force:

2 calls to biblio_delete_orphan_authors()
BiblioContributorWebTestCase::testBiblioDeleteOrphanAuthors in tests/BiblioContributorWebTestCase.test
biblio_cron in ./biblio.module
Implements hook_cron().

File

includes/biblio.contributors.inc, line 314

Code

function biblio_delete_orphan_authors($force = FALSE) {
  if (variable_get('biblio_auto_orphaned_author_delete', 0) || $force) {
    $orphans = biblio_get_orphan_author_ids();
    if (!empty($orphans)) {
      db_delete('biblio_contributor_data')
        ->condition('cid', $orphans, 'IN')
        ->execute();
    }
  }
}