From 53cdbd27f5776e0d8d6c830c76408b9ac4a73b31 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 4 Mar 2024 13:58:01 +0100 Subject: [PATCH 1/5] #1190 Handle string values (old systems) for BelongsToBibliography --- library/Application/Util/DocumentAdapter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } /** From 5b1160d6433d8f53b62404f9bcbdc652dae4af20 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 4 Mar 2024 14:09:46 +0100 Subject: [PATCH 2/5] #1190 Added tests with string values --- .../Application/Util/DocumentAdapterTest.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) 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. */ From 34bf2df80c13ff66a334c2bf5da8568ccc0014dc Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 4 Mar 2024 15:19:22 +0100 Subject: [PATCH 3/5] Prepare release 4.8.0.5 --- CHANGES.md | 4 ++++ README.md | 2 +- RELEASE_NOTES.md | 6 ++++++ application/configs/application.ini | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a1a0e1f1c..8a125421d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # OPUS 4 Change Log +## Release 4.8.0.5 - 2024-03-05 + +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..da0cab687 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ mostly. ## OPUS 4.8.0.4 (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..305453d91 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-05 + +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 From b98293a9ff3d43265eb4042283c99594c5432b94 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Tue, 12 Mar 2024 11:18:30 +0100 Subject: [PATCH 4/5] Fixed release date for 4.8.0.5 --- CHANGES.md | 2 +- RELEASE_NOTES.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8a125421d..92bd2b56f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # OPUS 4 Change Log -## Release 4.8.0.5 - 2024-03-05 +## Release 4.8.0.5 - 2024-03-12 https://github.com/OPUS4/application/issues/1190 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 305453d91..f3145138f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,6 @@ # OPUS 4 Release Notes -## Patch Release 4.8.0.5 - 2024-03-05 +## Patch Release 4.8.0.5 - 2024-03-12 Problem auf manchen Systemen bei der Anzeige von `BelongsToBibliography` ("Bibl.") in der Dokumentenverwaltung behoben. From 48704569c4280a4ec1fb5f9108754391fea80576 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Tue, 12 Mar 2024 11:19:41 +0100 Subject: [PATCH 5/5] Release preparations for 4.8.0.5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da0cab687..2df2fd06d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ 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.5__. It is available on the [master][MASTER] branch and compatible with PHP 7.1 to 8.1.