Skip to content

Commit

Permalink
Merge pull request #2195 from PTFS-Europe/25.01.00_fix_libkey_for_ebsco
Browse files Browse the repository at this point in the history
DIS-138 25.01.00 fix libkey for ebsco
  • Loading branch information
mdnoble73 authored Jan 14, 2025
2 parents bd69eb2 + 87f088d commit 68ec744
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 2 additions & 0 deletions code/web/release_notes/25.01.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
- if the results from the LibKey API indicate an article has been retracted, they are marked as such. (*CZ*)
- for retracted articles, a link to a LibKey page giving information on the retraction is displayed. (*CZ*)
- for retracted articles, the 'Access Online' button is not displayed. (*CZ*)
- fixed an issue where the LibKey integration would prevent EBSCO host records from appearing due to a control flow issue. (*CZ*)
- fixed an issue where the LibKey integration would overwrite retraction notices for EBSCO EDS records. (*CZ*)

### Local ILL Updates
- Properly handle volume level holds with Local ILL. (DIS-34) (*MDN*)
Expand Down
22 changes: 12 additions & 10 deletions code/web/sys/SearchObject/EbscoEdsSearcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,23 @@ public function getResultRecordHTML() {
$interface->assign('resultIndex', $x + 1 + (($this->page - 1) * $this->limit));
if (Library::getActiveLibrary()->libKeySettingId != -1 && !empty($this->lastSearchResults->Data->Records[$x]->RecordInfo->BibRecord->BibEntity->Identifiers)) {
foreach ($this->lastSearchResults->Data->Records[$x]->RecordInfo->BibRecord->BibEntity->Identifiers as $ui) {
if ($ui->Type == "doi") {
$libKeyResult = $this->getLibKeyResult($ui->Value);
if (isset($libKeyResult['data']['retractionNoticeUrl'])) {
$interface->assign('libKeyUrl', $libKeyResult['data']['retractionNoticeUrl']);
$interface->assign('retracted', true);
break;
}
if ($ui->Type != "doi") {
continue;
}
$libKeyResult = $this->getLibKeyResult($ui->Value);
if (!$libKeyResult || !isset($libKeyResult['data'])) {
continue;
}
if (isset($libKeyResult['data']['retractionNoticeUrl'])) {
$interface->assign('libKeyUrl', $libKeyResult['data']['retractionNoticeUrl']);
$interface->assign('retracted', true);
} else {
$interface->assign('libKeyUrl', $libKeyResult["data"]["bestIntegratorLink"]["bestLink"]);
$interface->assign('libKeyCoverImageUrl', $libKeyResult['included'][0]['coverImageUrl']);
$interface->assign('retracted', false);
break;
$interface->assign('libKeyCoverImageUrl', $libKeyResult['included'][0]['coverImageUrl']);
}
}
}

require_once ROOT_DIR . '/RecordDrivers/EbscoRecordDriver.php';
$record = new EbscoRecordDriver($current);
if ($record->isValid()) {
Expand Down
17 changes: 9 additions & 8 deletions code/web/sys/SearchObject/EbscohostSearcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,16 @@ public function getResultRecordHTML() {
$interface->assign('resultIndex', $x + 1 + (($this->page - 1) * $this->limit));
if (Library::getActiveLibrary()->libKeySettingId != -1 && !empty($current->header->controlInfo->artinfo->ui)) {
$libKeyResult = $this->getLibKeyResult($current->header->controlInfo->artinfo->ui);
if (isset($libKeyResult['data']['retractionNoticeUrl'])) {
$interface->assign('libKeyUrl', $libKeyResult['data']['retractionNoticeUrl']);
$interface->assign('retracted', true);
break;
if ($libKeyResult && isset($libKeyResult['data'])) {
if (isset($libKeyResult['data']['retractionNoticeUrl'])) {
$interface->assign('libKeyUrl', $libKeyResult['data']['retractionNoticeUrl']);
$interface->assign('retracted', true);
} else {
$interface->assign('libKeyUrl', $libKeyResult["data"]["bestIntegratorLink"]["bestLink"]);
$interface->assign('libKeyCoverImageUrl', $libKeyResult['included'][0]['coverImageUrl']);
$interface->assign('retracted', false);
}
}
$interface->assign('libKeyUrl', $libKeyResult["data"]["bestIntegratorLink"]["bestLink"]);
$interface->assign('libKeyCoverImageUrl', $libKeyResult['included'][0]['coverImageUrl']);
$interface->assign('retracted', false);
break;
}
require_once ROOT_DIR . '/RecordDrivers/EbscohostRecordDriver.php';
$record = new EbscohostRecordDriver($current);
Expand Down

0 comments on commit 68ec744

Please sign in to comment.