@ -115,7 +115,7 @@ class EBSCOAPI {
*
* @access public
*/
public function __construct($config) {
public function __construct($config) {
$this->config = $config;
}
@ -128,7 +128,7 @@ class EBSCOAPI {
*
* @access public
*/
public function authenticationToken(){
@ -158,7 +158,7 @@ class EBSCOAPI {
$_SESSION["authenticationTimeout"]= $result['authenticationTimeout'];
$_SESSION['autocompleteUrl'] = $result['autocompleteUrl'];
$_SESSION['autocompleteToken'] = $result['autocompleteToken'];
$_SESSION["autocompleteTokenTimeOut"]= $result['autocompleteTokenTimeOut'];
$_SESSION["autocompleteTokenTimeOut"]= $result['autocompleteTokenTimeOut'];
$_SESSION['autocompleteCustId'] = $result['autocompleteCustId'];
}
@ -168,11 +168,11 @@ class EBSCOAPI {
$_SESSION["authenticationTimeout"]= $result['authenticationTimeout'];
$_SESSION['autocompleteUrl'] = $result['autocompleteUrl'];
$_SESSION['autocompleteToken'] = $result['autocompleteToken'];
$_SESSION["autocompleteTokenTimeOut"]= $result['autocompleteTokenTimeOut'];
$_SESSION["autocompleteTokenTimeOut"]= $result['autocompleteTokenTimeOut'];
$_SESSION['autocompleteCustId'] = $result['autocompleteCustId'];
$result = array(
'authenticationToken' => $token,
@ -459,7 +459,10 @@ class EBSCOAPI {
$type = isset($search['index']) & & !empty($search['index']) ? $search['index'] : 'AllFields';
// Escape some characters from lookfor term.
$term = str_replace(array(',', ':', '(', ')'), array('\,', '\:', '\(', '\)'), $lookfor);
//$term = str_replace(array(',', ':', '(', ')'), array('\,', '\:', '\(', '\)'), $lookfor);
// The below version of the above matches the drupal 7 searches but the above may give less but better results
// and be worth testing down the road.
$term = str_replace(array(',', ':'), array('\,', '\:'), $lookfor);
// Replace multiple consecutive empty spaces with one empty space.
$term = preg_replace("/\s+/", ' ', $term);
@ -592,7 +595,7 @@ class EBSCOAPI {
// Specifies whether or not to include highlighting in the search results.
'highlight' => 'y',
//'includeimagequickview' => $includeimagequickview,
//UPEI commented out
@ -600,7 +603,7 @@ class EBSCOAPI {
//UPEI commented out
//'styles' => $styles,
);
if ($autosuggest == TRUE) {
@ -667,14 +670,14 @@ class EBSCOAPI {
'format' => 'ris',
'styles' => $styles,
);
$result = $this->request('Retrieve', $params);
$result = $this->request('Retrieve', $params);
return $result;
}
public function apiExport($an, $db) {
@ -683,11 +686,11 @@ class EBSCOAPI {
'dbid' => $db,
'format' => 'ris'
);
$result = $this->request('Export', $params);
return $result;
}
public function apiCitationStyles($an, $db, $styles) {
@ -697,14 +700,14 @@ class EBSCOAPI {
'dbid' => $db,
'styles' => $styles
);
$result = $this->request('CitationStyles', $params);
return $result;
}
/**
* Wrapper for info API call.
*
@ -736,7 +739,7 @@ class EBSCOAPI {
return false;
}
}
/**
* Handle a PEAR_Error. Return :