[Koha-patches] [PATCH 17/55] Minor bug fix rebuild_zebra

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Mar 10 22:25:59 CET 2010


From: Paul Poulain <paul.poulain at biblibre.com>

removing only is2709 for authorities
rebuild_zebra minor bug fixing

Testing if exported value is a defined record
---
 misc/migration_tools/rebuild_zebra.pl |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl
index 0f4b4a0..ec21e18 100755
--- a/misc/migration_tools/rebuild_zebra.pl
+++ b/misc/migration_tools/rebuild_zebra.pl
@@ -62,12 +62,6 @@ if (not $biblios and not $authorities) {
     die $msg;
 }
 
-if ($authorities and $as_xml) {
-    my $msg = "Cannot specify both -a and -x\n";
-    $msg   .= "Please do '$0 --help' to see usage.\n";
-    die $msg;
-}
-
 if ( !$as_xml and $nosanitize ) {
     my $msg = "Cannot specify both -no_xml and -nosanitize\n";
     $msg   .= "Please do '$0 --help' to see usage.\n";
@@ -424,7 +418,11 @@ sub get_raw_marc_record {
             return;
         }
     }
-    return $marc;
+    if ($marc->fields()){
+        return $marc;
+    } else {
+        return undef;
+    }
 }
 
 sub fix_leader {
-- 
1.6.3.3




More information about the Koha-patches mailing list