Skip to content
Snippets Groups Projects
Commit 8a1d49d6 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

More tolerant config handling.

parent ead0e03f
No related merge requests found
...@@ -703,7 +703,7 @@ class OverdriveConnector implements LoggerAwareInterface, ...@@ -703,7 +703,7 @@ class OverdriveConnector implements LoggerAwareInterface,
$checkout = $this->getCheckout($overDriveId, false); $checkout = $this->getCheckout($overDriveId, false);
if (!$checkout) { if (!$checkout) {
$result->msg $result->msg
= "Could not find a checkout for this resource ID for = "Could not find a checkout for this resource ID for
this user."; this user.";
$this->debug("title not checked out."); $this->debug("title not checked out.");
return $result; return $result;
...@@ -799,8 +799,9 @@ class OverdriveConnector implements LoggerAwareInterface, ...@@ -799,8 +799,9 @@ class OverdriveConnector implements LoggerAwareInterface,
$conf->showMyContent $conf->showMyContent
= strtolower($this->recordConfig->Overdrive->showMyContent); = strtolower($this->recordConfig->Overdrive->showMyContent);
$conf->noAccessString = $this->recordConfig->Overdrive->noAccessString; $conf->noAccessString = $this->recordConfig->Overdrive->noAccessString;
$admin = $this->recordConfig->Overdrive->showOverdriveAdminMenu ?? false;
$conf->showOverdriveAdminMenu $conf->showOverdriveAdminMenu
= $this->recordConfig->Overdrive->showOverdriveAdminMenu ?? false; = (strtolower($admin) === 'false') ? false : $admin;
$conf->tokenCacheLifetime $conf->tokenCacheLifetime
= $this->recordConfig->API->tokenCacheLifetime; = $this->recordConfig->API->tokenCacheLifetime;
return $conf; return $conf;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment