In rebuild_zebra.pl, if we are in "unimarc" ("marcflavour" syspref), the sub 
"fix_unimarc_100" is called and checks if 100$a lenght is equal to 35.
If it is not the case, the sub inserts the localtime and more, so we loose the 
datas in reindexing.
The standart lenght is 36.
I have just changed 35 to 36.
---
 misc/migration_tools/rebuild_zebra.pl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc/migration_tools/rebuild_zebra.pl 
b/misc/migration_tools/rebuild_zebra.pl
index 655b6d4..f765d00 100755
--- a/misc/migration_tools/rebuild_zebra.pl
+++ b/misc/migration_tools/rebuild_zebra.pl
@@ -562,7 +562,7 @@ sub fix_unimarc_100 {
     my $marc = shift;
 
     my $string;
-    if ( length($marc->subfield( 100, "a" )) == 35 ) {
+    if ( length($marc->subfield( 100, "a" )) == 36 ) {
         $string = $marc->subfield( 100, "a" );
         my $f100 = $marc->field(100);
         $marc->delete_field($f100);
@@ -573,7 +573,7 @@ sub fix_unimarc_100 {
         $string = sprintf( "%-*s", 35, $string );
     }
     substr( $string, 22, 6, "frey50" );
-    unless ( length($marc->subfield( 100, "a" )) == 35 ) {
+    unless ( length($marc->subfield( 100, "a" )) == 36 ) {
         $marc->delete_field($marc->field(100));
         $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => 
$string ));
     }
-- 
1.7.9.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to