diff --git a/module/VuFind/src/VuFind/RecordDriver/ProQuestFSG.php b/module/VuFind/src/VuFind/RecordDriver/ProQuestFSG.php index 4ac49a78a7e..7148a92217c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/ProQuestFSG.php +++ b/module/VuFind/src/VuFind/RecordDriver/ProQuestFSG.php @@ -105,7 +105,7 @@ public function getTitle() public function getContainerTitle() { // For books, don't display any container. - if ('Book' === $this->getOpenUrlFormat()) { + if ($this->isBook()) { return ''; } return $this->getFirstFieldValue('773', ['t']); @@ -120,12 +120,23 @@ public function getContainerTitle() public function getContainerReference() { // For books, don't display any container. - if ('Book' === $this->getOpenUrlFormat()) { + if ($this->isBook()) { return ''; } return $this->getFirstFieldValue('773', ['g']); } + /** + * Try to determine if this is a book, based on ProQuest's use of MARC. + * + * @return bool + */ + protected function isBook() + { + $type = $this->getFirstFieldValue('513', ['a']); + return str_contains($type, 'Book') && !str_contains($type, 'Book Review'); + } + /** * Get the item's source. * @@ -146,7 +157,7 @@ public function getHumanReadablePublicationDates() { $dates = $this->marcGetHumanReadablePublicationDates(); // For books, we should only display the year - if ('Book' === $this->getOpenUrlFormat()) { + if ($this->isBook()) { foreach ($dates as $i => $date) { if (($pos = strpos($date, ',')) !== false) { $dates[$i] = trim(substr($date, $pos + 1));