@@ -, +, @@ --- docs/CAS/CASProxy/examples/proxy_cas_data.pl | 2 +- misc/migration_tools/22_to_30/export_Authorities.pl | 4 +++- .../22_to_30/export_Authorities_xml.pl | 4 +++- .../22_to_30/move_marc_to_biblioitems.pl | 5 ++--- reports/reserves_stats.pl | 4 ++-- rewrite-config.PL | 11 +++++++---- t/db_dependent/Record/Record.t | 2 +- 7 files changed, 19 insertions(+), 13 deletions(-) --- a/docs/CAS/CASProxy/examples/proxy_cas_data.pl +++ a/docs/CAS/CASProxy/examples/proxy_cas_data.pl @@ -23,7 +23,7 @@ =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 --- a/misc/migration_tools/22_to_30/export_Authorities.pl +++ a/misc/migration_tools/22_to_30/export_Authorities.pl @@ -31,7 +31,9 @@ while (my ($authid,$authtypecode)=$rq->fetchrow){ 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"); --- a/misc/migration_tools/22_to_30/export_Authorities_xml.pl +++ a/misc/migration_tools/22_to_30/export_Authorities_xml.pl @@ -30,7 +30,9 @@ open my $fileoutput, '>:encoding(UTF-8)', "./$filename/$authid.xml" or die "unab # 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"); --- a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl +++ a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl @@ -26,7 +26,7 @@ $dbh->do('ALTER TABLE `biblioitems` CHANGE `marc` `marc` LONGBLOB NULL DEFAULT N # 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; @@ -46,7 +46,7 @@ while (my ($bibid,$biblionumber) = $sth->fetchrow) { $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"; @@ -149,7 +149,6 @@ sub LocalMARCgetbiblio { } 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); --- a/reports/reserves_stats.pl +++ a/reports/reserves_stats.pl @@ -38,11 +38,11 @@ use YAML; =head1 NAME - reports/reserve_stats.pl +reports/reserve_stats.pl =head1 DESCRIPTION - Plugin that shows reserve stats +Plugin that shows reserve stats =cut --- a/rewrite-config.PL +++ a/rewrite-config.PL @@ -60,6 +60,8 @@ also need to override WEBSERVER_IP. =cut +my $myhost; +my $mydomain; if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) { ( $mydomain = $myhost ) =~ s/.*?\.//; } else { @@ -67,6 +69,7 @@ if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) { $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? ($!)"; @@ -75,12 +78,12 @@ unless ( $myip = $ENV{WEBSERVER_IP} ) { } -$prefix = $ENV{'INSTALL_BASE'} || "/usr"; +my $prefix = $ENV{'INSTALL_BASE'} || "/usr"; # These are our configuration guesses # Keys were extracted by # "",/' -%configuration = ( +my %configuration = ( "__KOHA_INSTALLED_VERSION__" => "no_version_found", "__LOG_DIR__" => "/var/log", "__PLUGINS_DIR__" => "/var/lib/koha/plugins", @@ -172,8 +175,8 @@ if ($configuration{'__INSTALL_PAZPAR2__'} eq 'yes') { $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 --- a/t/db_dependent/Record/Record.t +++ a/t/db_dependent/Record/Record.t @@ -61,7 +61,7 @@ foreach my $line (<$MARC21UTF8>) { $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; --