[Koha-patches] [PATCH] Silence extraneous messages when in batch mode on build_browser_and_cloud.pl

J. David Bavousett dbavousett at ptfs.com
Fri Sep 18 15:49:40 CEST 2009


The script already has a param -b for batch mode, which should silence informational
messages, but it missed a couple.  This patch fixes that.
---
 misc/cronjobs/build_browser_and_cloud.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc/cronjobs/build_browser_and_cloud.pl b/misc/cronjobs/build_browser_and_cloud.pl
index 05ea3fb..e1873c8 100755
--- a/misc/cronjobs/build_browser_and_cloud.pl
+++ b/misc/cronjobs/build_browser_and_cloud.pl
@@ -56,7 +56,7 @@ $max_digits=3 unless $max_digits;
 $field =~ /(\d\d\d)(.?)/;
 my $browser_tag = $1;
 my $browser_subfield = $2;
-warn "browser : $browser_tag / $browser_subfield";
+warn "browser : $browser_tag / $browser_subfield" unless $batch;
 die "no cloud or browser field/subfield defined : nothing to do !" unless $browser_tag or $cloud_tag;
 
 my $dbh = C4::Context->dbh;
@@ -116,7 +116,7 @@ while ((my ($biblionumber)= $sth->fetchrow)) {
                 $cloud_result{$line}++;
             }
         }else{
-            print "!";
+            print "!" unless $batch;
         }
     }
 
@@ -126,7 +126,7 @@ while ((my ($biblionumber)= $sth->fetchrow)) {
 
 # fills the browser table
 if ($browser_tag) {
-    print "inserting datas in browser table\n";
+    print "inserting datas in browser table\n" unless $batch;
     # read existing classification table is possible
     my $classification;
     if (C4::Context->preference('opaclanguages') =~ m/^fr/i && $browser_tag eq '676' & $browser_subfield eq 'a') {
-- 
1.5.6.5




More information about the Koha-patches mailing list