[Koha-patches] [PATCH] [bug 4935] fixed ability to unset statuses such as "lost" or "damaged"

Liz Rea lrea at nekls.org
Thu Sep 30 16:49:01 CEST 2010


---
 tools/batchMod.pl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/batchMod.pl b/tools/batchMod.pl
index e85f45a..b183487 100755
--- a/tools/batchMod.pl
+++ b/tools/batchMod.pl
@@ -319,6 +319,7 @@ foreach my $tag (sort keys %{$tagslib}) {
               push @authorised_values, $value; 
               $authorised_lib{$value} = $lib;
           }
+		$value = '';
       }
       $subfield_data{marc_value} =CGI::scrolling_list(      # FIXME: factor out scrolling_list
           -name     => "field_value",
@@ -500,9 +501,9 @@ sub UpdateMarcWith($$){
 	my @fields_to=$marcto->field($itemtag);
     foreach my $subfield ($fieldfrom->subfields()){
 		foreach my $field_to_update (@fields_to){
-				if ($$subfield[0] or $$subfield[0]=0) {
+				if ($$subfield[0]!='' or $$subfield[0]=='0') {
 				$field_to_update->update($$subfield[0]=>$$subfield[1]);
-			}
+			} 
 		}
     }
   #warn "TO edited:",$marcto->as_formatted;
-- 
1.5.6.5



More information about the Koha-patches mailing list