From 5aa0fca7fac93241c07e3568ddc2c73ec54c8c3d Mon Sep 17 00:00:00 2001 From: arensb Date: Sun, 13 Oct 2002 10:43:54 +0000 Subject: [PATCH] Removed trailing whitespace. --- circ/circulation.pl | 32 ++++++++-------- circ/returns.pl | 41 ++++++-------------- circ/selectbranchprinter.pl | 6 +-- marc/File.pm | 6 +-- marc/MARCdetail.pl | 8 ++-- marc/USMARC.pm | 14 +++---- misc/fines2.pl | 12 +++--- misc/fixborrower.pl | 30 +++++++-------- misc/fixorders.pl | 2 +- misc/makebaskets.pl | 4 +- misc/makeformats.pl | 2 +- opac/opac-detail.pl | 2 +- opac/opac-moredetail.pl | 26 ++++++------- opac/opac-reserve.pl | 2 +- opac/opac-search.pl | 2 +- opac/opac-searchresults.pl | 2 +- opac/opac-user.pl | 10 ++--- opac/opac-userupdate.pl | 4 +- sec/writeoff.pl | 2 +- telnet/issuewrapper.pl | 6 +-- telnet/returnswrapper.pl | 6 +-- telnet/startint.pl | 76 ++++++++++++++++++------------------- translator/translator.pl | 14 +++---- 23 files changed, 146 insertions(+), 163 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 897530cb0a..1851f6a4f6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -86,8 +86,8 @@ if ($findborrower) { } } -my $borrowernumber = $query->param('borrnumber'); -my $bornum = $query->param('borrnumber'); +my $borrowernumber = $query->param('borrnumber'); +my $bornum = $query->param('borrnumber'); # check and see if we should print my $print=$query->param('print'); my $barcode = $query->param('barcode'); @@ -95,11 +95,11 @@ if ($barcode eq '' && $print eq 'maybe'){ $print = 'yes'; } if ($print eq 'yes' && $borrowernumber ne ''){ - printslip(\%env,$borrowernumber); + printslip(\%env,$borrowernumber); $query->param('borrnumber',''); $borrowernumber=''; } - + # get the borrower information..... @@ -137,7 +137,7 @@ if ($barcode) { $env{'datedue'}=$datedue; my @time=localtime(time); my $date= (1900+$time[5])."-".($time[4]+1)."-".$time[3]; - ($iteminformation, $duedate, $rejected, $question, $questionnumber, $defaultanswer, $message) + ($iteminformation, $duedate, $rejected, $question, $questionnumber, $defaultanswer, $message) = issuebook(\%env, $borrower, $barcode, \%responses, $date); } } @@ -200,7 +200,7 @@ my $title = <<"EOF";  Transfers Circulation: Issues
-Branch: $branches->{$branch}->{'branchname'}   +Branch: $branches->{$branch}->{'branchname'}   Printer: $printers->{$printer}->{'printername'}
Change Settings @@ -215,7 +215,7 @@ my $titlenoborrower = <<"EOF";  Transfers Circulation: Issues
-Branch: $branches->{$branch}->{'branchname'}   +Branch: $branches->{$branch}->{'branchname'}   Printer: $printers->{$printer}->{'printername'}
Change Settings @@ -248,8 +248,8 @@ if ($question) { -
Issuing Question
\n"; } else { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } } else { $flaginfotext.="\n"; diff --git a/circ/returns.pl b/circ/returns.pl index 4463d51f38..7ed59cb688 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -152,8 +152,7 @@ if ($barcode) { # title.... my $title = <<"EOF"; Circulation: Returns
-Branch: $branches->{$branch}->{'branchname'}   -Printer: $printers->{$printer}->{'printername'}
+Branch: $branches->{$branch}->{'branchname'}  Printer: $printers->{$printer}->{'printername'}
Change Settings @@ -220,19 +219,16 @@ $ritext EOF - } - if ($res->{'ResFound'} eq "Reserved") { + } if ($res->{'ResFound'} eq "Reserved") { my @da = localtime(time()); my $todaysdate = sprintf ("%0.2d", ($da[3]+1))."/".sprintf ("%0.2d", ($da[4]+1))."/".($da[5]+1900); my $slip = <<"EOF"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Date: $todaysdate; -ITEM RESERVED: -$iteminfo->{'title'} ($iteminfo->{'author'}) +ITEM RESERVED:$iteminfo->{'title'} ($iteminfo->{'author'}) barcode: $iteminfo->{'barcode'} -itemtype: $iteminfo->{'itemtype'} - +itemtype: $iteminfo->{'itemtype'} COLLECT AT: $branchname BORROWER: @@ -252,8 +248,7 @@ EOF Reserve found: Item: $iteminfo->{'title'} ($iteminfo->{'author'}) {'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$barcode
for $name ($number) to be collected at $branchname.
-Attempting to issue $iteminformation->{'title'} +
EOF - } + } # FIXME - For small and private libraries, it'd be nice if this # table included a "Return" link next to each book, so that you # don't have to remember the book's bar code and type it in on the @@ -431,7 +431,7 @@ EOF my $dd = $book->{'date_due'}; my $datedue = $book->{'date_due'}; #convert to nz style dates - #this should be set with some kinda config variable + #this should be set with some kinda config variable my @tempdate=split(/-/,$dd); $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]"; $datedue=~s/-//g; @@ -553,8 +553,8 @@ sub cuecatbarcodedecode { return $results[2]; } else { return $barcode; - } -} + } +} sub fixdate { my ($year, $month, $day) = @_; @@ -618,13 +618,13 @@ sub patrontable { ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0); $itemswaiting.="\n"; - } + } } $itemswaiting.="
+Attempting to issue $iteminformation->{'title'} by $iteminformation->{'author'} to $borrower->{'firstname'} $borrower->{'surname'}.

$question @@ -406,7 +406,7 @@ if ($borrower) { my $dd = $book->{'date_due'}; my $datedue = $book->{'date_due'}; #convert to nz style dates - #this should be set with some kinda config variable + #this should be set with some kinda config variable my @tempdate=split(/-/,$dd); $dd="$tempdate[2]/$tempdate[1]/$tempdate[0]"; $datedue=~s/-//g; @@ -422,7 +422,7 @@ if ($borrower) {

$book->{'author'} $book->{'dewey'} $book->{'subclass'}
$iteminformation->{'date_due'}{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'}$iteminformation->{'title'}
\n"; if ($query->param('module') ne 'returns'){ $flaginfotext.="
$flag$flags->{$flag}->{'message'}, See below
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
- + EOF @@ -336,13 +330,10 @@ EOF $displayflag = "$flag"; } else { $displayflag = $flag; - } - if ($flag eq 'CHARGES') { + } if ($flag eq 'CHARGES') { $flaginfotext.= <<"EOF"; - + EOF } elsif ($flag eq 'WAITING') { my $itemswaiting=''; @@ -350,10 +341,7 @@ EOF foreach my $item (@$items) { my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0); $itemswaiting .= <<"EOF"; -{'biblionumber'}&type=intra -onClick="openWindow(this, 'Item', 480, 640)">$iteminformation->{'barcode'} -$iteminformation->{'title'} -($branches->{$iteminformation->{'holdingbranch'}}->{'branchname'})
+{'biblionumber'}&type=intraonClick="openWindow(this, 'Item', 480, 640)">$iteminformation->{'barcode'}$iteminformation->{'title'}($branches->{$iteminformation->{'holdingbranch'}}->{'branchname'})
EOF } $flaginfotext.="\n"; @@ -364,9 +352,7 @@ EOF my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0); $itemsoverdue .= <<"EOF"; $item->{'date_due'} -{'biblionumber'}&type=intra -onClick="openWindow(this, 'Item', 480, 640)">$iteminformation->{'barcode'} -$iteminformation->{'title'} +{'biblionumber'}&type=intraonClick="openWindow(this, 'Item', 480, 640)">$iteminformation->{'barcode'}$iteminformation->{'title'}
EOF } @@ -382,8 +368,7 @@ EOF $borrowertable .= << "EOF"; -$flaginfotext -EOF +$flaginfotextEOF } $borrowertable .= "
Change status to waiting and print -slip?:
Change status to waiting and printslip?:
$ritext @@ -321,8 +316,7 @@ if ($borrower) {
Borrower Information
-{'borrowernumber'} -onClick="openWindow(this,'Member', 480, 640)">$borrower->{'cardnumber'} +{'borrowernumber'}onClick="openWindow(this,'Member', 480, 640)">$borrower->{'cardnumber'} $borrower->{'surname'}, $borrower->{'title'} $borrower->{'firstname'}
$displayflag$flags->{$flag}->{'message'} -{'borrowernumber'} -onClick="openWindow(this, 'Payment', 480,640)">Payment
$flags->{$flag}->{'message'}{'borrowernumber'}onClick="openWindow(this, 'Payment', 480,640)">Payment
$displayflag$itemswaiting
Flags
"; } @@ -503,6 +488,4 @@ sub cuecatbarcodedecode { return $results[2]; } else { return $barcode; - } -} - + }} diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index a8d5794cc1..e5feb6237a 100644 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -26,7 +26,7 @@ use C4::Print; use DBI; -# this is a reorganisation of circulationold.pl +# this is a reorganisation of circulationold.pl # dividing it up into three scripts...... # this will be the first one that chooses branch and printer settings.... @@ -105,7 +105,7 @@ if ($printercount>1) { EOF } else { my ($printer) = keys %$printers; -} +} if ($branchcount>1) { $branchform=<<"EOF"; @@ -113,7 +113,7 @@ if ($branchcount>1) { EOF } else { my ($branch) = keys %$branches; -} +} diff --git a/marc/File.pm b/marc/File.pm index 1a33ef908c..e6624d572c 100644 --- a/marc/File.pm +++ b/marc/File.pm @@ -47,7 +47,7 @@ our $VERSION = '0.93'; use MARC::File::USMARC; my $file = MARC::File::USMARC->in( $filename ); - + while ( my $marc = $file->next() ) { # Do something } @@ -56,7 +56,7 @@ our $VERSION = '0.93'; =head1 EXPORT -None. +None. =head1 METHODS @@ -191,7 +191,7 @@ We only handle files for input right now. =head1 LICENSE -This code may be distributed under the same terms as Perl itself. +This code may be distributed under the same terms as Perl itself. Please note that these modules are not products of or supported by the employers of the various contributors to the code. diff --git a/marc/MARCdetail.pl b/marc/MARCdetail.pl index 0451a8bbc2..ef6e99f563 100755 --- a/marc/MARCdetail.pl +++ b/marc/MARCdetail.pl @@ -27,9 +27,9 @@ use C4::Search; use MARC::Record; use C4::Biblio; use C4::Catalogue; - + my $query=new CGI; - + my $biblionumber=$query->param('bib'); my $tag=$query->param('tag'); if (! defined $tag) { $tag='2XX';} @@ -65,10 +65,10 @@ sub showmarcrecord { # print $field->tag(), " ", $field->indicator(1),$field->indicator(2), "subf: ", $subf[$i][0]," =",$subf[$i][1]," <-- \n"; } } - + # fill template with arrays $template->param(biblionumber => $biblionumber); $template->param(marc =>\@loop_data); print "Content-Type: text/html\n\n", $template->output; - + } diff --git a/marc/USMARC.pm b/marc/USMARC.pm index beb4a76dd8..bb0451bd00 100644 --- a/marc/USMARC.pm +++ b/marc/USMARC.pm @@ -56,7 +56,7 @@ use constant DIRECTORY_ENTRY_LEN => 12; use MARC::File::USMARC; my $file = MARC::File::USMARC::in( $filename ); - + while ( my $marc = $file->next() ) { # Do something } @@ -65,7 +65,7 @@ use constant DIRECTORY_ENTRY_LEN => 12; =head1 EXPORT -None. +None. =head1 METHODS @@ -146,7 +146,7 @@ sub decode { # Shouldn't be any non-digits anywhere in any directory entry my @directory = unpack( "A3 A4 A5" x $nfields, $dir ); my @bad = grep /\D/, @directory; - if ( @bad ) { + if ( @bad ) { return $marc->_gripe( "Non-numeric entries in the tag directory: ", join( ", ", map { "\"$_\"" } @bad ) ); } @@ -200,7 +200,7 @@ sub decode { =head2 update_leader() If any changes get made to the MARC record, the first 5 bytes of the -leader (the length) will be invalid. This function updates the +leader (the length) will be invalid. This function updates the leader with the correct length of the record as it would be if written out to a file. @@ -246,14 +246,14 @@ sub _build_tag_directory { $dataend += $len; } - my $baseaddress = + my $baseaddress = LEADER_LEN + # better be 24 ( @directory * DIRECTORY_ENTRY_LEN ) + # all the directory entries 1; # end-of-field marker - my $total = + my $total = $baseaddress + # stuff before first field $dataend + # Length of the fields 1; # End-of-record marker @@ -297,7 +297,7 @@ use DBD::Oracle or DBD::Mysql. =head1 LICENSE -This code may be distributed under the same terms as Perl itself. +This code may be distributed under the same terms as Perl itself. Please note that these modules are not products of or supported by the employers of the various contributors to the code. diff --git a/misc/fines2.pl b/misc/fines2.pl index 00f9197943..02bc13d87c 100755 --- a/misc/fines2.pl +++ b/misc/fines2.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # This script loops through each overdue item, determines the fine, -# and updates the total amount of fines due by each user. It relies on +# and updates the total amount of fines due by each user. It relies on # the existence of /tmp/fines, which is created by ??? # Doesnt really rely on it, it relys on being able to write to /tmp/ # It creates the fines file @@ -80,7 +80,7 @@ my $maxFine=5; # for (my $i=0;$i<$numOverdueItems;$i++){ my @dates=split('-',$data->[$i]->{'date_due'}); - my $date2=Date_DaysSince1BC($dates[1],$dates[2],$dates[0]); + my $date2=Date_DaysSince1BC($dates[1],$dates[2],$dates[0]); my $due="$dates[2]/$dates[1]/$dates[0]"; my $borrower=BorType($data->[$i]->{'borrowernumber'}); if ($date2 <= $date){ @@ -89,7 +89,7 @@ for (my $i=0;$i<$numOverdueItems;$i++){ my ($amount,$type,$printout)= CalcFine($data->[$i]->{'itemnumber'}, $borrower->{'categorycode'}, - $difference); + $difference); if ($amount > $maxFine){ $amount=$maxFine; } @@ -118,8 +118,8 @@ for (my $i=0;$i<$numOverdueItems;$i++){ } print "$printout\t$borrower->{'cardnumber'}\t$borrower->{'categorycode'}\t$borrower->{'firstname'}\t$borrower->{'surname'}\t$data->[$i]->{'date_due'}\t$type\t$difference\t$borrower->{'emailaddress'}\t$borrower->{'phone'}\t$borrower->{'streetaddress'}\t$borrower->{'city'}\t$amount\n"; } else { # FIXME - # if this is really useless, the whole else clause should be - # deleted. + # if this is really useless, the whole else clause should be + # deleted. # # print "$borrower->{'cardnumber'}\t$borrower->{'categorycode'}\t0 fine\n"; } @@ -128,7 +128,7 @@ for (my $i=0;$i<$numOverdueItems;$i++){ # my $borrower=BorType($data->[$i]->{'borrowernumber'}); if ($borrower->{'cardnumber'} ne ''){ - my $cost=ReplacementCost($data->[$i]->{'itemnumber'}); + my $cost=ReplacementCost($data->[$i]->{'itemnumber'}); my $dbh = C4::Context->dbh; my $env; my $accountno=C4::Circulation::Circ2::getnextacctno($env,$data->[$i]->{'borrowernumber'},$dbh); diff --git a/misc/fixborrower.pl b/misc/fixborrower.pl index 018641ed32..be091d84b8 100755 --- a/misc/fixborrower.pl +++ b/misc/fixborrower.pl @@ -28,7 +28,7 @@ use strict; my $dbh = C4::Context->dbh; my $query = "Select * from categories where (categorycode like 'L%' or categorycode like 'F%' -or categorycode like 'S%' or categorycode like 'O%' or categorycode like 'H%') and (categorycode <>'HR' +or categorycode like 'S%' or categorycode like 'O%' or categorycode like 'H%') and (categorycode <>'HR' and categorycode <> 'ST')"; my $sth=$dbh->prepare($query); @@ -43,9 +43,9 @@ while (my $data=$sth->fetchrow_hashref){ my $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; - + $temp=substr($data->{'categorycode'},1,1); - $query="update borrowers set categorycode='$temp' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='$temp' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -54,10 +54,10 @@ while (my $data=$sth->fetchrow_hashref){ $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; - + } -$query = "Select * from categories where (categorycode like 'V%') and (categorycode <>'HR' +$query = "Select * from categories where (categorycode like 'V%') and (categorycode <>'HR' and categorycode <> 'ST')"; my $sth=$dbh->prepare($query); # FIXME - There's already a $sth in this scope @@ -73,7 +73,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->finish; my $temp=substr($data->{'categorycode'},1,1); - $query="update borrowers set categorycode='$temp' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='$temp' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -97,7 +97,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; - $query="update borrowers set categorycode='W' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='W' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -121,7 +121,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; - $query="update borrowers set categorycode='I' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='I' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -145,7 +145,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; - $query="update borrowers set categorycode='A' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='A' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -169,7 +169,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; - $query="update borrowers set categorycode='A' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='A' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -193,7 +193,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; - $query="update borrowers set categorycode='L' where categorycode='$data->{'categorycode'}'"; + $query="update borrowers set categorycode='L' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -216,8 +216,8 @@ while (my $data=$sth->fetchrow_hashref){ my $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; - - $query="update borrowers set categorycode='P' where categorycode='$data->{'categorycode'}'"; + + $query="update borrowers set categorycode='P' where categorycode='$data->{'categorycode'}'"; $sth2=$dbh->prepare($query); $sth2->execute; $sth2->finish; @@ -231,7 +231,7 @@ while (my $data=$sth->fetchrow_hashref){ $sth->finish; -my @queryValues = +my @queryValues = ("insert into categories values ('E','Senior Citizen',5,99,0,'A',0,0,0,99,1)", "insert into categories values ('A','Adult',5,99,0,'A',0,0,0,99,1)", "insert into categories values ('C','Child',5,16,0,'A',0,0,0,99,0)", @@ -241,7 +241,7 @@ my @queryValues = "insert into categories values ('I','Institution',5,99,0,'A',0,0,0,99,0)", "insert into categories values ('P','Privileged',5,99,0,'A',0,0,0,99,0)", "insert into categories values ('L','Library',5,99,0,'A',0,0,0,99,0)" - ); + ); foreach $query (@queryValues) { $sth=$dbh->prepare($query); diff --git a/misc/fixorders.pl b/misc/fixorders.pl index 57f04f2d4b..e85764cefd 100755 --- a/misc/fixorders.pl +++ b/misc/fixorders.pl @@ -28,7 +28,7 @@ $sth->execute; my $number; my $i=92000; while (my $data=$sth->fetchrow_hashref){ - if ($data->{'ordernumber'} != $number){ + if ($data->{'ordernumber'} != $number){ } else { my $query="update aqorders set ordernumber=$i where ordernumber=$data->{'ordernumber'} and biblionumber=$data->{'biblionumber'}"; my $sth2=$dbh->prepare($query); diff --git a/misc/makebaskets.pl b/misc/makebaskets.pl index e4def82555..3e0b745f4c 100755 --- a/misc/makebaskets.pl +++ b/misc/makebaskets.pl @@ -25,8 +25,8 @@ my $dbh = C4::Context->dbh; my $count=0; my $basket='HLT-'; for (my $i=1;$i<59;$i++){ - my $query = "Select authorisedby,entrydate from aqorders where booksellerid='$i'"; - $query.=" group by authorisedby,entrydate order by entrydate"; + my $query = "Select authorisedby,entrydate from aqorders where booksellerid='$i'"; + $query.=" group by authorisedby,entrydate order by entrydate"; my $sth=$dbh->prepare($query); $sth->execute; while (my $data=$sth->fetchrow_hashref){ diff --git a/misc/makeformats.pl b/misc/makeformats.pl index d99adb167f..66093238b4 100755 --- a/misc/makeformats.pl +++ b/misc/makeformats.pl @@ -45,6 +45,6 @@ while (my $data=$sth->fetchrow_hashref){ $sth2->execute; $sth2->finish; $bibitemno++ - + } $sth->finish; diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 2aaeb85fb3..11c3ee41b7 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -5,7 +5,7 @@ use C4::Output; # contains gettemplate use CGI; use C4::Search; use C4::Auth; - + my $query=new CGI; my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1); diff --git a/opac/opac-moredetail.pl b/opac/opac-moredetail.pl index 49b6b57c3f..4cc77b498f 100755 --- a/opac/opac-moredetail.pl +++ b/opac/opac-moredetail.pl @@ -43,14 +43,14 @@ my $count=@items; my $i=0; print center(); -my $dewey = $data->{'dewey'}; -$dewey =~ s/0+$//; -if ($dewey eq "000.") { $dewey = "";}; -if ($dewey < 10){$dewey='00'.$dewey;} -if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} +my $dewey = $data->{'dewey'}; +$dewey =~ s/0+$//; +if ($dewey eq "000.") { $dewey = "";}; +if ($dewey < 10){$dewey='00'.$dewey;} +if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} if ($dewey <= 0){ - $dewey=''; -} + $dewey=''; +} $dewey=~ s/\.$//; print < @@ -73,8 +73,8 @@ print <
- - + +
Biblionumber: $bib
@@ -97,7 +97,7 @@ printend ; if ($type eq 'catmain'){ print "
{'biblioitemnumber'}&bib=$data->{'biblionumber'}>Shift to another biblio"; - + } print < - +
@@ -122,8 +122,8 @@ print < {'itemnumber'}> - - + +
printend ; diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 86f5ab8268..3826f7c992 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -107,4 +107,4 @@ if ($query->param('bibitemsselected')) { $template->param(BIBLIOITEMS => \@data); $template->param(loggedinuser => $loggedinuser); -print "Content-Type: text/html\n\n", $template->output; +print "Content-Type: text/html\n\n", $template->output; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index cf6c7a35b3..200531c45f 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -2,7 +2,7 @@ use strict; require Exporter; -use C4::Output; +use C4::Output; use CGI; use C4::Auth; diff --git a/opac/opac-searchresults.pl b/opac/opac-searchresults.pl index 27f9aebe6a..e29c380291 100755 --- a/opac/opac-searchresults.pl +++ b/opac/opac-searchresults.pl @@ -5,7 +5,7 @@ use CGI; use C4::Search; use C4::Auth; use C4::Output; # now contains gettemplate - + my $query=new CGI; my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1); diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 29503f948c..fe0f7e22a4 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -57,13 +57,13 @@ foreach my $key (keys %$issues) { $issue->{'status'} .= "Reserved"; } my ($charges, $itemtype) = calc_charges(undef, undef, $issue->{'itemnumber'}, $borrowernumber); - $issue->{'charges'} = $charges; + $issue->{'charges'} = $charges; push @issuedat, $issue; $count++; -} +} -$template->param(ISSUES => \@issuedat); -$template->param(issues_count => $count); +$template->param(ISSUES => \@issuedat); +$template->param(issues_count => $count); # now the reserved items.... my ($rcount, $reserves) = FindReserves(undef, $borrowernumber); @@ -86,4 +86,4 @@ $template->param(WAITING => \@waiting); $template->param(waiting_count => $wcount); $template->param(loggedinuser => $loggedinuser); -print "Content-Type: text/html\n\n", $template->output; +print "Content-Type: text/html\n\n", $template->output; diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index 87b9c4905d..08b5d971cd 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -48,7 +48,7 @@ EOF # do something if it doesnt work.... warn "Error sending mail: $Mail::Sendmail::error \n"; } -} +} my $template = gettemplate("opac-userupdate.tmpl", "opac"); @@ -67,4 +67,4 @@ $template->param(BORROWER_INFO => \@bordat); $template->param(loggedinuser => $loggedinuser); -print "Content-Type: text/html\n\n", $template->output; +print "Content-Type: text/html\n\n", $template->output; diff --git a/sec/writeoff.pl b/sec/writeoff.pl index 27efb66c04..b930b3b7e6 100755 --- a/sec/writeoff.pl +++ b/sec/writeoff.pl @@ -88,7 +88,7 @@ sub writeoff{ values ('$bornum','$account->{'max(accountno)'}','$itemnum',now(),'$amount','Writeoff','W')"; $sth=$dbh->prepare($query); $sth->execute; - $sth->finish; + $sth->finish; # print $query; UpdateStats($env,$user,'writeoff',$amount,'','','',$bornum); } diff --git a/telnet/issuewrapper.pl b/telnet/issuewrapper.pl index d3e1d4358d..e520bb012d 100755 --- a/telnet/issuewrapper.pl +++ b/telnet/issuewrapper.pl @@ -20,10 +20,10 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -$done = "Issues"; +$done = "Issues"; my $i=0; my $bcard; -while ($done eq "Issues") { +while ($done eq "Issues") { my @args=('borrwraper.pl',@ARGV,$bcard); my $time=localtime(time); open (FILE,">>/tmp/$<_$ARGV[6]"); @@ -35,4 +35,4 @@ while ($done eq "Issues") { $done=$exit_value; } -} +} diff --git a/telnet/returnswrapper.pl b/telnet/returnswrapper.pl index ce4736896c..787f6fdee2 100755 --- a/telnet/returnswrapper.pl +++ b/telnet/returnswrapper.pl @@ -18,9 +18,9 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -$done = "returns"; +$done = "returns"; my $i=0; -while ($done eq "returns") { +while ($done eq "returns") { my @args=('doreturns.pl',@ARGV); eval{system(@args)}; $exit_value = $? >> 8; @@ -28,4 +28,4 @@ while ($done eq "returns") { $done=$exit_value; } -} +} diff --git a/telnet/startint.pl b/telnet/startint.pl index 1a9fc5394e..c37f0b389b 100755 --- a/telnet/startint.pl +++ b/telnet/startint.pl @@ -20,14 +20,14 @@ use strict; #use C4::Security; -#use C4::Database; -use C4::Circulation::Main; -#use C4::Circulation::Issues; -#use C4::Circulation::Returns; -#use C4::Circulation::Renewals; -#use C4::Circulation::Borrower; -#use C4::Reserves; -use C4::InterfaceCDK; +#use C4::Database; +use C4::Circulation::Main; +#use C4::Circulation::Issues; +#use C4::Circulation::Returns; +#use C4::Circulation::Renewals; +#use C4::Circulation::Borrower; +#use C4::Reserves; +use C4::InterfaceCDK; #use C4::Security; @@ -49,48 +49,48 @@ $env{'usercode'} = `whoami`; $env{'telnet'} = "Y"; -#start interface -&startint(\%env,'Circulation'); -getbranch(\%env); -getprinter(\%env); -my $donext = 'Circ'; -my $reason; -my $data; -while ($donext ne 'Quit') { - if ($donext eq "Circ") { - ($reason,$data) = menu(\%env,'console','Circulation', - ('Issues','Returns','Select Branch','Select Printer')); - } else { - $data = $donext; - } - if ($data eq 'Issues') { +#start interface +&startint(\%env,'Circulation'); +getbranch(\%env); +getprinter(\%env); +my $donext = 'Circ'; +my $reason; +my $data; +while ($donext ne 'Quit') { + if ($donext eq "Circ") { + ($reason,$data) = menu(\%env,'console','Circulation', + ('Issues','Returns','Select Branch','Select Printer')); + } else { + $data = $donext; + } + if ($data eq 'Issues') { my @args=('issuewrapper.pl',"$env{'branchcode'}","$env{'usercode'}","$env{'telnet'}","$env{'queue'}","$env{'printtype'}","$env{'brdata'}","$env{'lasttime'}"); open (FILE,">>/tmp/$<_$$"); my $time=localtime(time); print FILE "Start issues $time \n"; close FILE; system(@args); - } elsif ($data eq 'Returns') { + } elsif ($data eq 'Returns') { my @args=('returnswrapper.pl',"$env{'branchcode'}","$env{'usercode'}","$env{'telnet'}","$env{'queue'}","$env{'printtype'}","$env{'brdata'}"); open (FILE,">>/tmp/$<_$$"); my $time=localtime(time); print FILE "Start returns $time \n"; close FILE; system(@args); -# $donext=Returns(\%env); #C4::Circulation::Returns - } elsif ($data eq 'Select Branch') { - getbranch(\%env); - } elsif ($data eq 'Select Printer') { - getprinter(\%env); -# } elsif ($data eq 'Borrower Enquiries') { - # $donext=Borenq($env); #C4::Circulation::Borrower - conversion -# } elsif ($data eq 'Reserves'){ -# $donext=EnterReserves(\%env); #C4::Reserves - } elsif ($data eq 'Quit') { - $donext = $data; - &endint(\%env); +# $donext=Returns(\%env); #C4::Circulation::Returns + } elsif ($data eq 'Select Branch') { + getbranch(\%env); + } elsif ($data eq 'Select Printer') { + getprinter(\%env); +# } elsif ($data eq 'Borrower Enquiries') { + # $donext=Borenq($env); #C4::Circulation::Borrower - conversion +# } elsif ($data eq 'Reserves'){ +# $donext=EnterReserves(\%env); #C4::Reserves + } elsif ($data eq 'Quit') { + $donext = $data; + &endint(\%env); die; - } + } } - &endint(\%env); + &endint(\%env); die; diff --git a/translator/translator.pl b/translator/translator.pl index 08ebce939f..7bdd18ba84 100755 --- a/translator/translator.pl +++ b/translator/translator.pl @@ -74,8 +74,8 @@ if ($tofile){ @katalog=`ls -R`; $plik=$ARGV[0]; - if ($plik eq ''){ - $plik="koha.gettext.c"; + if ($plik eq ''){ + $plik="koha.gettext.c"; } } else { @@ -91,7 +91,7 @@ $dgettxt{'us_US'}=1; my $txt =< - TXT @@ -124,21 +124,21 @@ foreach(@katalog){ $dane=~s//$txt/i; - + $dane=~s/%/&zamien/ges; # change % (specjal symbol) $dane=~s/\\\'/&zamien/ges; # change \' $dane=~s/\\\"/&zamien/ges; # change \" - + # take out graphics $dane=~s/[\"\']\/?([\w-\/\.]*?\.gif)[\"\']/&zamien($1)/ges; - + # $dane=~s/messenger\s*\((.*?)\)\s*[\}\{;]/&zamien($1)/ges; # $dane=~s/\.write(ln)?\s*\((.*?)\)\s*[\};]/&zamien($2)/ges; # take out string in field alt $dane=~s/alt\s*=\s*[\"]([^\"]*)[\"]/&zamien($1)/iges; $dane=~s/alt\s*=\s*[\']([^\']*)[\']/&zamien($1)/iges; - + $dane=~s//&zamien/ges; $dane=~s//&zamien/iges; -- 2.39.5
BARCODE $items[$i]->{'barcode'}