diff --git a/CHANGES.md b/CHANGES.md index a1a0e1f1c..92bd2b56f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # OPUS 4 Change Log +## Release 4.8.0.5 - 2024-03-12 + +https://github.com/OPUS4/application/issues/1190 + ## Release 4.8.0.4 - 2024-01-09 https://github.com/OPUS4/application/issues/1174 diff --git a/README.md b/README.md index 4f56670b9..2df2fd06d 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ redevelopment that was created as part of a DFG ([Deutsche Forschungsgemeinschaf Since then the development has been continued at KOBV ([Kooperativer Bibliotheksverbund Berlin-Brandenburg][KOBV]) mostly. -## OPUS 4.8.0.4 (current version) +## OPUS 4.8.0.5 (current version) -The current version of OPUS 4 is __4.8.0.4__. It is available on the [master][MASTER] branch and compatible with +The current version of OPUS 4 is __4.8.0.5__. It is available on the [master][MASTER] branch and compatible with PHP 7.1 to 8.1. [Documentation][DOC] diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 92a3613e2..f3145138f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,11 @@ # OPUS 4 Release Notes +## Patch Release 4.8.0.5 - 2024-03-12 + +Problem auf manchen Systemen bei der Anzeige von `BelongsToBibliography` +("Bibl.") in der Dokumentenverwaltung behoben. +https://github.com/OPUS4/application/issues/1190 + ## Patch Release 4.8.0.4 - 2024-01-09 Fehler beim Löschen mehrerer Dateien von einem Dokument behoben. diff --git a/application/configs/application.ini b/application/configs/application.ini index 6dc4c722c..22effada2 100644 --- a/application/configs/application.ini +++ b/application/configs/application.ini @@ -70,7 +70,7 @@ name = 'OPUS 4' logoLink = home security = 1 workspacePath = APPLICATION_PATH "/workspace" -version = 4.8.0.4 +version = 4.8.0.5 update.latestVersionCheckUrl = "https://api.github.com/repos/opus4/application/releases/latest" ; Determines the implementation of the OPUS 4 data model diff --git a/library/Application/Util/DocumentAdapter.php b/library/Application/Util/DocumentAdapter.php index 92e3ed26a..641c29894 100644 --- a/library/Application/Util/DocumentAdapter.php +++ b/library/Application/Util/DocumentAdapter.php @@ -334,10 +334,12 @@ public function getDocState() /** * @return bool + * + * TODO PHP7 on old systems getBelongsToBibliography returns strings ("0" or "1") */ public function isBelongsToBibliography() { - return $this->document->getBelongsToBibliography() === 1; + return filter_var($this->document->getBelongsToBibliography(), FILTER_VALIDATE_BOOLEAN); } /** diff --git a/tests/library/Application/Util/DocumentAdapterTest.php b/tests/library/Application/Util/DocumentAdapterTest.php index 6ef5e52f8..d51496395 100644 --- a/tests/library/Application/Util/DocumentAdapterTest.php +++ b/tests/library/Application/Util/DocumentAdapterTest.php @@ -113,6 +113,32 @@ public function testIsBelongsToBibliographyFalse() $this->assertFalse($docAdapter->isBelongsToBibliography()); } + public function testIsBelongsToBibliographyTrueWithStringValue() + { + $view = $this->getView(); + + $doc = $this->createTestDocument(); + + $doc->setBelongsToBibliography('1'); + + $docAdapter = new Application_Util_DocumentAdapter($view, $doc); + + $this->assertTrue($docAdapter->isBelongsToBibliography()); + } + + public function testIsBelongsToBibliographyFalseWithStringValue() + { + $view = $this->getView(); + + $doc = $this->createTestDocument(); + + $doc->setBelongsToBibliography('0'); + + $docAdapter = new Application_Util_DocumentAdapter($view, $doc); + + $this->assertFalse($docAdapter->isBelongsToBibliography()); + } + /** * Tests returning title in document language. */