Bug 27979: Modify TrackClicks to verify URL exists in DB when multiple uri
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 17 Mar 2021 20:38:06 +0000 (09:38 +1300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 25 Apr 2021 16:29:53 +0000 (16:29 +0000)
commitd52969810fe597197bd6313d5446b649c0011ee2
tree0bba10ac63ca84de0b159cc69a4bf5dea425924e
parent1c0fc0bc95127caf8cd14978423ba8c2b6714069
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
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0da874bde2eb9592e6c2036e840aac3ed09dab44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63b7ba9767e324fc7fb3b12092292ca23b63c3db)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
opac/tracklinks.pl