Skip to content

Commit

Permalink
Remove unnecessary stuff and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mshroom committed Jun 25, 2024
1 parent 7507450 commit adf006f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 1 addition & 12 deletions src/RecordManager/Base/Record/Lido.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,10 @@ public function toSolrArray(Database $db = null)
$data['record_format'] = 'lido';
$title = $this->getTitle(false);
$data['title'] = $data['title_short'] = $data['title_full'] = $title;
// Create sort title from the title that may have been split above:
$data['title_sort'] = $this->metadataUtils->createSortTitle($title);
$data['title_alt'] = $this->getAltTitles();

$description = $this->getDescription();
if ($description) {
if (
!empty($data['description'])
&& !str_starts_with($description, $data['description'])
) {
$data['description'] .= " -- $description";
} else {
$data['description'] = $description;
}
}
$data['description'] = $this->getDescription();

$data['format'] = $this->getObjectWorkType();
$data['identifier'] = $this->getIdentifier();
Expand Down
2 changes: 2 additions & 0 deletions tests/RecordManagerTest/Base/Record/LidoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function testLido1()
'title_sort' => 'luonnonsuojelusäädökset toimittanut raimo luhtanen'
. ' säädökset',
'title_alt' => [],
'description' => '',
'format' => 'Kirja',
'identifier' => '26054',
'institution' => 'Test Institution',
Expand Down Expand Up @@ -179,6 +180,7 @@ public function testLido1NonMergedTitle()
'title_alt' => [
'Säädökset',
],
'description' => '',
'format' => 'Kirja',
'identifier' => '26054',
'institution' => 'Test Institution',
Expand Down

0 comments on commit adf006f

Please sign in to comment.