@ -40,29 +42,17 @@ function ebsco_user_login(&$edit, $account) {
}
}
/**
/**
* Implements hook_help.
* Implements hook_help().
*
* Displays help and module information.
*
* @param path
* Which path of the site we're using to display help
* @param arg
* Array that holds the current path as returned from arg() function
*/
*/
function ebsco_help($path, $arg) {
function ebsco_help($path, $arg) {
$output = "";
$output = "";
switch ($path) {
switch ($path) {
case "admin/help#ebsco":
case "admin/help#ebsco":
$output .= '<h2>' . t("Full-text articles and eBooks from EBSCOhost Discovery Services") . '</h2>';
$output .= '<h2>' . t("Full-text articles and eBooks from EBSCOhost Discovery Services") . '</h2>';
$output .= '<p>' . t("EBSCO Discovery Service provides users with an easy, yet powerful means of accessing all of
$output .= '<p>' . t("EBSCO Discovery Service provides users with an easy, yet powerful means of accessing all of an institution's information resources through a single search.") . '</p>';
an institution's information resources through a single search.") . '</p>';
$output .= '<p>' . t("This is achieved by harvesting metadata from both internal (library) and external (database vendors) sources, and creating a pre-indexed service of unprecedented size and speed.") . '</p>';
$output .= '<p>' . t("This is achieved by harvesting metadata from both internal (library) and external (database vendors) sources,
$output .= '<p>' . t("Although the resulting collection can be massive in size and scope, the fact that it is indexed locally (on the EBSCOhost® servers) allows for exceptionally fast search response times.") . '</p>';
and creating a pre-indexed service of unprecedented size and speed.") . '</p>';
$output .= '<p>' . t("As no two institutions are the same, EBSCO Discovery Service offers a vast array of customization options with regard to both the underlying collection of metadata as well as the front-end delivery of search results. All of this functionality is based upon the powerful EBSCOhost search experience familiar to researchers worldwide.") . '</p>';
$output .= '<p>' . t("Although the resulting collection can be massive in size and scope, the fact that it is indexed locally
(on the EBSCOhost® servers) allows for exceptionally fast search response times.") . '</p>';
$output .= '<p>' . t("As no two institutions are the same, EBSCO Discovery Service offers a vast array of customization options with
regard to both the underlying collection of metadata as well as the front-end delivery of search results.
All of this functionality is based upon the powerful EBSCOhost search experience familiar to researchers worldwide.") . '</p>';
break;
break;
}
}
return $output;
return $output;
@ -305,36 +295,32 @@ function ebsco_block_info() {
* Used when EBSCO API calls return error messages.
* Used when EBSCO API calls return error messages.
*
*
* Copyright [2017] [EBSCO Information Services]
* Copyright [2017] [EBSCO Information Services]
@ -21,7 +22,7 @@
*/
*/
/**
/**
*
* EBSCOException class.
*/
*/
class EBSCOException extends Exception {
class EBSCOException extends Exception {
const CRITICAL_ERROR = 1;
const CRITICAL_ERROR = 1;
@ -35,7 +36,7 @@ class EBSCOException extends Exception {
}
}
/**
/**
*
* EBSCOConnector class.
*/
*/
class EBSCOConnector {
class EBSCOConnector {
/**
/**
@ -465,8 +466,7 @@ BODY;
$return = new EBSCOException($error, $code);
$return = new EBSCOException($error, $code);
}
}
else {
else {
$return = new EBSCOException("HTTP {$code} : The request could not be understood
$return = new EBSCOException("HTTP {$code} : The request could not be understood by the server due to malformed syntax. Modify your search before retrying.");
by the server due to malformed syntax. Modify your search before retrying.");
}
}
}
}
catch (Exception $e) {
catch (Exception $e) {
@ -475,13 +475,11 @@ BODY;
break;
break;
case self::HTTP_NOT_FOUND:
case self::HTTP_NOT_FOUND:
$return = new EBSCOException("HTTP {$code} : The resource you are looking for might
$return = new EBSCOException("HTTP {$code} : The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.");
have been removed, had its name changed, or is temporarily unavailable.");
break;
break;
case self::HTTP_INTERNAL_SERVER_ERROR:
case self::HTTP_INTERNAL_SERVER_ERROR:
$return = new EBSCOException("HTTP {$code} : The server encountered an unexpected condition
$return = new EBSCOException("HTTP {$code} : The server encountered an unexpected condition which prevented it from fulfilling the request.");
which prevented it from fulfilling the request.");