Bugzilla – Attachment 92224 Details for
Bug 23329
tracklinks.pl accepts any url from a parameter for proxying if not tracking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23329: (follow-up) Use any instead of grep
Bug-23329-follow-up-Use-any-instead-of-grep.patch (text/plain), 1.36 KB, created by
Kyle M Hall (khall)
on 2019-08-15 13:25:52 UTC
(
hide
)
Description:
Bug 23329: (follow-up) Use any instead of grep
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-08-15 13:25:52 UTC
Size:
1.36 KB
patch
obsolete
>From eb2bf55de3034d40ab9c9f8faa3197914de6b14b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 23 Jul 2019 16:39:18 -0300 >Subject: [PATCH] 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> >--- > opac/tracklinks.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index 329addf0b5..31fc930b0e 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -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( >-- >2.20.1 (Apple Git-117)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23329
:
91566
|
91572
|
91573
|
91759
|
91760
|
92109
|
92110
|
92111
|
92112
|
92187
|
92188
|
92198
|
92199
|
92200
|
92212
|
92213
|
92214
|
92215
|
92216
|
92217
|
92218
|
92219
|
92220
|
92223
|
92224
|
92225
|
92226
|
92227
|
92228
|
92229
|
92230
|
92231
|
92262
|
92263
|
92264
|
92265
|
92266
|
92267
|
92268
|
92269