From 12e741caa776c9e1f054fe04d833e69f8cbd1401 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 17 Oct 2019 15:26:18 +0000 Subject: [PATCH] Bug 23836: Don't forward form tracklinks if not tracking Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy Signed-off-by: Lucas Gass --- opac/tracklinks.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl index 26b8a12a87..2c66efdbe4 100755 --- a/opac/tracklinks.pl +++ b/opac/tracklinks.pl @@ -32,9 +32,10 @@ my $uri = $cgi->param('uri') || ''; my $biblionumber = $cgi->param('biblionumber') || 0; my $itemnumber = $cgi->param('itemnumber') || 0; +my $tracking_method = C4::Context->preference('TrackClicks'); +output_error( $cgi, '404' ) unless $tracking_method; my $tracker = Koha::Linktracker->new( - { trackingmethod => C4::Context->preference('TrackClicks') } ); - + { trackingmethod => $tracking_method } ); if ($uri && ($biblionumber || $itemnumber) ) { my $borrowernumber = 0; -- 2.39.5