Bugzilla – Attachment 118448 Details for
Bug 27979
Multiple item URIs break redirect if TrackClicks enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27979: Modify TrackClicks to verify URL exists in DB when multiple uri
Bug-27979-Modify-TrackClicks-to-verify-URL-exists-.patch (text/plain), 1.73 KB, created by
Aleisha Amohia
on 2021-03-17 20:43:57 UTC
(
hide
)
Description:
Bug 27979: Modify TrackClicks to verify URL exists in DB when multiple uri
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2021-03-17 20:43:57 UTC
Size:
1.73 KB
patch
obsolete
>From 2ab62a19aa2339e7df0f21c4765074d6c93ecdc1 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 18 Mar 2021 09:38:06 +1300 >Subject: [PATCH] Bug 27979: Modify TrackClicks to verify URL exists in DB when > multiple uri > >To test: >1) Go to Admin -> system preferences and enable the TrackClicks syspref >(set to Track or Track anonymously) >2) Find a record in the staff client with an item. Edit the item and put >two external URLs in the Uniform Resource Identifier field, e.g. >"https://www.google.com/ | https://twitter.com/" >3) Search for that record in the OPAC. Notice the two links in the >holdings table. >4) Click a link and confirm that you are directed to a 404. >5) Apply the patch and refresh the page >6) Click a link and confirm that you are directed to the page as >expected >7) Go back to edit the record in the staff client and remove one of the >links from the URI field >8) Go back to the OPAC and confirm you can still access the link as >expected when there is only one URI > >Sponsored-by: Catalyst IT >--- > opac/tracklinks.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index ab07f033be..e357f0a1df 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -61,7 +61,7 @@ if ($uri && ($biblionumber || $itemnumber) ) { > > my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); > my $marc_urls = $record ? C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour')) : []; >- my $search_crit = { uri => $uri }; >+ my $search_crit = { uri => { -like => "%$uri%" } }; > if( $itemnumber ) { # itemnumber is leading over biblionumber > $search_crit->{itemnumber} = $itemnumber; > } elsif( $biblionumber ) { >-- >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 27979
:
118448
|
119088
|
119693