From 504ff4a6a2c1b10659060e086dccf7ef41416608 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Mon, 15 Aug 2022 19:54:49 +0000 Subject: [PATCH] Bug 21159: (follow-up) Removing tab spaces Sponsored-by: Toi Ohomai Institute of Technology, New Zealand --- Koha/Item.pm | 8 ++++---- .../bug_21159-add_UpdateItemLocationOnCheckout_syspref.pl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 45719472837..0d9538ed963 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1954,10 +1954,10 @@ sub update_item_location { foreach my $key ( keys %$update_loc_rules ) { if ( $update_loc_rules->{$key} eq '_PERM_' ) { $update_loc_rules->{$key} = $self->permanent_location; } if ( $update_loc_rules->{$key} eq '_BLANK_') { $update_loc_rules->{$key} = '' ;} - if ( - (defined $self->location && $self->location eq $key && $self->location ne $update_loc_rules->{$key}) || - (defined $self->location && $key eq '_BLANK_' && $self->location eq '' && $update_loc_rules->{$key} ne '') - ) { + if ( + (defined $self->location && $self->location eq $key && $self->location ne $update_loc_rules->{$key}) || + (defined $self->location && $key eq '_BLANK_' && $self->location eq '' && $update_loc_rules->{$key} ne '') + ) { $messages->{'ItemLocationUpdated'} = { from => $self->location, to => $update_loc_rules->{$key} }; $self->location($update_loc_rules->{$key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1}); last; diff --git a/installer/data/mysql/atomicupdate/bug_21159-add_UpdateItemLocationOnCheckout_syspref.pl b/installer/data/mysql/atomicupdate/bug_21159-add_UpdateItemLocationOnCheckout_syspref.pl index 13855412558..cf7e255ef4d 100755 --- a/installer/data/mysql/atomicupdate/bug_21159-add_UpdateItemLocationOnCheckout_syspref.pl +++ b/installer/data/mysql/atomicupdate/bug_21159-add_UpdateItemLocationOnCheckout_syspref.pl @@ -7,6 +7,6 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('UpdateItemLocationOnCheckout', '', 'NULL', 'This is a list of value pairs.\n Examples:\n\nPROC: FIC - causes an item in the Processing Center location to be updated into the Fiction location on check out.\nFIC: GEN - causes an item in the Fiction location to be updated into the General stacks location on check out.\n_BLANK_:FIC - causes an item that has no location to be updated into the Fiction location on check out.\nFIC: _BLANK_ - causes an item in location FIC to be updated to a blank location on check out.\n_ALL_:FIC - causes all items to be updated into the Fiction location on check out.\nPROC: _PERM_ - causes an item that is in the Processing Center to be updated to it''s permanent location.\n\nGeneral rule: if the location value on the left matches the item''s current location, it will be updated to match the location value on the right.\nNote: PROC and CART are special values, for these locations only can location and permanent_location differ, in all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout.\n\nThe special term _BLANK_ may be used on either side of a value pair to update or remove the location from items with no location assigned.\nThe special term _ALL_ is used on the left side of the colon (:) to affect all items.\nThe special term _PERM_ is used on the right side of the colon (:) to return items to their permanent location.', 'Free') }); + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('UpdateItemLocationOnCheckout', '', 'NULL', 'This is a list of value pairs.\n Examples:\n\nPROC: FIC - causes an item in the Processing Center location to be updated into the Fiction location on check out.\nFIC: GEN - causes an item in the Fiction location to be updated into the General stacks location on check out.\n_BLANK_:FIC - causes an item that has no location to be updated into the Fiction location on check out.\nFIC: _BLANK_ - causes an item in location FIC to be updated to a blank location on check out.\n_ALL_:FIC - causes all items to be updated into the Fiction location on check out.\nPROC: _PERM_ - causes an item that is in the Processing Center to be updated to it''s permanent location.\n\nGeneral rule: if the location value on the left matches the item''s current location, it will be updated to match the location value on the right.\nNote: PROC and CART are special values, for these locations only can location and permanent_location differ, in all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout.\n\nThe special term _BLANK_ may be used on either side of a value pair to update or remove the location from items with no location assigned.\nThe special term _ALL_ is used on the left side of the colon (:) to affect all items.\nThe special term _PERM_ is used on the right side of the colon (:) to return items to their permanent location.', 'Free') }); }, }; -- 2.20.1