Skip to content
Snippets Groups Projects
Commit 021030a3 authored by André Lahmann's avatar André Lahmann
Browse files

refs #8705:

* added check of getRvkMetadata() to hasTopics() in SolrMarcFincTrait to enable topic tab for RVK only records
parent 5dff7c3d
Branches
Tags
No related merge requests found
...@@ -1575,12 +1575,30 @@ trait SolrMarcFincTrait ...@@ -1575,12 +1575,30 @@ trait SolrMarcFincTrait
} }
} }
if (empty($retval)) {
$retval = parent::getAllSubjectHeadings();
}
// Remove duplicates and then send back everything we collected: // Remove duplicates and then send back everything we collected:
return array_map( return array_map(
'unserialize', array_unique(array_map('serialize', $retval)) 'unserialize', array_unique(array_map('serialize', $retval))
); );
} }
/**
* Check if Topics exists. Realized for instance of UBL only.
*
* @return boolean True if topics exist.
* @access public
*/
public function hasTopics()
{
$rvk = $this->getRvkWithMetadata();
return (parent::hasTopics()
|| (is_array($rvk) && count($rvk) > 0)
);
}
/** /**
* Get specific marc information about topics. Unflexible solution * Get specific marc information about topics. Unflexible solution
* for UBL only implemented. * for UBL only implemented.
......
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