Skip to content
Snippets Groups Projects
Commit 182b4d06 authored by Alexander Purr's avatar Alexander Purr
Browse files

refs #26324 [fid] Remove empty and duplicate links on electronic resolver links (JOP)

* reuse snippet from bbi
parent 0cd5c3b2
Branches
No related merge requests found
......@@ -11,10 +11,21 @@
*
* modified for fid:
* - hide no-Resolver-Content-Message
* - remove empty and duplicate links from electronic resources (copied from bbi) #26324
*
* configured in: --
*/
?>
<?php
// fid: Remove empty and duplicate links (determined by href, not title, which can be duplicate) #26324
$hrefs = [];
$this->electronic = array_filter($this->electronic ?? [], function ($link) use (&$hrefs) {
if (!empty($link['href']) && !in_array($link['href'], $hrefs)) {
$hrefs[] = $link['href'];
return true;
}
});
?>
<div>
<?php if (!empty($this->electronic)): ?>
<div class="openurls">
......
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