Browse Source

updated for reading conference crossref xml and fixed typo

9.x-1.0
Paul Pound 8 years ago
parent
commit
ba3c48e12e
  1. 4
      includes/doi.inc
  2. 2
      includes/form.inc

4
includes/doi.inc

@ -37,6 +37,10 @@ function upei_roblib_ill_doi_get_data($form, $doi) {
function upei_roblib_ill_populate_form_doi($crossref_xml, $form) { function upei_roblib_ill_populate_form_doi($crossref_xml, $form) {
$full_title = $crossref_xml->getElementsbyTagName('full_title') $full_title = $crossref_xml->getElementsbyTagName('full_title')
->item(0)->nodeValue; ->item(0)->nodeValue;
if(empty($full_title)) {
$full_title = $crossref_xml->getElementsbyTagName('conference_name')
->item(0)->nodeValue;
}
$form['Title']['#value'] = $full_title; $form['Title']['#value'] = $full_title;
$form['ISSN']['#value'] = $crossref_xml->getElementsbyTagName('issn') $form['ISSN']['#value'] = $crossref_xml->getElementsbyTagName('issn')
->item(0)->nodeValue; ->item(0)->nodeValue;

2
includes/form.inc

@ -38,7 +38,7 @@ function upei_roblib_ill_form($form, &$form_state) {
*/ */
function upei_roblib_ill_form_validate($form, &$form_state) { function upei_roblib_ill_form_validate($form, &$form_state) {
if ($form_state['step'] == 'upei_roblib_ill_request_form' && empty($form_state['values']['doi']) && empty($form_state['values']['Title']) && if ($form_state['step'] == 'upei_roblib_ill_request_form' && empty($form_state['values']['doi']) && empty($form_state['values']['Title']) &&
empty($form_state['values']['ArtcleTitle']) empty($form_state['values']['ArticleTitle'])
) { ) {
form_set_error('Title', t('One of "DOI", "Title" or "Article Title" values must be provided')); form_set_error('Title', t('One of "DOI", "Title" or "Article Title" values must be provided'));
} }

Loading…
Cancel
Save