# small script that builds the tag cloud
use strict;
+#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
eval { require "$FindBin::Bin/../kohalib.pl" };
}
+use Koha::Script -cron;
use C4::Koha;
use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
use Date::Calc;
use Time::HiRes qw(gettimeofday);
use ZOOM;
use MARC::File::USMARC;
use Getopt::Long;
+use C4::Log;
+
my ( $input_marc_file, $number) = ('',0);
-my ($version, $confirm,$test_parameter,$field,$batch,$max_digits,$cloud_tag);
+my ($version, $confirm,$field,$batch,$max_digits,$cloud_tag);
GetOptions(
'c' => \$confirm,
'h' => \$version,
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;
+cronlogaction();
+
my $dbh = C4::Context->dbh;
my $i=0;
#now, parse the record, extract the item fields, and store them in somewhere else.
my $Koharecord;
eval{
- $Koharecord = GetMarcBiblio($biblionumber);
+ $Koharecord = GetMarcBiblio({ biblionumber => $biblionumber });
};
if($@){
warn 'pb when getting biblio '.$i.' : '.$@;
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') {
+ if (C4::Context->preference('OPACLanguages') =~ m/^fr/i && $browser_tag eq '676' & $browser_subfield eq 'a') {
$classification = dewey_french();
}