From f2031566bbba2de944fa64320ec9411a9bec4212 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Fri, 5 Oct 2007 04:39:37 -0500 Subject: [PATCH] #1447 : avoid a SQL message when filling the table Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- misc/cronjobs/build_browser_and_cloud.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/build_browser_and_cloud.pl b/misc/cronjobs/build_browser_and_cloud.pl index ecce40e7e4..02ddcb0e9b 100755 --- a/misc/cronjobs/build_browser_and_cloud.pl +++ b/misc/cronjobs/build_browser_and_cloud.pl @@ -37,7 +37,7 @@ if ($version || (!$confirm)) { export PERL5LIB=/path/to/koha;export KOHA_CONF=/etc/koha.xml;./build_browser_and_cloud.pl -b -f 676a -t 606 -c EOF ; -die; +exit; } ################################## @@ -121,6 +121,7 @@ if ($browser_tag) { if (C4::Context->preference('opaclanguages') eq 'fr' && $browser_tag eq '676' & $browser_subfield eq 'a') { $classification = dewey_french(); } + foreach (keys %browser_result) { my $father = substr($_,0,-1); $browser_result{$father}->{notendnode}=1; @@ -128,7 +129,7 @@ if ($browser_tag) { $dbh->do("truncate browser"); my $sth = $dbh->prepare("insert into browser (level,classification,description,number,endnode) values (?,?,?,?,?)"); foreach (keys %browser_result) { - $sth->execute(length($_),$_,$classification->{$_}?$classification->{$_}:"classification $_",$browser_result{$_}->{value},$browser_result{$_}->{notendnode}?0:1); + $sth->execute(length($_),$_,$classification->{$_}?$classification->{$_}:"classification $_",$browser_result{$_}->{value},$browser_result{$_}->{notendnode}?0:1) if $browser_result{$_}->{value}; } } -- 2.39.5