function biblio_get_orphaned_keyword_ids in Bibliography Module 7
Return value
multitype
1 call to biblio_get_orphaned_keyword_ids()
- biblio_delete_orphan_keywords in includes/
biblio.keywords.inc - Deletes orphaned keywords.
File
- includes/
biblio.keywords.inc, line 302 - Contains all keyword related functions.
Code
function biblio_get_orphaned_keyword_ids() {
$orphans = $active_kids = $all_kids = array();
$query = db_select('biblio_keyword', 'bk');
$active_kids = $query
->fields('bk', array(
'kid',
))
->groupBy('kid')
->execute()
->fetchCol();
$query = db_select('biblio_keyword_data', 'bkd');
$all_kids = $query
->fields('bkd', array(
'kid',
))
->execute()
->fetchCol();
$orphans = array_diff($all_kids, $active_kids);
return $orphans;
}