From 2538e369cea206414a1b473d58a9e7027bf181e0 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 22 Feb 2008 09:43:42 +1300 Subject: [PATCH] Fix for bug 1844, links in the log no longer server erroring Signed-off-by: Joshua Ferraro --- .../intranet-tmpl/prog/en/modules/tools/viewlog.tmpl | 4 ++++ tools/viewlog.pl | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl index d3e32e03d6..56443374ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl @@ -157,7 +157,11 @@ + + &biblionumber=&bi=#item">Item + " title="Display detail for this biblio">biblio + "> diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 0bf24833ce..9fd9967d04 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -26,6 +26,7 @@ use C4::Koha; use C4::Dates; use C4::Output; use C4::Log; +use C4::Items; use vars qw($debug); @@ -102,6 +103,14 @@ if ($do_it) { my $results = GetLogs($datefrom,$dateto,$user,$module,$action,$object,$info); my $total = scalar @$results; + foreach my $result (@$results){ + if ($result->{'info'} eq 'item'){ + # get item information so we can create a working link + my $item=GetItem($result->{'object'}); + $result->{'biblionumber'}=$item->{'biblionumber'}; + $result->{'biblioitemnumber'}=$item->{'biblionumber'}; + } + } if ( $output eq "screen" ) { # Printing results to screen -- 2.39.5