From 34024213e08540970f7bdc8bbf37ed0fe5c16fd6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 25 Nov 2019 11:28:40 +0100 Subject: [PATCH] Bug 10352: Use a new object_type parameter instead of the module's name To dissociate a search on biblio and item, we pass a new "object_type" parameter to viewlog.pl. If equals 'biblio' we will assume that "object" contains a biblionumber Signed-off-by: Nick Clemens Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 346ff47491d3fe0e8768c7fa334e0d8fe4a55e1f) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc | 2 +- tools/viewlog.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc index d13312a0df..2080b07707 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -39,7 +39,7 @@
    [% IF ( issuehistoryview ) %]
  • [% ELSE %]
  • [% END %] Checkout history
  • -[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]
  • [% ELSE %]
  • [% END %]Modification log
  • [% END %] +[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]
  • [% ELSE %]
  • [% END %]Modification log
  • [% END %] [% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]
  • [% ELSE %]
  • [% END %]Rota
  • [% END %]
diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 40e1c6658a..94c7ecb3ea 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -54,6 +54,7 @@ my $user = $input->param("user") // ''; my @actions = $input->multi_param("actions"); my @interfaces = $input->multi_param("interfaces"); my $object = $input->param("object"); +my $object_type = $input->param("object_type"); my $info = $input->param("info"); my $datefrom = $input->param("from"); my $dateto = $input->param("to"); @@ -135,7 +136,7 @@ if ($do_it) { $search_params{interface} = { -in => [ @interfaces ] } if ( defined $interfaces[0] && $interfaces[0] ne '' ); - if ( @modules == 1 && $modules[0] eq 'CATALOGUING' ) { + if ( @modules == 1 && $object_type eq 'biblio' ) { # Handle 'Modification log' from cataloguing my @itemnumbers = Koha::Items->search({ biblionumber => $object })->get_column('itemnumber'); $search_params{'-or'} = [ -- 2.39.5