Skip to content

Commit

Permalink
Fix displaying Alternate Titles and Authors in staff view
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed May 7, 2024
1 parent 850b862 commit fc64a8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions code/web/RecordDrivers/GroupedWorkDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2220,20 +2220,20 @@ public function getAlternateTitles() {
$alternateTitles = [];
if (!empty($permanentId)) {
$alternateTitle->permanent_id = $permanentId;
$alternateTitle->find();
$alternateTitles = [];
while ($alternateTitle->fetch()) {
$alternateTitles[$alternateTitle->id] = clone $alternateTitle;
if ($alternateTitle->find()) {
while ($alternateTitle->fetch()) {
$alternateTitles[$alternateTitle->id] = clone $alternateTitle;
}
}

//Also look for any grouped works that do not have the language attached
if (strlen($permanentId) == 40) {
$permanentId = substr($permanentId, 0, 36);
$alternateTitle->permanent_id = $permanentId;
$alternateTitle->find();
$alternateTitles = [];
while ($alternateTitle->fetch()) {
$alternateTitles[$alternateTitle->id] = clone $alternateTitle;
if ($alternateTitle->find()) {
while ($alternateTitle->fetch()) {
$alternateTitles[$alternateTitle->id] = clone $alternateTitle;
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions code/web/release_notes/24.05.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
- Error handling when viewing records that are not linked to a grouped work. (*MDN*)
- Correct license included in repository based on VuFind original license. (*MDN*)
- Optimize session table during nightly cron. (*MDN*)
- Fix displaying Alternate Titles and Authors in staff view. (*MDN*)

## This release includes code contributions from
- ByWater Solutions
Expand Down

0 comments on commit fc64a8f

Please sign in to comment.