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
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit
d14ed73744fa23d4ed649da6d847f4b37cdfce92)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit
20bfb6730f3d93d388a538871b94e83d867ac796)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit
84f5ae669c36e10ec28d8015197a6450fe11eac8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
use C4::Context;
use C4::Auth qw(checkauth);
use C4::Biblio;
+use Koha::Items;
use Koha::Linktracker;
use CGI qw ( -utf8 );
my $record = C4::Biblio::GetMarcBiblio($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,