Bugzilla – Attachment 92111 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) Allow item URI with a biblionumber parameter
Bug-23329-follow-up-Allow-item-URI-with-a-biblionu.patch (text/plain), 1.59 KB, created by
Marcel de Rooy
on 2019-08-09 09:37:47 UTC
(
hide
)
Description:
Bug 23329: (follow-up) Allow item URI with a biblionumber parameter
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-08-09 09:37:47 UTC
Size:
1.59 KB
patch
obsolete
>From 00aee156654be3222404cb1ff005d5f9d6db8415 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 9 Aug 2019 09:18:13 +0000 >Subject: [PATCH] Bug 23329: (follow-up) Allow item URI with a biblionumber > parameter >Content-Type: text/plain; charset=utf-8 > >If you pass a URI with a biblionumber without specifying the itemnumber, >tracklinks did not redirect an item URI. > >Test plan: >[1] Add URI in an item. >[2] Pass this URI with the itemnumber to tracklinks. Should pass. >[3] Pass this URI with the biblionumber to tracklinks. Should pass now too. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > opac/tracklinks.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index 31fc930b0e..09afd3209a 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -56,8 +56,14 @@ if ($uri && ($biblionumber || $itemnumber) ) { > > my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); > my $marc_urls = C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour')); >+ my $search_crit = { uri => $uri }; >+ if( $itemnumber ) { # itemnumber is leading over biblionumber >+ $search_crit->{itemnumber} = $itemnumber; >+ } elsif( $biblionumber ) { >+ $search_crit->{biblionumber} = $biblionumber; >+ } > if ( ( any { $_ eq $uri } map { $_->{MARCURL} } @$marc_urls ) >- || Koha::Items->search( { itemnumber => $itemnumber, uri => $uri } )->count ) >+ || Koha::Items->search( $search_crit )->count ) > { > $tracker->trackclick( > { >-- >2.11.0
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