Bug 23329: (follow-up) Use any instead of grep
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
e11b1e6d3c
commit
608cf1b073
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ use C4::Biblio;
|
|||
use Koha::Items;
|
||||
use Koha::Linktracker;
|
||||
use CGI qw ( -utf8 );
|
||||
use List::MoreUtils qw(any);
|
||||
|
||||
my $cgi = new CGI;
|
||||
my $uri = $cgi->param('uri') || '';
|
||||
|
@ -55,7 +56,7 @@ if ($uri && ($biblionumber || $itemnumber) ) {
|
|||
|
||||
my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $marc_urls = C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour'));
|
||||
if ( ( grep { $_ eq $uri } map { $_->{MARCURL} } @$marc_urls )
|
||||
if ( ( any { $_ eq $uri } map { $_->{MARCURL} } @$marc_urls )
|
||||
|| Koha::Items->search( { itemnumber => $itemnumber, uri => $uri } )->count )
|
||||
{
|
||||
$tracker->trackclick(
|
||||
|
|
Loading…
Reference in a new issue