diff --git a/CHANGES.md b/CHANGES.md index 8f596d627..e9ffab213 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # OPUS 4 Change Log +## Release 4.7.1.1 - 2022-07-12 + +* OPUS4/application#598 - Werte für Konfigurationsparameter "supportedLanguages" trimmen + ## Release 4.7.1 - 2022-03-24 ### Aufgaben diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f55e66773..afe15516e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,17 @@ # OPUS 4 Release Notes + +## Patch Release 4.7.1.1 - 2022-07-12 + +Die Sprachen im Konfigurationsparameter `supportedLanguages` werden nun +automatisch getrimmt, um Leerzeichen zu entfernen. Die Leerzeichen hätten +Probleme beim Update verursachen können, wenn Namen für CollectionRoles +mit Sonderzeichen bereinigt werden müssen. Die Bereinigung wurde bereits +mit OPUS 4.7 ins Update integriert. + +Für 4.7.1 Instanzen ist diese Änderung nicht relevant und kann einfach +mit `git pull` übernommen werden. Ältere Instanzen müssten dem normalen +Update-Prozess folgen. + --- ## Release 4.7.1 2022-03-24 diff --git a/application/configs/application.ini b/application/configs/application.ini index 4bfb74a8a..2e08fa58b 100644 --- a/application/configs/application.ini +++ b/application/configs/application.ini @@ -77,7 +77,7 @@ name = 'OPUS 4' logoLink = home security = 1 workspacePath = APPLICATION_PATH "/workspace" -version = 4.7.1 +version = 4.7.1.1 update.latestVersionCheckUrl = "https://api.github.com/repos/opus4/application/releases/latest" ; base URL of your OPUS instance (used for generating absolute URLs, e.g. in email messages) diff --git a/library/Application/Configuration.php b/library/Application/Configuration.php index 56eadb9b5..9389e9fd7 100644 --- a/library/Application/Configuration.php +++ b/library/Application/Configuration.php @@ -125,7 +125,7 @@ public function getSupportedLanguages() if (is_null($this->supportedLanguages)) { $config = $this->getConfig(); if (isset($config->supportedLanguages)) { - $this->supportedLanguages = explode(',', $config->supportedLanguages); + $this->supportedLanguages = array_map('trim', explode(',', $config->supportedLanguages)); /* TODO only used for debugging - remove? $this->getLogger()->debug( Zend_Debug::dump( diff --git a/tests/library/Application/ConfigurationTest.php b/tests/library/Application/ConfigurationTest.php index e5fd9ac17..d169ea0ea 100644 --- a/tests/library/Application/ConfigurationTest.php +++ b/tests/library/Application/ConfigurationTest.php @@ -124,6 +124,15 @@ public function testIsLanguageSelectionEnabledTrue() $this->assertTrue($this->config->isLanguageSelectionEnabled()); } + public function testGetSupportedLanguagesValuesAreTrimmed() + { + $this->adjustConfiguration([ + 'supportedLanguages' => 'en, de' + ]); + + $this->assertEquals(['en', 'de'], $this->config->getSupportedLanguages()); + } + public function testIsLanguageSelectionEnabledFalse() { Config::get()->supportedLanguages = 'de';