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