From 057d654a5b0134a643671a2054d9a320c48aee75 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Tue, 9 Oct 2007 16:46:49 -0500 Subject: [PATCH] skipping wrong XMLs when rebuilding nozebra indexes Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- misc/migration_tools/rebuild_nozebra.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/misc/migration_tools/rebuild_nozebra.pl b/misc/migration_tools/rebuild_nozebra.pl index 4861b516b0..4ddb2f8146 100755 --- a/misc/migration_tools/rebuild_nozebra.pl +++ b/misc/migration_tools/rebuild_nozebra.pl @@ -83,16 +83,17 @@ $sth->execute(); my $i=0; my %result; while (my ($biblionumber) = $sth->fetchrow) { - $i++; - print "\r$i"; - my $record; - eval{ - $record = GetMarcBiblio($biblionumber); - }; - if($@){ - print " There was some pb getting biblionumber : ".$biblionumber."\n"; - next; - } + $i++; + print "\r$i"; + my $record; + eval{ + $record = GetMarcBiblio($biblionumber); + }; + if($@){ + print " There was some pb getting biblionumber : ".$biblionumber."\n"; + next; + } + next unless $record; # get title of the record (to store the 10 first letters with the index) my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title'); my $title = lc($record->subfield($titletag,$titlesubfield)); -- 2.39.2