From 490e38069c0b9fcf71449d7812a0056b68318c64 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 17 Jan 2014 06:04:37 +0000 Subject: [PATCH] Bug 11473: (follow-up) ensure link to item is construct correctly This patch adjusts the check on action_logs.info to better detect if the event concerns an item. This fixes a problem where the links from log entries on item modifications would, if followed, result in internal server errors. Signed-off-by: Galen Charlton --- tools/viewlog.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 67ce7dd1bb..949bec7201 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -115,7 +115,7 @@ if ($do_it) { @data=@$results; my $total = scalar @data; foreach my $result (@data){ - if ($result->{'info'} eq 'item'||$result->{module} eq "CIRCULATION"){ + if (substr($result->{'info'}, 0, 4) eq 'item' || $result->{module} eq "CIRCULATION"){ # get item information so we can create a working link my $itemnumber=$result->{'object'}; $itemnumber=$result->{'info'} if ($result->{module} eq "CIRCULATION"); -- 2.39.5