Skip to content

Commit

Permalink
Resource::formatPersons(): sort persons before joining so the result …
Browse files Browse the repository at this point in the history
…is stable
  • Loading branch information
zozlak committed Oct 23, 2024
1 parent f2200d1 commit 7e305ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/acdhOeaw/arche/biblatex/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ private function formatPersons(array $properties,
}
}
}
sort($persons);
return join(' and ', $persons);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testAll(): void {
author = {Steiner, Guenther},
editoratype = {compiler},
booktitle = {Die Große Transformation},
bookauthor = {{} and Steiner, Guenther and {} and {} and {}},
bookauthor = {Steiner, Guenther and {} and {} and {} and {}},
note = {sha1:ba29f9d179bb963516cf5d4c7ca268b9555a0602},
keywords = {Bundesländer, Föderalismus, Verwaltung, Zwischenkriegszeit},
abstract = {Das Protokoll behandelt die 3. Länderkonferenz.}
Expand Down Expand Up @@ -98,7 +98,7 @@ public function testLive(): void {
author = {Steiner, Guenther},
editoratype = {compiler},
booktitle = {Die Große Transformation},
bookauthor = {Megner, Karl and Steiner, Guenther and Helfert, Veronika and Garstenauer, Theresa and Becker, Peter},
bookauthor = {Becker, Peter and Garstenauer, Theresa and Helfert, Veronika and Megner, Karl and Steiner, Guenther},
note = {sha1:ba29f9d179bb963516cf5d4c7ca268b9555a0602},
keywords = {Bundesländer, Föderalismus, Verwaltung, Zwischenkriegszeit},
abstract = {Das Protokoll behandelt die 3. Länderkonferenz.}
Expand Down

0 comments on commit 7e305ec

Please sign in to comment.