Bugzilla – Attachment 76569 Details for
Bug 21018
OPAC Resource URL Broken if Tracklinks is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21018: Fix TrackClicks for 952$u
Bug-21018-Fix-TrackClicks-for-952u.patch (text/plain), 1.59 KB, created by
Jonathan Druart
on 2018-06-29 13:33:39 UTC
(
hide
)
Description:
Bug 21018: Fix TrackClicks for 952$u
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-06-29 13:33:39 UTC
Size:
1.59 KB
patch
obsolete
>From 9bbce9169147d2961d0ec33baabf2f0d6fb20582 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 29 Jun 2018 10:29:30 -0300 >Subject: [PATCH] Bug 21018: Fix TrackClicks for 952$u > >Caused by > commit 51b6cf2aafbfb45b9fcb072403b986fe3c2add53 > Bug 19847: Track links within the records and 404 for others > >We should also accept uri stored in items.uri (952$u) > >Test plan: >- Turn on TrackClicks >- Defined uri for some items >- At the OPAC click on the link (from opac-detail.pl) >=> Without this patch you will get 404 (redirected from tracklinks.pl) >=> With this patch applied you will be redirected correctly and the >linktracker will be filled correctly >--- > opac/tracklinks.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index b5743fe699..bc1d54015c 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -22,6 +22,7 @@ use Modern::Perl; > use C4::Context; > use C4::Auth qw(checkauth); > use C4::Biblio; >+use Koha::Items; > use Koha::Linktracker; > use CGI qw ( -utf8 ); > >@@ -57,7 +58,9 @@ if ($uri) { > > 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 ( ( grep { $_ eq $uri } map { $_->{MARCURL} } @$marc_urls ) >+ || Koha::Items->search( { uri => $uri } )->count ) >+ { > $tracker->trackclick( > { > uri => $uri, >-- >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 21018
:
76569
|
76601
|
76863
|
77413
|
77414
|
77519
|
77520