Browse Source

now put the doi in Relais AdditionalNumbers

9.x-1.0
Paul Pound 7 years ago
parent
commit
fa4f85bb21
  1. 3
      includes/doi.inc
  2. 3
      includes/utilities.inc

3
includes/doi.inc

@ -28,7 +28,6 @@ function upei_roblib_ill_doi_get_data($form, $doi) {
$crossref_xml = new DOMDocument('1.0'); $crossref_xml = new DOMDocument('1.0');
if (!$crossref_xml->loadXML($response->data)) { if (!$crossref_xml->loadXML($response->data)) {
drupal_set_message(t('Error parseing DOI response, @msg')); drupal_set_message(t('Error parseing DOI response, @msg'));
$form['doi']['#value'] = '';
return $form; return $form;
} }
else { else {
@ -37,7 +36,6 @@ function upei_roblib_ill_doi_get_data($form, $doi) {
} }
else { else {
drupal_set_message(t('Error retrieve data using DOI of @doi', array('@doi' => $doi)), 'error'); drupal_set_message(t('Error retrieve data using DOI of @doi', array('@doi' => $doi)), 'error');
$form['doi']['#value'] = '';
return $form; return $form;
} }
} }
@ -91,7 +89,6 @@ function upei_roblib_ill_populate_form_doi($crossref_xml, $form) {
} }
} }
$form['ArticleAuthor']['#value'] = $author; $form['ArticleAuthor']['#value'] = $author;
$form['doi']['#value'] = '';
return $form; return $form;
} }

3
includes/utilities.inc

@ -25,6 +25,9 @@ function upei_roblib_ill_clean_array($values) {
// We want ArticleAuthor // We want ArticleAuthor
unset($arr['Author']); unset($arr['Author']);
} }
if(isset($arr['doi'])) {
$arr['AdditionalNumbers'] = $arr['doi'];
}
unset($arr['form_build_id']); unset($arr['form_build_id']);
unset($arr['form_token']); unset($arr['form_token']);
unset($arr['form_id']); unset($arr['form_id']);

Loading…
Cancel
Save