From ff9eb7f41c4236d6439fdaad9471ca31021f305e Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Thu, 22 Sep 2011 19:27:43 +0100 Subject: [PATCH] Bug 6460: alternative fix, updating template and script instead of C4::Log - a bit rushed --- .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 85 +------------------ tools/viewlog.pl | 6 +- 2 files changed, 10 insertions(+), 81 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index c109744..f20569d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -59,11 +59,11 @@
  • @@ -133,81 +133,6 @@ - [% IF ( do_it ) %] - [% IF ( total ) %] -

    [% total %] lines found.

    - - - - - - - - - - [% FOREACH loopro IN looprow %] - [% UNLESS ( loop.odd ) %][% ELSE %][% END %] - - - - - - - - [% END %] -
    DateLibrarianModuleActionObjectInfo
    [% loopro.timestamp %] - [% loopro.user %] - [% loopro.module %][% loopro.action %] - [% IF ( module == 'MEMBERS' ) %] - member [% loopro.object %] - [% ELSE %] - [% IF ( module == 'CIRCULATION' ) %] - - [% IF ( loopro.object ) %] - member [% loopro.object %] - [% END %] - - [% ELSE %] - [% IF ( module == 'CATALOGUING' ) %] - [% IF ( info == 'item' ) %] - Item [% loopro.object %] - [% ELSE %] - biblio [% loopro.object %] - [% END %] - [% ELSE %] - [% IF ( module == 'SERIAL' ) %] - [% loopro.object %] - [% ELSE %] - [% IF ( module == 'AUTHORITIES' ) %] - auth [% loopro.object %] - [% ELSE %] - [% loopro.object %] - [% END %] - [% END %] - [% END %] - [% END %] - [% END %] - - [% IF ( loopro.CIRCULATION ) %] - biblio [% loopro.info |html %] - [% ELSE %] - [% loopro.info |html %] - [% END %] -
    - [% ELSE %] -
    - No log found - [% IF ( CATALOGUING ) %] - for Bibliographic Record [% object %] - [% END %] - [% IF ( MEMBERS ) %] - for [% firstname %] [% surname %] ([% cardnumber %]) - [% END %] - . -
    - [% END %] - [% END %] - [% END %] [% IF ( do_it ) %] diff --git a/tools/viewlog.pl b/tools/viewlog.pl index d689217..5c43098 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # Copyright 2010 BibLibre +# Copyright 2011 MJ Ray and software.coop # # This file is part of Koha. # @@ -105,7 +106,10 @@ $template->param( if ($do_it) { my @data; - my $results = GetLogs($datefrom,$dateto,$user,\@modules,\@action,$object,$info); + my ($results,$modules,$action); + if ($action[0] ne '') { $action = \@action; } # match All means no limit + if ($modules[0] ne '') { $modules = \@modules; } # match All means no limit + $results = GetLogs($datefrom,$dateto,$user,$modules,$action,$object,$info); @data=@$results; my $total = scalar @data; foreach my $result (@data){ -- 1.7.2.5