Skip to content

Commit

Permalink
Merge pull request #1193 from OPUS4/v4.8.0.5
Browse files Browse the repository at this point in the history
Patch Release 4.8.0.5
  • Loading branch information
j3nsch authored Mar 12, 2024
2 parents 666e90e + 4870456 commit 8edba7e
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 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.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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion application/configs/application.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion library/Application/Util/DocumentAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
26 changes: 26 additions & 0 deletions tests/library/Application/Util/DocumentAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 8edba7e

Please sign in to comment.