From 401ae9557a62ac43e1c98b19da36a5991ddb4536 Mon Sep 17 00:00:00 2001 From: Mirko Tietgen Date: Thu, 13 Dec 2012 23:37:58 +0100 Subject: [PATCH] Bug 9201 OAI-PMH mapping value cannot be 0 Allow the value of a OAI set mapping to be 0 / empty. Delete the mapping if field or subfield are empty. Signed-off-by: Jonathan Druart Now it is possible to add a value == 0 or an empty string. Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- admin/oai_set_mappings.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl index 1a9762c767..fb4ee281e5 100755 --- a/admin/oai_set_mappings.pl +++ b/admin/oai_set_mappings.pl @@ -60,7 +60,7 @@ if($op && $op eq "save") { my @mappings; my $i = 0; while($i < @marcfields and $i < @marcsubfields and $i < @marcvalues) { - if($marcfields[$i] and $marcsubfields[$i] and $marcvalues[$i]) { + if($marcfields[$i] and $marcsubfields[$i]) { push @mappings, { marcfield => $marcfields[$i], marcsubfield => $marcsubfields[$i], -- 2.39.5