Skip to content

Commit

Permalink
Merge pull request #601 from OPUS4/4.7.1.1
Browse files Browse the repository at this point in the history
Release 4.7.1.1
  • Loading branch information
j3nsch authored Jul 12, 2022
2 parents 31134ac + d4f98d9 commit e3453ac
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion application/configs/application.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion library/Application/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 9 additions & 0 deletions tests/library/Application/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit e3453ac

Please sign in to comment.