=head1 CGI PARAMETERS
-=item PGTIOU
+=head2 PGTIOU
The Proxy Granting Ticket IOU the CAS Server returned to us when we gave him the Service Ticket
This PGTIOU will allow us to retrive the matching PGTID
if (C4::Context->preference('marcflavour') eq "UNIMARC"){
$record->leader(' nac 22 1u 4500');
- my $string= ($time=~m/([0-9\-]+)/) ? $1 : undef
+ my @time = localtime(time);
+ my $time = sprintf('%04d%02d%02d', $time[5] + 1900, $time[4] + 1, $time[3]);
+ my $string= ($time=~m/([0-9\-]+)/) ? $1 : undef;
$string=~s/\-//g;
$string = sprintf("%-*s",26, $string);
substr($string,9,6,"frey50");
# if (C4::Context->preference('marcflavour') eq "UNIMARC"){
$record->leader(' nac 22 1u 4500');
- my $string = ($time=~m/([0-9\-]+)/) ? $1 : undef
+ my @time = localtime(time);
+ my $time = sprintf('%04d%02d%02d', $time[5] + 1900, $time[4] + 1, $time[3]);
+ my $string = ($time=~m/([0-9\-]+)/) ? $1 : undef;
$string=~s/\-//g;
$string = sprintf("%-*s",26, $string);
substr($string,9,6,"frey50");
# adding marc xml, just for convenience
$dbh->do('ALTER TABLE `biblioitems` ADD `marcxml` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ');
# moving data from marc_subfield_value to biblio
-$sth = $dbh->prepare('select bibid,biblionumber from marc_biblio');
+my $sth = $dbh->prepare('select bibid,biblionumber from marc_biblio');
$sth->execute;
my $sth_update = $dbh->prepare('update biblioitems set marc=?, marcxml=? where biblionumber=?');
my $totaldone=0;
$sth_update->execute($record->as_usmarc(),$record->as_xml_record($marcflavour),$biblionumber);
$totaldone++;
print ".";
- print "\r$totaldone / $totaltodo" unless ($totaldone % 100);
+ print "\r$totaldone" unless ($totaldone % 100);
}
print "\rdone\n";
}
if (C4::Context->preference('marcflavour')=~/unimarc/i){
$record->leader(' nac 22 1u 4500');
- $update=1;
my $string;
if ($record->field(100)) {
$string = substr($record->subfield(100,"a")." ",0,35);
=head1 NAME
- reports/reserve_stats.pl
+reports/reserve_stats.pl
=head1 DESCRIPTION
- Plugin that shows reserve stats
+Plugin that shows reserve stats
=cut
=cut
+my $myhost;
+my $mydomain;
if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) {
( $mydomain = $myhost ) =~ s/.*?\.//;
} else {
$mydomain = 'localdomain';
}
+my $myip;
unless ( $myip = $ENV{WEBSERVER_IP} ) {
my $byname = gethostbyname( $myhost )
or die "Could not get the IP address of $myhost, DNS fault? ($!)";
}
-$prefix = $ENV{'INSTALL_BASE'} || "/usr";
+my $prefix = $ENV{'INSTALL_BASE'} || "/usr";
# These are our configuration guesses
# Keys were extracted by
# <grep -o '__.*__' etc/* | cut -f2 -d: | sort -u | sed -e 's/^/ "/;s/$/" => "",/'
-%configuration = (
+my %configuration = (
"__KOHA_INSTALLED_VERSION__" => "no_version_found",
"__LOG_DIR__" => "/var/log",
"__PLUGINS_DIR__" => "/var/lib/koha/plugins",
$configuration{'__PAZPAR2_TOGGLE_XML_POST__'} = '';
}
-$fname = $ARGV[0];
-$file = &read_file($fname);
+my $fname = $ARGV[0];
+my $file = &read_file($fname);
$file =~ s/__.*?__/exists $configuration{$&} ? $configuration{$&} : $&/seg;
# At this point, file is in 'blib' and by default
$marc21_utf8 =~ s/\n$//;
close $MARC21UTF8;
-open(my $MARC21MARC8COMBCHARS, '<', WHEREAMI."/marc21_marc8_combining_chars.dat" or die $!;
+open(my $MARC21MARC8COMBCHARS, '<', WHEREAMI."/marc21_marc8_combining_chars.dat") or die $!;
my $marc21_marc8_combining_chars;
foreach my $line(<$MARC21MARC8COMBCHARS>) {
$marc21_marc8_combining_chars.=$line;