You are here

function biblio_admin_keyword_orphans_form_submit in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 includes/biblio.admin.inc \biblio_admin_keyword_orphans_form_submit()
  2. 7 includes/biblio.admin.inc \biblio_admin_keyword_orphans_form_submit()
  3. 7.2 includes/biblio.admin.inc \biblio_admin_keyword_orphans_form_submit()
1 string reference to 'biblio_admin_keyword_orphans_form_submit'
biblio_admin_keyword_orphans_form in ./biblio.admin.inc

File

./biblio.admin.inc, line 1943

Code

function biblio_admin_keyword_orphans_form_submit($form, &$form_state) {
  $keywords = array_filter($form_state['values']['keywords']);
  update_sql('DELETE FROM {biblio_keyword_data} WHERE kid IN (' . implode(',', $keywords) . ')');
  $count = count($keywords);
  drupal_set_message(t('%count orphaned keywords have been deleted.', array(
    '%count' => $count,
  )));
}