function biblio_admin_author_edit_add_candidate in Bibliography Module 7
1 string reference to 'biblio_admin_author_edit_add_candidate'
- biblio_admin_author_edit_form in includes/
biblio.admin.inc - _state
File
- includes/
biblio.admin.inc, line 2400 - biblio.admin.inc
Code
function biblio_admin_author_edit_add_candidate($form, &$form_state) {
module_load_include('inc', 'biblio', 'includes/biblio.contributors');
if (!empty($form_state['values']['more_authors_search'])) {
if ($cid = biblio_get_cid_by_name($form_state['values']['more_authors_search'])) {
// We don't want to merge with ourselves :-(.
if ($cid == $form_state['values']['cid']) {
drupal_set_message(t('You cannot merge an author with itself'), 'error');
}
elseif (in_array($cid, $form_state['biblio_add_merge_author'])) {
drupal_set_message(t('Author already exists in the merge list'), 'warning');
}
else {
$form_state['biblio_add_merge_author'][$cid] = $cid;
}
}
else {
drupal_set_message(t('The Author was not found in the database. You must select an Author from the "auto-complete" list of the Keyword search box.'), 'error');
}
}
else {
drupal_set_message(t('Cannot add an empty value'), 'error');
}
$form_state['rebuild'] = TRUE;
}