[Patches] [PATCH] [SIGNED-OFF] Bug 6475 - Edit it's not possible in subfield "0" in MARC framework

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Sat Nov 12 04:55:03 NZDT 2011


From: Salvador Zaragoza Rubio <salvazm at masmedios.com>
Date: Wed, 22 Jun 2011 18:18:40 +0200
Subject: [PATCH] [SIGNED-OFF] Bug 6475 - Edit it's not possible in subfield "0" in MARC framework
Content-Type: text/plain; charset="utf-8"

When trying to modify the subfield "0" on a field in the
MARC subfield structure admin -> Tag xxx Subfield Constraints,
the boolean condition on liblibrarian fails for the initial "0" value.
Modified condition to allow the value "0"

Signed-off-by: Owen Leonard <oleonard at myacpl.org>
---
 admin/marc_subfields_structure.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl
index 0049376..2c69733 100755
--- a/admin/marc_subfields_structure.pl
+++ b/admin/marc_subfields_structure.pl
@@ -426,7 +426,7 @@ elsif ( $op eq 'add_validate' ) {
         my $link   = $link[$i];
         my $defaultvalue = $defaultvalue[$i];
         
-        if ($liblibrarian) {
+        if (defined($liblibrarian) && $liblibrarian ne "") {
             unless ( C4::Context->config('demo') eq 1 ) {
                 if (marc_subfield_structure_exists($tagfield, $tagsubfield, $frameworkcode)) {
                     $sth_update->execute(
-- 
1.7.3




More information about the Patches mailing list