From 368e88ef53cd0e2847ddc05917b5406f427fd183 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 30 Apr 2014 10:30:34 +0200 Subject: [PATCH] Bug 11023: Don't use the biblioitems fields for the subtitution It's dangerous to allow a change on the biblioitems fields with this feature. --- .../intranet-tmpl/prog/en/modules/tools/toggle_new_status.tt | 8 ++++---- tools/toggle_new_status.pl | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/toggle_new_status.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/toggle_new_status.tt index 8a0d5ae..7791d6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/toggle_new_status.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/toggle_new_status.tt @@ -155,7 +155,7 @@
- [% FOR field IN fields %] + [% FOR field IN substitution_fields %] [% IF substitution.field == field %] [% ELSE %] @@ -217,7 +217,7 @@
@@ -232,7 +232,7 @@
diff --git a/tools/toggle_new_status.pl b/tools/toggle_new_status.pl index c7b88d4..a37ea1a 100755 --- a/tools/toggle_new_status.pl +++ b/tools/toggle_new_status.pl @@ -111,7 +111,8 @@ my @biblioitem_fields = map { "biblioitems.$_" } C4::Items::biblioitems_columns; $template->param( op => $op, messages => \@messages, - fields => [ @item_fields, @biblioitem_fields ], + condition_fields => [ @item_fields, @biblioitem_fields ], + substitution_fields => \@item_fields, rules => $rules, ); -- 2.0.0.rc2