Skip to content
Snippets Groups Projects
Commit 306d99da authored by Dorian Merz's avatar Dorian Merz
Browse files

Merge branch 'master' into instance/fid

parents 80dce300 02c3f6be
No related merge requests found
...@@ -72,17 +72,21 @@ class FincMissing extends \VuFind\RecordDriver\Missing ...@@ -72,17 +72,21 @@ class FincMissing extends \VuFind\RecordDriver\Missing
*/ */
public function setRawData($data) public function setRawData($data)
{ {
$table = $this->getDbTable('resource'); if (isset($data['id']) && !empty($data['id'])) {
// sets create to FALSE so Resource does not try to generate a DB row on fail $table = $this->getDbTable('resource');
$resource = $table->findResource($data['id'], 'solr', FALSE); // sets create to FALSE so Resource does not try to generate a DB row on fail
if ($resource instanceof Resource) { $resource = $table->findResource($data['id'], 'solr', FALSE);
if (empty($resource->extra_metadata ?? '')) { if ($resource instanceof Resource) {
parent::setRawData($data); if (empty($resource->extra_metadata ?? '')) {
parent::setRawData($data);
} else {
$this->deserializeFromResourceTable($resource);
}
} else { } else {
$this->deserializeFromResourceTable($resource); $this->fields['id'] = $data['id'];
} }
} elseif (isset($data['id'])) { } else {
$this->fields['id'] = $data['id']; $this->fields['id'] = '';
} }
} }
......
...@@ -154,9 +154,10 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink ...@@ -154,9 +154,10 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink
{ {
try { try {
return $this->getTabUrl($driver); return $this->getTabUrl($driver);
} catch (RecordMissingException $exception) {
// return default result on Missing Record
// throw all other Exceptions
} }
catch (RecordMissingException $exception) { return "";
return "";
}
} }
} }
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<?php $params = $this->searchParams($this->searchClassId); $params->activateAllFacets(); ?> <?php $params = $this->searchParams($this->searchClassId); $params->activateAllFacets(); ?>
<?php foreach ($this->ranges as $current): $escField = $this->escapeHtmlAttr($current['field']); ?> <?php foreach ($this->ranges as $current): $escField = $this->escapeHtmlAttr($current['field']); ?>
<?php $extraInputAttribs = ($current['type'] == 'date') ? 'maxlength="4" ' : ''; ?> <?php $extraInputAttribs = ($current['type'] == 'date') ? 'maxlength="4" ' : ''; ?>
<fieldset class="range"> <?php /* #18306: alignment left to result - GG */ ?>
<fieldset class="range left">
<legend><?=$this->transEsc($params->getFacetLabel($current['field']))?></legend> <legend><?=$this->transEsc($params->getFacetLabel($current['field']))?></legend>
<input type="hidden" name="<?=$this->escapeHtmlAttr($current['type'])?>range[]" value="<?=$escField?>"/> <input type="hidden" name="<?=$this->escapeHtmlAttr($current['type'])?>range[]" value="<?=$escField?>"/>
<div class="date-fields"> <div class="date-fields">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment