From 051b2d014241ea6f71084227b05023808cff0212 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 May 2020 06:28:40 -0400 Subject: [PATCH] Bug 25444: More minor improvements to simplified loop Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- C4/CourseReserves.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index 6bcb342876..beb45285df 100644 --- a/C4/CourseReserves.pm +++ b/C4/CourseReserves.pm @@ -541,10 +541,10 @@ sub _UpdateCourseItem { if ( $course_item->is_enabled ) { my $item_fields = {}; - for my $field ( qw( itype ccode location homebranch holdingbranch ) ) { + for my $field ( @FIELDS ) { - my $field_enabled = sprintf "%s_enabled", $field; - my $field_storage = sprintf "%s_storage", $field; + my $field_enabled = $field . '_enabled'; + my $field_storage = $field . '_storage'; # Find newly enabled field and add item value to storage if ( $params{$field_enabled} && !$course_item->$field_enabled ) { -- 2.39.5