|
|
@ -21,11 +21,11 @@ function upei_roblib_ill_clean_array($values) { |
|
|
|
if (isset($arr['ISBN'])) { |
|
|
|
if (isset($arr['ISBN'])) { |
|
|
|
$arr['ISBN'] = array($arr['ISBN']); |
|
|
|
$arr['ISBN'] = array($arr['ISBN']); |
|
|
|
} |
|
|
|
} |
|
|
|
if(isset($arr['Genre']) && $arr['Genre'] == 'article' && isset($arr['Author'])) { |
|
|
|
if (isset($arr['Genre']) && $arr['Genre'] == 'article' && isset($arr['Author'])) { |
|
|
|
// We want ArticleAuthor |
|
|
|
// We want ArticleAuthor |
|
|
|
unset($arr['Author']); |
|
|
|
unset($arr['Author']); |
|
|
|
} |
|
|
|
} |
|
|
|
if(isset($arr['doi'])) { |
|
|
|
if (isset($arr['doi'])) { |
|
|
|
$arr['AdditionalNumbers'] = $arr['doi']; |
|
|
|
$arr['AdditionalNumbers'] = $arr['doi']; |
|
|
|
} |
|
|
|
} |
|
|
|
unset($arr['form_build_id']); |
|
|
|
unset($arr['form_build_id']); |
|
|
@ -55,6 +55,10 @@ function upei_roblib_ill_get_request_variable($variable) { |
|
|
|
$last_name = isset($_REQUEST['aulast']) ? $_REQUEST['aulast'] : NULL; |
|
|
|
$last_name = isset($_REQUEST['aulast']) ? $_REQUEST['aulast'] : NULL; |
|
|
|
return !empty($last_name) ? $last_name . ',' . $initial : ''; |
|
|
|
return !empty($last_name) ? $last_name . ',' . $initial : ''; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($variable == 'issn' && !empty($_REQUEST[$variable])) { |
|
|
|
|
|
|
|
// ebsco sometimes sends garbage as issns verify this is a valid issn before displaying the value in the form. |
|
|
|
|
|
|
|
return preg_match('/^\d{4}-?\d{3}[\dxX]$/', $_REQUEST[$variable]) ? $_REQUEST[$variable] : ''; |
|
|
|
|
|
|
|
} |
|
|
|
return isset($_REQUEST[$variable]) ? $_REQUEST[$variable] : ''; |
|
|
|
return isset($_REQUEST[$variable]) ? $_REQUEST[$variable] : ''; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -89,10 +93,10 @@ function upei_roblib_ill_request_info_array($values, $notes) { |
|
|
|
* @return string |
|
|
|
* @return string |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function upei_roblib_format_biblio_info($form_state) { |
|
|
|
function upei_roblib_format_biblio_info($form_state) { |
|
|
|
$data = upei_roblib_ill_clean_array($form_state['storage']['upei_roblib_ill_request_form']); |
|
|
|
$data = upei_roblib_ill_clean_array($form_state['storage']['upei_roblib_ill_request_form']); |
|
|
|
$rows = array(); |
|
|
|
$rows = array(); |
|
|
|
foreach($data as $key => $value) { |
|
|
|
foreach ($data as $key => $value) { |
|
|
|
if($key == 'ISSN' || $key == 'ISBN') { |
|
|
|
if ($key == 'ISSN' || $key == 'ISBN') { |
|
|
|
$value = reset($value); |
|
|
|
$value = reset($value); |
|
|
|
} |
|
|
|
} |
|
|
|
array_push($rows, array($key, $value)); |
|
|
|
array_push($rows, array($key, $value)); |
|
|
|