From 7bd99ef3657c02a60e9880a3aabb1883d50779b0 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 18 Apr 2007 17:00:14 +0000 Subject: [PATCH] removing all useless %env / $env --- C4/Accounts.pm | 36 +++++++------------ C4/Biblio.pm | 4 ++- C4/Circulation.pm | 31 +++++----------- C4/Circulation/Fines.pm | 1 - C4/Date.pm | 2 -- C4/Input.pm | 21 ++--------- C4/Koha.pm | 5 +-- C4/Members.pm | 34 ++++++------------ C4/Overdues.pm | 1 - C4/Print.pm | 36 ++++++------------- C4/Reserves2.pm | 14 ++++---- C4/Stats.pm | 7 +--- admin/auth_subfields_structure.pl | 5 ++- admin/auth_tag_structure.pl | 5 ++- admin/authorised_values.pl | 5 ++- admin/authtypes.pl | 5 ++- admin/biblio_framework.pl | 5 ++- admin/branches.pl | 3 +- admin/categorie.pl | 5 ++- admin/categoryitem.pl | 5 ++- admin/cities.pl | 5 ++- admin/currency.pl | 5 ++- admin/itemtypecategory.pl | 5 ++- admin/itemtypes.pl | 5 ++- admin/itemtypesubcategory.pl | 5 ++- admin/koha2marclinks.pl | 1 - admin/letter.pl | 5 ++- admin/marc_subfields_structure.pl | 5 ++- admin/marctagstructure.pl | 6 ++-- admin/mediatype.pl | 5 ++- admin/printers.pl | 6 ++-- admin/roadtype.pl | 5 ++- admin/systempreferences.pl | 5 ++- admin/thesaurus.pl | 4 +-- admin/z3950servers.pl | 6 ++-- catalogue/dictionary.pl | 2 -- catalogue/moredetail.pl | 3 -- cataloguing/thesaurus_popup.pl | 2 -- cataloguing/value_builder/labs_theses.pl | 3 -- cataloguing/value_builder/marc21_field_006.pl | 3 -- cataloguing/value_builder/marc21_field_007.pl | 3 -- cataloguing/value_builder/marc21_field_008.pl | 3 -- .../marc21_field_008_authorities.pl | 3 -- cataloguing/value_builder/marc21_leader.pl | 3 -- .../marc21_leader_authorities.pl | 3 -- .../value_builder/marc21_leader_book.pl | 3 -- .../marc21_leader_computerfile.pl | 3 -- .../value_builder/marc21_leader_video.pl | 3 -- .../value_builder/unimarc_field_100.pl | 3 -- .../value_builder/unimarc_field_105.pl | 3 -- .../value_builder/unimarc_field_106.pl | 3 -- .../value_builder/unimarc_field_110.pl | 3 -- .../value_builder/unimarc_field_115a.pl | 3 -- .../value_builder/unimarc_field_115b.pl | 3 -- .../value_builder/unimarc_field_116.pl | 3 -- .../value_builder/unimarc_field_117.pl | 3 -- .../value_builder/unimarc_field_120.pl | 3 -- .../value_builder/unimarc_field_121a.pl | 3 -- .../value_builder/unimarc_field_121b.pl | 3 -- .../value_builder/unimarc_field_122.pl | 3 -- .../value_builder/unimarc_field_123a.pl | 3 -- .../value_builder/unimarc_field_123d.pl | 3 -- .../value_builder/unimarc_field_123e.pl | 3 -- .../value_builder/unimarc_field_123f.pl | 2 -- .../value_builder/unimarc_field_123g.pl | 3 -- .../value_builder/unimarc_field_123i.pl | 3 -- .../value_builder/unimarc_field_123j.pl | 3 -- .../value_builder/unimarc_field_124.pl | 3 -- .../value_builder/unimarc_field_124a.pl | 3 -- .../value_builder/unimarc_field_124b.pl | 3 -- .../value_builder/unimarc_field_124c.pl | 3 -- .../value_builder/unimarc_field_124d.pl | 3 -- .../value_builder/unimarc_field_124e.pl | 3 -- .../value_builder/unimarc_field_124f.pl | 3 -- .../value_builder/unimarc_field_124g.pl | 3 -- .../value_builder/unimarc_field_125.pl | 3 -- .../value_builder/unimarc_field_125a.pl | 3 -- .../value_builder/unimarc_field_125b.pl | 3 -- .../value_builder/unimarc_field_126.pl | 3 -- .../value_builder/unimarc_field_126a.pl | 3 -- .../value_builder/unimarc_field_126b.pl | 3 -- .../value_builder/unimarc_field_127.pl | 3 -- .../value_builder/unimarc_field_128a.pl | 3 -- .../value_builder/unimarc_field_128b.pl | 3 -- .../value_builder/unimarc_field_128c.pl | 3 -- .../value_builder/unimarc_field_130.pl | 3 -- .../value_builder/unimarc_field_135a.pl | 3 -- .../value_builder/unimarc_field_140.pl | 3 -- .../value_builder/unimarc_field_141.pl | 3 -- .../value_builder/unimarc_field_225a.pl | 7 ++-- .../value_builder/unimarc_field_4XX.pl | 3 -- .../value_builder/unimarc_field_60X.pl | 1 - .../value_builder/unimarc_field_700-4.pl | 3 -- .../unimarc_field_700_701_702.pl | 1 - cataloguing/value_builder/unimarc_leader.pl | 3 -- circ/branchreserves.pl | 2 -- circ/circulation.pl | 23 ++++-------- circ/currenttransfers.pl | 1 - circ/returns.pl | 9 +---- circ/selectbranchprinter.pl | 7 +--- circ/waitingreservestransfers.pl | 1 - members/deletemem.pl | 2 -- members/guarantor_search.pl | 7 ++-- members/member-flags.pl | 2 -- members/member-password.pl | 2 -- members/member.pl | 7 ++-- members/moremember.pl | 1 - members/pay.pl | 8 ++--- misc/fines2.pl | 1 - misc/notifys/fines.pl | 16 +++------ opac/opac-dictionary.pl | 2 -- opac/opac-renew.pl | 1 - opac/opac-user.pl | 1 - reserve/placerequest.pl | 7 ++-- reserve/renewscript.pl | 1 - reserve/request.pl | 4 +-- serials/routing-preview.pl | 3 +- tools/letter.pl | 5 ++- 118 files changed, 128 insertions(+), 465 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index ced4a228c6..8eb99b9164 100755 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -63,8 +63,6 @@ C<$borrowernumber> specifies the borrower to look up. C<$dbh> is a DBI::db handle for the Koha database. -C<$env> is ignored. - =cut #' @@ -91,7 +89,7 @@ sub checkaccount { #if ($total > 0){ # # output(1,2,"borrower owes $total"); # if ($total > 5){ - # reconcileaccount($env,$dbh,$borrowernumber,$total); + # reconcileaccount($dbh,$borrowernumber,$total); # } #} # pause(); @@ -100,13 +98,11 @@ sub checkaccount { =head2 recordpayment - &recordpayment($env, $borrowernumber, $payment); + &recordpayment($borrowernumber, $payment); Record payment by a patron. C<$borrowernumber> is the patron's borrower number. C<$payment> is a floating-point number, giving the -amount that was paid. C<$env> is a reference-to-hash; -C<$env-E{branchcode}> is the code of the branch where payment was -made. +amount that was paid. Amounts owed are paid off oldest first. That is, if the patron has a $1 fine from Feb. 1, another $1 fine from Mar. 1, and makes a payment @@ -118,12 +114,11 @@ will be credited to the next one. #' sub recordpayment{ #here we update both the accountoffsets and the account lines - my ($env,$borrowernumber,$data)=@_; + my ($borrowernumber,$data)=@_; my $dbh = C4::Context->dbh; my $newamtos = 0; my $accdata = ""; - my $branch=$env->{'branchcode'}; - warn $branch; + my $branch=C4::Context->userenv->{'branch'}; my $amountleft = $data; # begin transaction my $nextaccntno = getnextacctno($borrowernumber); @@ -158,7 +153,7 @@ sub recordpayment{ values (?,?,now(),?,'Payment,thanks','Pay',?)"); $usth->execute($borrowernumber,$nextaccntno,0-$data,0-$amountleft); $usth->finish; - UpdateStats($env,$branch,'payment',$data,'','','',$borrowernumber); + UpdateStats($branch,'payment',$data,'','','',$borrowernumber); $sth->finish; } @@ -185,8 +180,6 @@ sub makepayment{ #updated to check, if they are paying off a lost item, we return the item # from their card, and put a note on the item record my ($borrowernumber,$accountno,$amount,$user,$branch)=@_; - my %env; - $env{'branchcode'}=$branch; my $dbh = C4::Context->dbh; # begin transaction my $nextaccntno = getnextacctno($borrowernumber); @@ -224,7 +217,7 @@ EOT # FIXME - The second argument to &UpdateStats is supposed to be the # branch code. # UpdateStats is now being passed $accountno too. MTJ - UpdateStats(\%env,$user,'payment',$amount,'','','',$borrowernumber,$accountno); + UpdateStats($user,'payment',$amount,'','','',$borrowernumber,$accountno); $sth->finish; #check to see what accounttype if ($data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L'){ @@ -241,8 +234,6 @@ borrower number. C<$dbh> is a DBI::db handle to the Koha database. -C<$env> is ignored. - =cut #' @@ -330,14 +321,13 @@ sub manualinvoice{ my $notifyid; my $insert; $itemnum=~ s/ //g; - my %env; my $accountno=getnextacctno($borrowernumber); my $amountleft=$amount; if ($type eq 'CS' || $type eq 'CB' || $type eq 'CW' || $type eq 'CF' || $type eq 'CL'){ my $amount2=$amount*-1; # FIXME - $amount2 = -$amount - $amountleft=fixcredit(\%env,$borrowernumber,$amount2,$itemnum,$type,$user); + $amountleft=fixcredit($borrowernumber,$amount2,$itemnum,$type,$user); } if ($type eq 'N'){ $desc.="New Card"; @@ -381,7 +371,7 @@ sub manualinvoice{ =head2 fixcredit - $amountleft = &fixcredit($env, $borrowernumber, $data, $barcode, $type, $user); + $amountleft = &fixcredit($borrowernumber, $data, $barcode, $type, $user); This function is only used internally, not exported. FIXME - Figure out what this function does, and write it down. @@ -390,7 +380,7 @@ sub manualinvoice{ sub fixcredit{ #here we update both the accountoffsets and the account lines - my ($env,$borrowernumber,$data,$barcode,$type,$user)=@_; + my ($borrowernumber,$data,$barcode,$type,$user)=@_; my $dbh = C4::Context->dbh; my $newamtos = 0; my $accdata = ""; @@ -460,9 +450,8 @@ sub fixcredit{ $usth->finish; } $sth->finish; - $env->{'branch'}=$user; $type="Credit ".$type; - UpdateStats($env,$user,$type,$data,$user,'','',$borrowernumber); + UpdateStats($user,$type,$data,$user,'','',$borrowernumber); $amountleft*=-1; return($amountleft); @@ -476,11 +465,10 @@ sub fixcredit{ sub refund{ #here we update both the accountoffsets and the account lines - my ($env,$borrowernumber,$data)=@_; + my ($borrowernumber,$data)=@_; my $dbh = C4::Context->dbh; my $newamtos = 0; my $accdata = ""; -# my $branch=$env->{'branchcode'}; my $amountleft = $data *-1; # begin transaction diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 04340535e9..2bf3d8f761 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1201,7 +1201,6 @@ database. sub GetBiblioFromItemNumber { my ( $itemnumber ) = @_; my $dbh = C4::Context->dbh; - my $env; my $sth = $dbh->prepare( "SELECT * FROM biblio,items,biblioitems WHERE items.itemnumber = ? @@ -3650,6 +3649,9 @@ Joshua Ferraro jmf@liblime.com # $Id$ # $Log$ +# Revision 1.197 2007/04/18 17:00:14 tipaul +# removing all useless %env / $env +# # Revision 1.196 2007/04/17 08:48:00 tipaul # circulation cleaning continued: bufixing # diff --git a/C4/Circulation.pm b/C4/Circulation.pm index ebe2e11d95..e794997837 100755 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -203,7 +203,6 @@ The item was eligible to be transferred. Barring problems communicating with the sub transferbook { my ( $tbr, $barcode, $ignoreRs ) = @_; my $messages; - my %env; my $dotransfer = 1; my $branches = GetBranches(); my $itemnumber = GetItemnumberFromBarcode( $barcode ); @@ -303,12 +302,10 @@ sub domarctransfer { Check if a book can be issued. -my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued($env,$borrower,$barcode,$year,$month,$day); +my ($issuingimpossible,$needsconfirmation) = CanBookBeIssued($borrower,$barcode,$year,$month,$day); =over 4 -=item C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it. - =item C<$borrower> hash with borrower informations (from GetMemberDetails) =item C<$barcode> is the bar code of the book being issued. @@ -671,14 +668,14 @@ sub itemissues { =head2 CanBookBeIssued $issuingimpossible, $needsconfirmation = - CanBookBeIssued( $env, $borrower, $barcode, $year, $month, $day, $inprocess ); + CanBookBeIssued( $borrower, $barcode, $year, $month, $day, $inprocess ); C<$issuingimpossible> and C<$needsconfirmation> are some hashref. =cut sub CanBookBeIssued { - my ( $env, $borrower, $barcode, $year, $month, $day, $inprocess ) = @_; + my ( $borrower, $barcode, $year, $month, $day, $inprocess ) = @_; my %needsconfirmation; # filled with problems that needs confirmations my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE my $item = GetItem(GetItemnumberFromBarcode( $barcode )); @@ -848,12 +845,10 @@ sub CanBookBeIssued { Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this sub, it means the user confirmed if needed. -&AddIssue($env,$borrower,$barcode,$date) +&AddIssue($borrower,$barcode,$date) =over 4 -=item C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it. - =item C<$borrower> hash with borrower informations (from GetMemberDetails) =item C<$barcode> is the bar code of the book being issued. @@ -878,7 +873,7 @@ AddIssue does the following things : =cut sub AddIssue { - my ( $env, $borrower, $barcode, $date, $cancelreserve ) = @_; + my ( $borrower, $barcode, $date, $cancelreserve ) = @_; my $dbh = C4::Context->dbh; if ($borrower and $barcode){ @@ -909,7 +904,7 @@ if ($borrower and $barcode){ $item->{'charge'} = $charge; } &UpdateStats( - $env, $env->{'branchcode'}, + C4::Context->userenv->{'branch'}, 'renew', $charge, '', $item->{'itemnumber'}, $biblio->{'itemtype'}, $borrower->{'borrowernumber'} @@ -1026,7 +1021,7 @@ if ($borrower and $barcode){ $sth->execute( $borrower->{'borrowernumber'}, $item->{'itemnumber'}, - strftime( "%Y-%m-%d", localtime ),$dateduef, $env->{'branchcode'} + strftime( "%Y-%m-%d", localtime ),$dateduef, C4::Context->userenv->{'branch'} ); $sth->finish; $item->{'issues'}++; @@ -1055,7 +1050,7 @@ if ($borrower and $barcode){ # Record the fact that this book was issued. &UpdateStats( - $env, $env->{'branchcode'}, + C4::Context->userenv->{'branch'}, 'issue', $charge, '', $item->{'itemnumber'}, $item->{'itemtype'}, $borrower->{'borrowernumber'} @@ -1527,8 +1522,6 @@ $ok = &CanBookBeRenewed($borrowernumber, $itemnumber); Find out whether a borrowed item may be renewed. -C<$env> is ignored. - C<$dbh> is a DBI handle to the Koha database. C<$borrowernumber> is the borrower number of the patron who currently @@ -1605,12 +1598,6 @@ sub CanBookBeRenewed { Renews a loan. -C<$env-E{branchcode}> is the code of the branch where the -renewal is taking place. - -C<$env-E{usercode}> is the value to log in C -in the Koha database. - C<$borrowernumber> is the borrower number of the patron who currently has the item. @@ -1696,8 +1683,6 @@ sub AddRenewal { Calculate how much it would cost for a given patron to borrow a given item, including any applicable discounts. -C<$env> is ignored. - C<$itemnumber> is the item number of item the patron wishes to borrow. C<$borrowernumber> is the patron's borrower number. diff --git a/C4/Circulation/Fines.pm b/C4/Circulation/Fines.pm index cebdc8489e..a825236429 100644 --- a/C4/Circulation/Fines.pm +++ b/C4/Circulation/Fines.pm @@ -655,7 +655,6 @@ C<$notify_id> contains the file number for the borrower number nad item number sub NumberNotifyId{ my ($borrowernumber)=@_; my $dbh = C4::Context->dbh; - my $env; my $query=qq| SELECT distinct(notify_id) FROM accountlines WHERE borrowernumber=? diff --git a/C4/Date.pm b/C4/Date.pm index 23d252fb81..f8bb6dbb0f 100644 --- a/C4/Date.pm +++ b/C4/Date.pm @@ -197,8 +197,6 @@ sub fixdate { my $date; if ( $year && $month && $day ) { if ( ( $year eq 0 ) && ( $month eq 0 ) && ( $year eq 0 ) ) { - - # $env{'datedue'}=''; } else { if ( ( $year eq 0 ) || ( $month eq 0 ) || ( $year eq 0 ) ) { diff --git a/C4/Input.pm b/C4/Input.pm index 6bbb16c42a..b66c116b13 100644 --- a/C4/Input.pm +++ b/C4/Input.pm @@ -53,36 +53,19 @@ number or ISBN is valid. &buildCGIsort ); -# FIXME - This is never used. -#sub checkflds { -# my ($env,$reqflds,$data) = @_; -# my $numrflds = @$reqflds; -# my @probarr; -# my $i = 0; -# while ($i < $numrflds) { -# if ($data->{@$reqflds[$i]} eq "") { -# push(@probarr, @$reqflds[$i]); -# } -# $i++ -# } -# return (\@probarr); -#} - =item checkdigit - $valid = &checkdigit($env, $cardnumber $nounique); + $valid = &checkdigit($cardnumber $nounique); Takes a card number, computes its check digit, and compares it to the checkdigit at the end of C<$cardnumber>. Returns a true value iff C<$cardnumber> has a valid check digit. -C<$env> is ignored. - =cut #' sub checkdigit { - my ($env,$infl, $nounique) = @_; + my ($infl, $nounique) = @_; $infl = uc $infl; diff --git a/C4/Koha.pm b/C4/Koha.pm index 4511c464ab..3c7164a2df 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -486,13 +486,11 @@ sub getitemtypeimagesrc { =head2 GetPrinters - $printers = &GetPrinters($env); + $printers = &GetPrinters(); @queues = keys %$printers; Returns information about existing printer queues. -C<$env> is ignored. - C<$printers> is a reference-to-hash whose keys are the print queues defined in the printers table of the Koha database. The values are references-to-hash, whose keys are the fields in the printers table. @@ -500,7 +498,6 @@ references-to-hash, whose keys are the fields in the printers table. =cut sub GetPrinters { - my ($env) = @_; my %printers; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("select * from printers"); diff --git a/C4/Members.pm b/C4/Members.pm index e831870cf7..3c131b48e6 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -79,12 +79,10 @@ This module contains routines for adding, modifying and deleting members/patrons =item BornameSearch - ($count, $borrowers) = &BornameSearch($env, $searchstring, $type); + ($count, $borrowers) = &BornameSearch($searchstring, $type); Looks up patrons (borrowers) by name. -C<$env> is ignored. - BUGFIX 499: C<$type> is now used to determine type of search. if $type is "simple", search is performed on the first letter of the surname only. @@ -104,7 +102,7 @@ C<$count> is the number of elements in C<$borrowers>. #used by member enquiries from the intranet #called by member.pl sub BornameSearch { - my ( $env, $searchstring, $orderby, $type ) = @_; + my ($searchstring, $orderby, $type ) = @_; my $dbh = C4::Context->dbh; my $query = ""; my $count; @@ -248,8 +246,6 @@ C<$borrowernumber> is true (nonzero), C<&GetMemberDetails> looks up the borrower by number; otherwise, it looks up the borrower by card number. -C<$env> is effectively ignored, but should be a reference-to-hash. - C<$borrower> is a reference-to-hash whose keys are the fields of the borrowers table in the Koha database. In addition, C<$borrower-E{flags}> is a hash giving more detailed information @@ -387,7 +383,7 @@ sub GetMemberDetails { NOTE!: If you change this function, be sure to update the POD for &GetMemberDetails. - $flags = &patronflags($env, $patron, $dbh); + $flags = &patronflags($patron, $dbh); $flags->{CHARGES} {message} Message showing patron's credit or debt @@ -545,13 +541,11 @@ sub borrdata { =item borrdata2 - ($borrowed, $due, $fine) = &borrdata2($env, $borrowernumber); + ($borrowed, $due, $fine) = &borrdata2($borrowernumber); Returns aggregate data about items borrowed by the patron with the given borrowernumber. -C<$env> is ignored. - C<&borrdata2> returns a three-element array. C<$borrowed> is the number of books the patron currently has borrowed. C<$due> is the number of overdue items the patron currently has borrowed. C<$fine> is @@ -561,7 +555,7 @@ the total fine currently due by the borrower. #' sub borrdata2 { - my ( $env, $borrowernumber ) = @_; + my ( $borrowernumber ) = @_; my $dbh = C4::Context->dbh; my $query = "Select count(*) from issues where borrowernumber='$borrowernumber' and @@ -1023,12 +1017,10 @@ sub findguarantor { =item GuarantornameSearch - ($count, $borrowers) = &GuarantornameSearch($env, $searchstring, $type); + ($count, $borrowers) = &GuarantornameSearch($searchstring, $type); Looks up guarantor by name. -C<$env> is ignored. - BUGFIX 499: C<$type> is now used to determine type of search. if $type is "simple", search is performed on the first letter of the surname only. @@ -1050,7 +1042,7 @@ return all info from guarantor =>only category_type A #used by member enquiries from the intranet #called by guarantor_search.pl sub GuarantornameSearch { - my ( $env, $searchstring, $orderby, $type ) = @_; + my ($searchstring, $orderby, $type ) = @_; my $dbh = C4::Context->dbh; my $query = ""; my $count; @@ -1219,12 +1211,10 @@ sub allissues { =head2 getboracctrecord - ($count, $acctlines, $total) = &getboracctrecord($env, $borrowernumber); + ($count, $acctlines, $total) = &getboracctrecord($borrowernumber); Looks up accounting data for the patron with the given borrowernumber. -C<$env> is ignored. - (FIXME - I'm not at all sure what this is about.) C<&getboracctrecord> returns a three-element array. C<$acctlines> is a @@ -1237,7 +1227,7 @@ total amount outstanding for all of the account lines. #' sub getboracctrecord { - my ( $env, $params ) = @_; + my ($params ) = @_; my $dbh = C4::Context->dbh; my @acctlines; my $numlines = 0; @@ -1270,12 +1260,10 @@ borrowernumber=? order by date desc,timestamp desc" =head2 GetBorNotifyAcctRecord - ($count, $acctlines, $total) = &GetBorNotifyAcctRecord($env, $params,$notifyid); + ($count, $acctlines, $total) = &GetBorNotifyAcctRecord($params,$notifyid); Looks up accounting data for the patron with the given borrowernumber per file number. -C<$env> is ignored. - (FIXME - I'm not at all sure what this is about.) C<&GetBorNotifyAcctRecord> returns a three-element array. C<$acctlines> is a @@ -1287,7 +1275,7 @@ total amount outstanding for all of the account lines. =cut sub GetBorNotifyAcctRecord { - my ( $env, $params, $notifyid ) = @_; + my ( $params, $notifyid ) = @_; my $dbh = C4::Context->dbh; my @acctlines; my $numlines = 0; diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 27fb39c6bd..440a0fc1a0 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -697,7 +697,6 @@ C<$notify_id> contains the file number for the borrower number nad item number sub NumberNotifyId{ my ($borrowernumber)=@_; my $dbh = C4::Context->dbh; - my $env; my $query=qq| SELECT distinct(notify_id) FROM accountlines WHERE borrowernumber=?|; diff --git a/C4/Print.pm b/C4/Print.pm index cca633b744..957c65bd16 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -56,14 +56,10 @@ The functions in this module handle sending text to a printer. =item remoteprint - &remoteprint($env, $items, $borrower); + &remoteprint($items, $borrower); Prints the list of items in C<$items> to a printer. -C<$env> is a reference-to-hash. C<$env-E{queue}> specifies the -queue to print to; if it is empty or has the special value C, -C<&remoteprint> will print to the file F. - C<$borrower> is a reference-to-hash giving information about a patron. This may be gotten from C<&GetMemberDetails>. The patron's name will be printed in the output. @@ -74,14 +70,13 @@ from C<&GetBorrowerIssues>. =cut -#' # FIXME - It'd be nifty if this could generate pretty PostScript. sub remoteprint { - my ( $env, $items, $borrower ) = @_; + my ($items, $borrower ) = @_; (return) unless ( C4::Context->boolean_preference('printcirculationslips') ); - my $queue = $env->{'queue'}; + my $queue = ''; # FIXME - If 'queue' is undefined or empty, then presumably it should # mean "use the default queue", whatever the default is. Presumably @@ -106,12 +101,9 @@ sub remoteprint { # print $queue; #open (FILE,">/tmp/$file"); my $i = 0; - my $brdata = $env->{'brdata'}; # FIXME - Not used - # FIXME - This is HLT-specific. Put this stuff in a customizable - # site-specific file somewhere. + # FIXME - This is HLT-specific. Put this stuff in a customizable + # site-specific file somewhere. print PRINTER "Horowhenua Library Trust\r\n"; - - # print PRINTER "$brdata->{'branchname'}\r\n"; print PRINTER "Phone: 368-1953\r\n"; print PRINTER "Fax: 367-9218\r\n"; print PRINTER "Email: renewals\@library.org.nz\r\n\r\n\r\n"; @@ -134,19 +126,15 @@ sub remoteprint { $i++; } print PRINTER "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"; - if ( $env->{'printtype'} eq "docket" ) { - - #print chr(27).chr(105); - } close PRINTER; #system("lpr /tmp/$file"); } sub printreserve { - my ( $env, $branchname, $bordata, $itemdata ) = @_; + my ( $branchname, $bordata, $itemdata ) = @_; my $file = time; - my $printer = $env->{'printer'}; + my $printer = ''; (return) unless ( C4::Context->boolean_preference('printreserveslips') ); if ( $printer eq "" || $printer eq 'nulllp' ) { open( PRINTER, ">>/tmp/kohares" ); @@ -188,7 +176,7 @@ EOF =item printslip - &printslip($env, $borrowernumber) + &printslip($borrowernumber) print a slip for the given $borrowernumber @@ -196,14 +184,10 @@ EOF #' sub printslip { - my ( $env, $borrowernumber ) = @_; + my ( $borrowernumber ) = @_; my ( $borrower, $flags ) = GetMemberDetails( $borrowernumber); - $env->{'todaysissues'} = 1; my ($borrowerissues) = GetBorrowerIssues( $borrower ); - $env->{'nottodaysissues'} = 1; - $env->{'todaysissues'} = 0; my ($borroweriss2) = GetBorrowerIssues( $borrower ); - $env->{'nottodaysissues'} = 0; my $i = 0; my @issues; @@ -227,7 +211,7 @@ sub printslip { $issues[$i]->{'date_due'} = "$tempdate[2]/$tempdate[1]/$tempdate[0]"; $i++; } - remoteprint( $env, \@issues, $borrower ); + remoteprint(\@issues, $borrower ); } END { } # module clean-up code here (global destructor) diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index 8d04d112b2..5192a2e222 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -964,7 +964,7 @@ sub Findgroupreserve { =item CreateReserve -CreateReserve($env,$branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$checkitem,$found) +CreateReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$checkitem,$found) FIXME - A somewhat different version of this function appears in C4::Reserves. Pick one and stick with it. @@ -973,19 +973,19 @@ C4::Reserves. Pick one and stick with it. sub CreateReserve { my ( - $env, $branch, $borrowernumber, $biblionumber, + $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found ) = @_; my $fee; if ( $library_name =~ /Horowhenua/ ) { $fee = - CalcHLTReserveFee( $env, $borrowernumber, $biblionumber, $constraint, + CalcHLTReserveFee($borrowernumber, $biblionumber, $constraint, $bibitems ); } else { $fee = - CalcReserveFee( $env, $borrowernumber, $biblionumber, $constraint, + CalcReserveFee($borrowernumber, $biblionumber, $constraint, $bibitems ); } my $dbh = C4::Context->dbh; @@ -1061,7 +1061,7 @@ sub CreateReserve { # FIXME - opac-reserves.pl need to use it, temporarily put into @EXPORT sub CalcReserveFee { - my ( $env, $borrowernumber, $biblionumber, $constraint, $bibitems ) = @_; + my ($borrowernumber, $biblionumber, $constraint, $bibitems ) = @_; #check for issues; my $dbh = C4::Context->dbh; @@ -1169,7 +1169,7 @@ sub CalcReserveFee { # # All other item types should incur a reserve charge. sub CalcHLTReserveFee { - my ( $env, $borrowernumber, $biblionumber, $constraint, $bibitems ) = @_; + my ($borrowernumber, $biblionumber, $constraint, $bibitems ) = @_; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare( "SELECT * FROM borrowers,categories @@ -1212,7 +1212,7 @@ GetNextAccountNumber() =cut sub GetNextAccountNumber { - my ( $env, $borrowernumber, $dbh ) = @_; + my ($borrowernumber, $dbh ) = @_; my $nextaccntno = 1; my $sth = $dbh->prepare( "select * from accountlines diff --git a/C4/Stats.pm b/C4/Stats.pm index e4573fb8b2..0ff9059fea 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -54,7 +54,7 @@ the Koha database, which acts as an activity log. =item UpdateStats - &UpdateStats($env, $branch, $type, $value, $other, $itemnumber, + &UpdateStats($branch, $type, $value, $other, $itemnumber, $itemtype, $borrowernumber); Adds a line to the statistics table of the Koha database. In effect, @@ -64,11 +64,6 @@ C<$branch>, C<$type>, C<$value>, C<$other>, C<$itemnumber>, C<$itemtype>, and C<$borrowernumber> correspond to the fields of the statistics table in the Koha database. -If C<$branch> is the empty string, the branch code will be taken from -C<$env-E{branchcode}>. - -C<$env-E{usercode}> specifies the value of the C field. - =cut #' diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index d54996271f..44fce405ad 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -27,7 +27,7 @@ use C4::Context; sub StringSearch { - my ($env,$searchstring,$authtypecode)=@_; + my ($searchstring,$authtypecode)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -463,8 +463,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$tagfield,$authtypecode); + my ($count,$results)=StringSearch($tagfield,$authtypecode); my $toggle=1; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 0dd8524223..9458891a86 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -208,8 +208,7 @@ if ($op eq 'add_form') { if ($searchfield ne '') { $template->param(searchfield => $searchfield); } - my $env; - my ($count,$results)=StringSearch($env,$searchfield,$authtypecode); + my ($count,$results)=StringSearch($searchfield,$authtypecode); my $toggle=1; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ @@ -263,7 +262,7 @@ output_html_with_http_headers $input, $cookie, $template->output; # the sub used for searches # sub StringSearch { - my ($env,$searchstring,$authtypecode)=@_; + my ($searchstring,$authtypecode)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index a09903b1a5..244025decf 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -28,7 +28,7 @@ use C4::Context; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -164,8 +164,7 @@ if ($op eq 'add_form') { if (!$searchfield) { $searchfield=$category_list[0]; } - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop_data = (); # builds value list diff --git a/admin/authtypes.pl b/admin/authtypes.pl index e715b24def..ffa4e7411b 100755 --- a/admin/authtypes.pl +++ b/admin/authtypes.pl @@ -30,7 +30,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -143,8 +143,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop_data; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index 4542a86fbb..d6b4c9a3ba 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -30,7 +30,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -144,8 +144,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop_data; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/branches.pl b/admin/branches.pl index 03153aed1d..3440a7f029 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -210,8 +210,7 @@ sub default { sub editbranchform { my ($branchcode,$innertemplate) = @_; # initiate the scrolling-list to select the printers - my %env; - my $printers = GetPrinters( \%env ); + my $printers = GetPrinters(); my @printerloop; my $printercount = 0; my $oldprinter; diff --git a/admin/categorie.pl b/admin/categorie.pl index 2d066f866a..16a767fe6c 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -45,7 +45,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -167,9 +167,8 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED } else { # DEFAULT $template->param(else => 1); - my $env; my @loop; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle = 0; for (my $i=0; $i < $count; $i++){ my %row = (categorycode => $results->[$i]{'categorycode'}, diff --git a/admin/categoryitem.pl b/admin/categoryitem.pl index 7f4fca230a..e3ef25b4c8 100644 --- a/admin/categoryitem.pl +++ b/admin/categoryitem.pl @@ -46,7 +46,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -161,9 +161,8 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED } else { # DEFAULT $template->param(else => 1); - my $env; my @loop; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle = 'white'; for (my $i=0; $i < $count; $i++){ my %row = (categorycode => $results->[$i]{'categorycode'}, diff --git a/admin/cities.pl b/admin/cities.pl index ac8f83f248..040e190278 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -26,7 +26,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -140,9 +140,8 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED } else { # DEFAULT $template->param(else => 1); - my $env; my @loop; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle = 0; for (my $i=0; $i < $count; $i++){ my %row = (cityid => $results->[$i]{'cityid'}, diff --git a/admin/currency.pl b/admin/currency.pl index d50d5adca3..a759315124 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -46,7 +46,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -162,8 +162,7 @@ if ($op eq 'add_form') { } else { # DEFAULT $template->param(else => 1); - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my @loop; my $toggle = 'white'; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/itemtypecategory.pl b/admin/itemtypecategory.pl index c59ff6d950..6fc3afae9e 100644 --- a/admin/itemtypecategory.pl +++ b/admin/itemtypecategory.pl @@ -48,7 +48,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -164,8 +164,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle=0; my @loop_data; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index fc812f5d71..c3a882bb2f 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -50,7 +50,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -261,8 +261,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $page = $input->param('page') || 1; my $first = ($page - 1) * $pagesize; diff --git a/admin/itemtypesubcategory.pl b/admin/itemtypesubcategory.pl index c004769df6..b9fc6b1795 100644 --- a/admin/itemtypesubcategory.pl +++ b/admin/itemtypesubcategory.pl @@ -48,7 +48,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -164,8 +164,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle=0; my @loop_data; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index 28dfadd72b..6c69042927 100755 --- a/admin/koha2marclinks.pl +++ b/admin/koha2marclinks.pl @@ -124,7 +124,6 @@ elsif ( $op eq 'add_validate' ) { ################## DEFAULT ################################## } else { # DEFAULT - my $env; my $sth = $dbh->prepare( "Select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structure" diff --git a/admin/letter.pl b/admin/letter.pl index 49e984e43a..7198ca9563 100755 --- a/admin/letter.pl +++ b/admin/letter.pl @@ -47,7 +47,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -204,8 +204,7 @@ if ($op eq 'add_form') { $template->param(search => 1); $template->param(searchfield => $searchfield); } - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop_data =(); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index a9045bf5a8..22e887c3f5 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -26,7 +26,7 @@ use C4::Context; sub StringSearch { - my ( $env, $searchstring, $frameworkcode ) = @_; + my ( $searchstring, $frameworkcode ) = @_; my $dbh = C4::Context->dbh; $searchstring =~ s/\'/\\\'/g; my @data = split( ' ', $searchstring ); @@ -505,8 +505,7 @@ elsif ( $op eq 'delete_confirmed' ) { ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ( $count, $results ) = StringSearch( $env, $tagfield, $frameworkcode ); + my ( $count, $results ) = StringSearch( $tagfield, $frameworkcode ); my $toggle = 1; my @loop_data = (); for ( diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 6dcecf10eb..94fafd0155 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -222,7 +222,6 @@ if ($op eq 'add_form') { my $cnt=0; if ($dspchoice) { #here, user only wants used tags/subfields displayed - my $env; $searchfield=~ s/\'/\\\'/g; my @data=split(' ',$searchfield); my $sth=$dbh->prepare(" @@ -294,8 +293,7 @@ if ($op eq 'add_form') { $sth->finish; } else { #here, normal old style : display every tags - my $env; - my ($count,$results)=StringSearch($env,$searchfield,$frameworkcode); + my ($count,$results)=StringSearch($searchfield,$frameworkcode); $cnt = $count; my $toggle=0; my @loop_data = (); @@ -350,7 +348,7 @@ output_html_with_http_headers $input, $cookie, $template->output; # the sub used for searches # sub StringSearch { - my ($env,$searchstring,$frameworkcode)=@_; + my ($searchstring,$frameworkcode)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); diff --git a/admin/mediatype.pl b/admin/mediatype.pl index 9e6e8cfd84..1fb58b2de7 100644 --- a/admin/mediatype.pl +++ b/admin/mediatype.pl @@ -49,7 +49,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -165,8 +165,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle=0; my @loop_data; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/printers.pl b/admin/printers.pl index c95825d703..6e6e9f5c26 100755 --- a/admin/printers.pl +++ b/admin/printers.pl @@ -46,7 +46,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -145,9 +145,7 @@ if ($op eq 'add_form') { ################## DEFAULT ################################## } else { # DEFAULT $template->param(else => 1); - - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/roadtype.pl b/admin/roadtype.pl index dabaed6407..a667accf6f 100755 --- a/admin/roadtype.pl +++ b/admin/roadtype.pl @@ -26,7 +26,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -140,9 +140,8 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRMED } else { # DEFAULT $template->param(else => 1); - my $env; my @loop; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle = 0; for (my $i=0; $i < $count; $i++){ my %row = (roadtypeid => $results->[$i]{'roadtypeid'}, diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 18f411f0a9..87f004bb38 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -173,7 +173,7 @@ my %tabsysprefs; $tabsysprefs{FinesLog} = "LOGFeatures"; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -429,8 +429,7 @@ if ($op eq 'add_form') { #Adding tab management for system preferences my $tab=$input->param('tab'); - my $env; - my ($count,$results)=StringSearch($env,$searchfield,$tab); + my ($count,$results)=StringSearch($searchfield,$tab); my $toggle=0; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/admin/thesaurus.pl b/admin/thesaurus.pl index cb7f0a73b2..d867f9875a 100755 --- a/admin/thesaurus.pl +++ b/admin/thesaurus.pl @@ -158,7 +158,6 @@ if ($op eq 'add_form') { if (!$search_category) { $search_category=$category_list[0]; } - my $env; my $sth = $dbh->prepare("select father,stdlib,category,hierarchy from bibliothesaurus where id=?"); $sth->execute($id); my ($father,$stdlib,$category,$suphierarchy) = $sth->fetchrow_array; @@ -207,8 +206,7 @@ if ($op eq 'add_form') { if (!$search_category) { $search_category=$category_list[0]; } - my $env; - my ($count,$results)=searchauthority($env,$search_category,$branch,$searchstring,$offset,$pagesize); + my ($count,$results)=searchauthority($search_category,$branch,$searchstring,$offset,$pagesize); my $toggle="white"; my @loop_data = (); # builds value list diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl index 050bbf56df..9aa7981694 100755 --- a/admin/z3950servers.pl +++ b/admin/z3950servers.pl @@ -29,7 +29,7 @@ use C4::Auth; use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -157,9 +157,7 @@ if ($op eq 'add_form') { ################## DEFAULT ################################## } else { # DEFAULT $template->param(else => 1); - - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my @loop; my $toggle = 0; for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ diff --git a/catalogue/dictionary.pl b/catalogue/dictionary.pl index 98d53df6a8..1d3aea4576 100755 --- a/catalogue/dictionary.pl +++ b/catalogue/dictionary.pl @@ -70,8 +70,6 @@ my $type=$input->param('type'); my $dbh = C4::Context->dbh; my ($template, $loggedinuser, $cookie); -my $env; - my $startfrom=$input->param('startfrom'); $startfrom=0 if(!defined $startfrom); my $searchdesc; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 3dacc66b33..71d8a2d1f7 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -74,9 +74,6 @@ $data->{'count'}=$count; my $ordernum = GetOrderNumber($biblionumber,$bi); my $order = GetOrder($ordernum); -my $env; -$env->{itemcount}=1; - $results[0]=$data; foreach my $item (@items){ diff --git a/cataloguing/thesaurus_popup.pl b/cataloguing/thesaurus_popup.pl index 7c95e4a455..7e4ee40878 100755 --- a/cataloguing/thesaurus_popup.pl +++ b/cataloguing/thesaurus_popup.pl @@ -30,8 +30,6 @@ use C4::Output; use C4::Authorities; use C4::Interface::CGI::Output; # get all the data .... -my %env; - my $input = new CGI; my $result = $input->param('result'); my $search_string= $input->param('search_string'); diff --git a/cataloguing/value_builder/labs_theses.pl b/cataloguing/value_builder/labs_theses.pl index f53320518c..075959c9d5 100755 --- a/cataloguing/value_builder/labs_theses.pl +++ b/cataloguing/value_builder/labs_theses.pl @@ -59,9 +59,6 @@ return ($function_name,$res); sub plugin { my ($input) = @_; - my %env; - - my $dbh=C4::Context->dbh; my $query = new CGI; my $op = $query->param('op'); diff --git a/cataloguing/value_builder/marc21_field_006.pl b/cataloguing/value_builder/marc21_field_006.pl index 17931880dc..7d8213f9a3 100755 --- a/cataloguing/value_builder/marc21_field_006.pl +++ b/cataloguing/value_builder/marc21_field_006.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_field_007.pl b/cataloguing/value_builder/marc21_field_007.pl index e780dd1568..86809e36cc 100755 --- a/cataloguing/value_builder/marc21_field_007.pl +++ b/cataloguing/value_builder/marc21_field_007.pl @@ -63,9 +63,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl index f84a6a23a7..b2382c8f20 100755 --- a/cataloguing/value_builder/marc21_field_008.pl +++ b/cataloguing/value_builder/marc21_field_008.pl @@ -75,9 +75,6 @@ function Clic$function_name(i) { } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_field_008_authorities.pl b/cataloguing/value_builder/marc21_field_008_authorities.pl index 25e7fc7dd3..c5d61b2a48 100755 --- a/cataloguing/value_builder/marc21_field_008_authorities.pl +++ b/cataloguing/value_builder/marc21_field_008_authorities.pl @@ -76,9 +76,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_leader.pl b/cataloguing/value_builder/marc21_leader.pl index 00b915c4aa..2064f7d7dd 100755 --- a/cataloguing/value_builder/marc21_leader.pl +++ b/cataloguing/value_builder/marc21_leader.pl @@ -70,9 +70,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_leader_authorities.pl b/cataloguing/value_builder/marc21_leader_authorities.pl index c8779d350c..6c337344dc 100755 --- a/cataloguing/value_builder/marc21_leader_authorities.pl +++ b/cataloguing/value_builder/marc21_leader_authorities.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_leader_book.pl b/cataloguing/value_builder/marc21_leader_book.pl index 2a8b31d080..ce2b5a3e8a 100755 --- a/cataloguing/value_builder/marc21_leader_book.pl +++ b/cataloguing/value_builder/marc21_leader_book.pl @@ -63,9 +63,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_leader_computerfile.pl b/cataloguing/value_builder/marc21_leader_computerfile.pl index 40fcc31806..28689d37a0 100755 --- a/cataloguing/value_builder/marc21_leader_computerfile.pl +++ b/cataloguing/value_builder/marc21_leader_computerfile.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/marc21_leader_video.pl b/cataloguing/value_builder/marc21_leader_video.pl index dc27ad604f..faa083b780 100755 --- a/cataloguing/value_builder/marc21_leader_video.pl +++ b/cataloguing/value_builder/marc21_leader_video.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_100.pl b/cataloguing/value_builder/unimarc_field_100.pl index bd1341533d..ec1193f62a 100755 --- a/cataloguing/value_builder/unimarc_field_100.pl +++ b/cataloguing/value_builder/unimarc_field_100.pl @@ -65,9 +65,6 @@ function Clic$function_name(i) { sub plugin { my ($input) = @_; - my %env; - - # my $input = new CGI; my $index = $input->param('index'); my $result = $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_105.pl b/cataloguing/value_builder/unimarc_field_105.pl index c231aa540b..3ad63a7c3c 100755 --- a/cataloguing/value_builder/unimarc_field_105.pl +++ b/cataloguing/value_builder/unimarc_field_105.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_106.pl b/cataloguing/value_builder/unimarc_field_106.pl index bdda256c24..3c8724dbd9 100755 --- a/cataloguing/value_builder/unimarc_field_106.pl +++ b/cataloguing/value_builder/unimarc_field_106.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_110.pl b/cataloguing/value_builder/unimarc_field_110.pl index 671c55f52e..0a7a3d70c6 100755 --- a/cataloguing/value_builder/unimarc_field_110.pl +++ b/cataloguing/value_builder/unimarc_field_110.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_115a.pl b/cataloguing/value_builder/unimarc_field_115a.pl index c8b129fa9e..3f2f7f6b76 100755 --- a/cataloguing/value_builder/unimarc_field_115a.pl +++ b/cataloguing/value_builder/unimarc_field_115a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_115b.pl b/cataloguing/value_builder/unimarc_field_115b.pl index d487cf0eca..c8eb06382c 100755 --- a/cataloguing/value_builder/unimarc_field_115b.pl +++ b/cataloguing/value_builder/unimarc_field_115b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_116.pl b/cataloguing/value_builder/unimarc_field_116.pl index e6d33e4aee..346518cfa2 100755 --- a/cataloguing/value_builder/unimarc_field_116.pl +++ b/cataloguing/value_builder/unimarc_field_116.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_117.pl b/cataloguing/value_builder/unimarc_field_117.pl index eed42041f9..7c47e2aa85 100755 --- a/cataloguing/value_builder/unimarc_field_117.pl +++ b/cataloguing/value_builder/unimarc_field_117.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_120.pl b/cataloguing/value_builder/unimarc_field_120.pl index 58fe8ae742..467fbc7c71 100755 --- a/cataloguing/value_builder/unimarc_field_120.pl +++ b/cataloguing/value_builder/unimarc_field_120.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_121a.pl b/cataloguing/value_builder/unimarc_field_121a.pl index 9902fd0141..d3f183e85d 100755 --- a/cataloguing/value_builder/unimarc_field_121a.pl +++ b/cataloguing/value_builder/unimarc_field_121a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_121b.pl b/cataloguing/value_builder/unimarc_field_121b.pl index b5cc738a9b..b5ad5e1280 100755 --- a/cataloguing/value_builder/unimarc_field_121b.pl +++ b/cataloguing/value_builder/unimarc_field_121b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_122.pl b/cataloguing/value_builder/unimarc_field_122.pl index 1edba679db..cfe8a61db0 100755 --- a/cataloguing/value_builder/unimarc_field_122.pl +++ b/cataloguing/value_builder/unimarc_field_122.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123a.pl b/cataloguing/value_builder/unimarc_field_123a.pl index e44da46494..cc659f4ad2 100755 --- a/cataloguing/value_builder/unimarc_field_123a.pl +++ b/cataloguing/value_builder/unimarc_field_123a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123d.pl b/cataloguing/value_builder/unimarc_field_123d.pl index 913ba638da..bf370123eb 100755 --- a/cataloguing/value_builder/unimarc_field_123d.pl +++ b/cataloguing/value_builder/unimarc_field_123d.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123e.pl b/cataloguing/value_builder/unimarc_field_123e.pl index e9e732446a..550f130d1e 100755 --- a/cataloguing/value_builder/unimarc_field_123e.pl +++ b/cataloguing/value_builder/unimarc_field_123e.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123f.pl b/cataloguing/value_builder/unimarc_field_123f.pl index 913ba638da..497d617d18 100755 --- a/cataloguing/value_builder/unimarc_field_123f.pl +++ b/cataloguing/value_builder/unimarc_field_123f.pl @@ -62,9 +62,7 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123g.pl b/cataloguing/value_builder/unimarc_field_123g.pl index 913ba638da..bf370123eb 100755 --- a/cataloguing/value_builder/unimarc_field_123g.pl +++ b/cataloguing/value_builder/unimarc_field_123g.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123i.pl b/cataloguing/value_builder/unimarc_field_123i.pl index 989b5f506e..954b15581a 100755 --- a/cataloguing/value_builder/unimarc_field_123i.pl +++ b/cataloguing/value_builder/unimarc_field_123i.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_123j.pl b/cataloguing/value_builder/unimarc_field_123j.pl index 9739d15a3f..77be03dc3e 100755 --- a/cataloguing/value_builder/unimarc_field_123j.pl +++ b/cataloguing/value_builder/unimarc_field_123j.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124.pl b/cataloguing/value_builder/unimarc_field_124.pl index 32b9d3b4e6..ce53f681ad 100755 --- a/cataloguing/value_builder/unimarc_field_124.pl +++ b/cataloguing/value_builder/unimarc_field_124.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124a.pl b/cataloguing/value_builder/unimarc_field_124a.pl index 562e3b55dc..6f0313d791 100755 --- a/cataloguing/value_builder/unimarc_field_124a.pl +++ b/cataloguing/value_builder/unimarc_field_124a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124b.pl b/cataloguing/value_builder/unimarc_field_124b.pl index 9e71ecb337..f3edddbf7b 100755 --- a/cataloguing/value_builder/unimarc_field_124b.pl +++ b/cataloguing/value_builder/unimarc_field_124b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124c.pl b/cataloguing/value_builder/unimarc_field_124c.pl index 19c29fbb0e..d199ea1c11 100755 --- a/cataloguing/value_builder/unimarc_field_124c.pl +++ b/cataloguing/value_builder/unimarc_field_124c.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124d.pl b/cataloguing/value_builder/unimarc_field_124d.pl index a01d78b022..e5e620c040 100755 --- a/cataloguing/value_builder/unimarc_field_124d.pl +++ b/cataloguing/value_builder/unimarc_field_124d.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124e.pl b/cataloguing/value_builder/unimarc_field_124e.pl index 91591f1aa3..d24fd3b750 100755 --- a/cataloguing/value_builder/unimarc_field_124e.pl +++ b/cataloguing/value_builder/unimarc_field_124e.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124f.pl b/cataloguing/value_builder/unimarc_field_124f.pl index 5f231804af..5d7809590c 100755 --- a/cataloguing/value_builder/unimarc_field_124f.pl +++ b/cataloguing/value_builder/unimarc_field_124f.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_124g.pl b/cataloguing/value_builder/unimarc_field_124g.pl index 786347b47d..590d58a11f 100755 --- a/cataloguing/value_builder/unimarc_field_124g.pl +++ b/cataloguing/value_builder/unimarc_field_124g.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_125.pl b/cataloguing/value_builder/unimarc_field_125.pl index 32b9d3b4e6..ce53f681ad 100755 --- a/cataloguing/value_builder/unimarc_field_125.pl +++ b/cataloguing/value_builder/unimarc_field_125.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_125a.pl b/cataloguing/value_builder/unimarc_field_125a.pl index d8845e4187..ee44b939f2 100755 --- a/cataloguing/value_builder/unimarc_field_125a.pl +++ b/cataloguing/value_builder/unimarc_field_125a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_125b.pl b/cataloguing/value_builder/unimarc_field_125b.pl index 37cb1c70fc..302a9c3091 100755 --- a/cataloguing/value_builder/unimarc_field_125b.pl +++ b/cataloguing/value_builder/unimarc_field_125b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_126.pl b/cataloguing/value_builder/unimarc_field_126.pl index 88643a4938..45aae8a493 100755 --- a/cataloguing/value_builder/unimarc_field_126.pl +++ b/cataloguing/value_builder/unimarc_field_126.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_126a.pl b/cataloguing/value_builder/unimarc_field_126a.pl index 3bfd9dc1f5..4a639b3975 100755 --- a/cataloguing/value_builder/unimarc_field_126a.pl +++ b/cataloguing/value_builder/unimarc_field_126a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_126b.pl b/cataloguing/value_builder/unimarc_field_126b.pl index 08938452f1..fd295b6ed7 100755 --- a/cataloguing/value_builder/unimarc_field_126b.pl +++ b/cataloguing/value_builder/unimarc_field_126b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_127.pl b/cataloguing/value_builder/unimarc_field_127.pl index 00bb71a45b..4aae5ad5c0 100755 --- a/cataloguing/value_builder/unimarc_field_127.pl +++ b/cataloguing/value_builder/unimarc_field_127.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_128a.pl b/cataloguing/value_builder/unimarc_field_128a.pl index f5068987a7..9735f81b3c 100755 --- a/cataloguing/value_builder/unimarc_field_128a.pl +++ b/cataloguing/value_builder/unimarc_field_128a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_128b.pl b/cataloguing/value_builder/unimarc_field_128b.pl index c40b35eba5..589c028d3b 100755 --- a/cataloguing/value_builder/unimarc_field_128b.pl +++ b/cataloguing/value_builder/unimarc_field_128b.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_128c.pl b/cataloguing/value_builder/unimarc_field_128c.pl index d3b52393e1..d0ebc6eb52 100755 --- a/cataloguing/value_builder/unimarc_field_128c.pl +++ b/cataloguing/value_builder/unimarc_field_128c.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_130.pl b/cataloguing/value_builder/unimarc_field_130.pl index be9308e927..c0baddd2a4 100755 --- a/cataloguing/value_builder/unimarc_field_130.pl +++ b/cataloguing/value_builder/unimarc_field_130.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_135a.pl b/cataloguing/value_builder/unimarc_field_135a.pl index e05ef7eccc..a30043f2ed 100755 --- a/cataloguing/value_builder/unimarc_field_135a.pl +++ b/cataloguing/value_builder/unimarc_field_135a.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_140.pl b/cataloguing/value_builder/unimarc_field_140.pl index db625d073b..6c66d5a1fa 100755 --- a/cataloguing/value_builder/unimarc_field_140.pl +++ b/cataloguing/value_builder/unimarc_field_140.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_141.pl b/cataloguing/value_builder/unimarc_field_141.pl index 1f43681fb6..17a081b8cd 100755 --- a/cataloguing/value_builder/unimarc_field_141.pl +++ b/cataloguing/value_builder/unimarc_field_141.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_225a.pl b/cataloguing/value_builder/unimarc_field_225a.pl index cfee4ba419..fcd6813b3f 100755 --- a/cataloguing/value_builder/unimarc_field_225a.pl +++ b/cataloguing/value_builder/unimarc_field_225a.pl @@ -27,11 +27,11 @@ It need : isbn separator editor separator collection. for example : 2204 -- Cerf -- Cogitatio fidei - 2204 -- Cerf -- Le Magistère de l'Eglise + 2204 -- Cerf -- Le Magist�re de l'Eglise 2204 -- Cerf -- Lectio divina 2204 -- Cerf -- Lire la Bible 2204 -- Cerf -- Pour lire - 2204 -- Cerf -- Sources chrétiennes + 2204 -- Cerf -- Sources chr�tiennes when the user clic on ... on 225a line, the popup shows the list of collections from the selected editor if the biblio has no isbn, then the search if done on editor only @@ -98,9 +98,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); my $editor_found = $input->param('editor_found'); diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl index 2699db7314..7ab2579be7 100755 --- a/cataloguing/value_builder/unimarc_field_4XX.pl +++ b/cataloguing/value_builder/unimarc_field_4XX.pl @@ -62,9 +62,6 @@ return ($function_name,$res); sub plugin { my ($input) = @_; - my %env; - - my $dbh=C4::Context->dbh; my $query = new CGI; my $op = $query->param('op'); diff --git a/cataloguing/value_builder/unimarc_field_60X.pl b/cataloguing/value_builder/unimarc_field_60X.pl index 66d3c171f7..8bc7df2ddd 100755 --- a/cataloguing/value_builder/unimarc_field_60X.pl +++ b/cataloguing/value_builder/unimarc_field_60X.pl @@ -53,7 +53,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; my $dbh = C4::Context->dbh; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/cataloguing/value_builder/unimarc_field_700-4.pl b/cataloguing/value_builder/unimarc_field_700-4.pl index e42f01e48c..2421aad58a 100755 --- a/cataloguing/value_builder/unimarc_field_700-4.pl +++ b/cataloguing/value_builder/unimarc_field_700-4.pl @@ -69,9 +69,6 @@ return ($function_name,$res); sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $index2= $input->param('index2'); $index2=-1 unless($index2); diff --git a/cataloguing/value_builder/unimarc_field_700_701_702.pl b/cataloguing/value_builder/unimarc_field_700_701_702.pl index 8daae16f3d..22b390a1d1 100755 --- a/cataloguing/value_builder/unimarc_field_700_701_702.pl +++ b/cataloguing/value_builder/unimarc_field_700_701_702.pl @@ -53,7 +53,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; my $dbh = C4::Context->dbh; # my $input = new CGI; my $index= $input->param('index'); diff --git a/cataloguing/value_builder/unimarc_leader.pl b/cataloguing/value_builder/unimarc_leader.pl index 75a166ddcb..d3a09a9d67 100755 --- a/cataloguing/value_builder/unimarc_leader.pl +++ b/cataloguing/value_builder/unimarc_leader.pl @@ -62,9 +62,6 @@ return ($function_name,$res); } sub plugin { my ($input) = @_; - my %env; - -# my $input = new CGI; my $index= $input->param('index'); my $result= $input->param('result'); diff --git a/circ/branchreserves.pl b/circ/branchreserves.pl index 8dea6049a0..aa4ee5980b 100755 --- a/circ/branchreserves.pl +++ b/circ/branchreserves.pl @@ -73,7 +73,6 @@ my $todaysdate = if ($item) { my $messages; my $nextreservinfo; - my %env; my $waiting; ( $messages, $nextreservinfo ) = GlobalCancel( $item, $borrowernumber ); @@ -115,7 +114,6 @@ my @getreserves = GetReservesForBranch($default); foreach my $num (@getreserves) { my %getreserv; - my %env; my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); diff --git a/circ/circulation.pl b/circ/circulation.pl index 6c90171a10..d98bc4ed39 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -97,16 +97,8 @@ my $print = $query->param('print'); # $branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y'); # $printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y'); # } - -my %env - ; # FIXME env is used as an "environment" variable. Could be dropped probably... - # -$env{'branchcode'} = $branch; -$env{'printer'} = $printer; -$env{'organisation'} = $organisation; -# $env{'queue'}=$printer; my @datearr = localtime( time() ); @@ -136,7 +128,7 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { } if ( $print eq 'yes' && $borrowernumber ne '' ) { - printslip( \%env, $borrowernumber ); + printslip( $borrowernumber ); $query->param( 'borrowernumber', '' ); $borrowernumber = ''; } @@ -149,7 +141,7 @@ my $borrowerslist; my $message; if ($findborrower) { my ( $count, $borrowers ) = - BornameSearch( \%env, $findborrower, 'cardnumber', 'web' ); + BornameSearch($findborrower, 'cardnumber', 'web' ); my @borrowers = @$borrowers; if ( $#borrowers == -1 ) { $query->param( 'findborrower', '' ); @@ -171,7 +163,7 @@ my @lines; if ($borrowernumber) { $borrower = GetMemberDetails( $borrowernumber, 0 ); - my ( $od, $issue, $fines ) = borrdata2( \%env, $borrowernumber ); + my ( $od, $issue, $fines ) = borrdata2( $borrowernumber ); # Warningdate is the date that the warning starts appearing my ( $today_year, $today_month, $today_day ) = Today(); @@ -217,12 +209,12 @@ if ($barcode) { $barcode = cuecatbarcodedecode($barcode); my ( $datedue, $invalidduedate ) = fixdate( $year, $month, $day ); if ($issueconfirmed) { - AddIssue( \%env, $borrower, $barcode, $datedue, $cancelreserve ); + AddIssue( $borrower, $barcode, $datedue, $cancelreserve ); $inprocess = 1; } else { my ( $error, $question ) = - CanBookBeIssued( \%env, $borrower, $barcode, $year, $month, $day, + CanBookBeIssued( $borrower, $barcode, $year, $month, $day, $inprocess ); my $noerror = 1; my $noquestion = 1; @@ -250,13 +242,13 @@ if ($barcode) { year => $year ); if ( $noerror && ( $noquestion || $issueconfirmed ) ) { - AddIssue( \%env, $borrower, $barcode, $datedue ); + AddIssue( $borrower, $barcode, $datedue ); $inprocess = 1; } } # FIXME If the issue is confirmed, we launch another time borrdata2, now display the issue count after issue - my ( $od, $issue, $fines ) = borrdata2( \%env, $borrowernumber ); + my ( $od, $issue, $fines ) = borrdata2( $borrowernumber ); $template->param( issuecount => $issue, ); @@ -281,7 +273,6 @@ if ($borrowernumber) { foreach my $num_res (@borrowerreserv) { my %getreserv; my %getWaitingReserveInfo; - my %env; my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); my $itemtypeinfo = getitemtypeinfo( $getiteminfo->{'itemtype'} ); my ( $transfertwhen, $transfertfrom, $transfertto ) = diff --git a/circ/currenttransfers.pl b/circ/currenttransfers.pl index 2c4c4a67ee..bc453fa16c 100755 --- a/circ/currenttransfers.pl +++ b/circ/currenttransfers.pl @@ -78,7 +78,6 @@ foreach my $br ( keys %$branches ) { if (@gettransfers) { foreach my $num (@gettransfers) { my %getransf; - my %env; my ( $sent_year, $sent_month, $sent_day ) = split "-", $num->{'datesent'}; diff --git a/circ/returns.pl b/circ/returns.pl index 3b08ca5ca6..c311201540 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -55,10 +55,8 @@ my ( $template, $librarian, $cookie ) = get_template_and_user( ##################### #Global vars -my %env; - my $branches = GetBranches(); -my $printers = GetPrinters( \%env ); +my $printers = GetPrinters(); #my $branch = C4::Context->userenv?C4::Context->userenv->{'branch'}:""; my $printer = C4::Context->userenv?C4::Context->userenv->{'branchprinter'}:""; @@ -67,11 +65,6 @@ my $printer = C4::Context->userenv?C4::Context->userenv->{'branchprinter'}:""; # Some code to handle the error if there is no branch or printer setting..... # -#$env{'branchcode'} = $branch; -$env{'printer'} = $printer; -$env{'queue'} = $printer; - - # Set up the item stack .... my %returneditems; my %riduedate; diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index c39d4db5c1..f2ac61ac23 100644 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -34,10 +34,9 @@ use C4::Branch; # GetBranches #general design stuff... # try to get the branch and printer settings from the http.... -my %env; my $query = new CGI; my $branches = GetBranches(); -my $printers = GetPrinters( \%env ); +my $printers = GetPrinters(); my $branch = $query->param('branch'); my $printer = $query->param('printer'); @@ -52,10 +51,6 @@ my %cookie = $query->cookie('userenv'); my $oldbranch = $branch; my $oldprinter = $printer; -$env{'branchcode'} = $branch; -$env{'printer'} = $printer; -$env{'queue'} = $printer; - # set up select options.... my $branchcount = 0; my $printercount = 0; diff --git a/circ/waitingreservestransfers.pl b/circ/waitingreservestransfers.pl index 102a0385ad..9c32bce826 100755 --- a/circ/waitingreservestransfers.pl +++ b/circ/waitingreservestransfers.pl @@ -82,7 +82,6 @@ foreach my $br ( keys %$branches ) { if (@getreserves) { foreach my $num (@getreserves) { my %getreserv; - my %env; my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); # use Data::Dumper; # warn Dumper($gettitle); diff --git a/members/deletemem.pl b/members/deletemem.pl index 32f6f579e3..be734da18d 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -45,8 +45,6 @@ my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired); #print $input->header; my $member=$input->param('member'); -my %env; -$env{'nottodayissues'}=1; my %member2; $member2{'borrowernumber'}=$member; my $issues=GetBorrowerIssues(\%member2); diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl index e942ebbdd3..78eaf071cf 100755 --- a/members/guarantor_search.pl +++ b/members/guarantor_search.pl @@ -57,7 +57,6 @@ if ($member eq ''){ }else{ $template->param(results=>1); } -my $env; my ($count,$results); my @resultsdata; @@ -66,15 +65,15 @@ my $background = 0; if ($member ne ''){ if(length($member) == 1) { - ($count,$results)=GuarantornameSearch($env,$member,$orderby,"simple"); + ($count,$results)=GuarantornameSearch($member,$orderby,"simple"); } else { - ($count,$results)=GuarantornameSearch($env,$member,$orderby,"advanced"); + ($count,$results)=GuarantornameSearch($member,$orderby,"advanced"); } for (my $i=0; $i < $count; $i++){ #find out stats - my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowerid'}); + my ($od,$issue,$fines)=borrdata2($results->[$i]{'borrowerid'}); my $guarantorinfo=uc($results->[$i]{'surname'})." , ".ucfirst($results->[$i]{'firstname'}); my %row = ( background => $background, diff --git a/members/member-flags.pl b/members/member-flags.pl index 18bc5872a6..8c44727233 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -34,8 +34,6 @@ my ($template, $loggedinuser, $cookie) my $member=$input->param('member'); -my %env; -$env{'nottodayissues'}=1; my %member2; $member2{'borrowernumber'}=$member; diff --git a/members/member-password.pl b/members/member-password.pl index f874c63f08..3f72dc8548 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -34,8 +34,6 @@ $flagsrequired->{borrowers}=1; my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired); my $member=$input->param('member'); -my %env; -$env{'nottodayissues'}=1; my %member2; $member2{'borrowernumber'}=$member; # my $issues=GetBorrowerIssues(\%member2); diff --git a/members/member.pl b/members/member.pl index d58b08e50f..dcb6e91561 100755 --- a/members/member.pl +++ b/members/member.pl @@ -67,17 +67,16 @@ my $orderby=$input->param('orderby'); $orderby = "surname,firstname" unless $orderby; $member =~ s/,//g; #remove any commas from search string $member =~ s/\*/%/g; -my $env; my ($count,$results); if(length($member) == 1) { - ($count,$results)=BornameSearch($env,$member,$orderby,"simple"); + ($count,$results)=BornameSearch($member,$orderby,"simple"); } else { - ($count,$results)=BornameSearch($env,$member,$orderby,"advanced"); + ($count,$results)=BornameSearch($member,$orderby,"advanced"); } @@ -85,7 +84,7 @@ my @resultsdata; my $background = 0; for (my $i=0; $i < $count; $i++){ #find out stats - my ($od,$issue,$fines)=borrdata2($env,$results->[$i]{'borrowernumber'}); + my ($od,$issue,$fines)=borrdata2($results->[$i]{'borrowernumber'}); my %row = ( background => $background, diff --git a/members/moremember.pl b/members/moremember.pl index dbaeea23d0..5711268335 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -276,7 +276,6 @@ if ($borrowernumber) { my @reservloop; foreach my $num_res (@borrowerreserv) { my %getreserv; - my %env; my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); my $itemtypeinfo = getitemtypeinfo( $getiteminfo->{'itemtype'} ); my ( $transfertwhen, $transfertfrom, $transfertto ) = diff --git a/members/pay.pl b/members/pay.pl index 55f881278b..b4883b549a 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -75,9 +75,6 @@ for ( my $i = 0 ; $i < @names ; $i++ ) { $check = 2; } } -my %env; - -$env{'branchcode'} = $branch; my $total = $input->param('total'); if ( $check == 0 ) { my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -91,7 +88,7 @@ if ( $check == 0 ) { } ); if ( $total ne '' ) { - recordpayment( \%env, $borrowernumber, $total ); + recordpayment( $borrowernumber, $total ); } my ( $numaccts, $accts, $total ) = getboracctrecord( '', \%bor ); @@ -179,7 +176,6 @@ sub writeoff { my ( $borrowernumber, $accountnum, $itemnum, $accounttype, $amount ) = @_; my $user = $input->remote_user; my $dbh = C4::Context->dbh; - my $env; my $sth = $dbh->prepare( "Update accountlines set amountoutstanding=0 where (accounttype='Res' OR accounttype='FU' OR accounttype ='IP' OR accounttype='CH' OR accounttype='N' OR accounttype='F' OR accounttype='A' OR accounttype='M' OR accounttype='L' OR accounttype='RE' OR accounttype='RL') and accountno=? and borrowernumber=?" @@ -198,6 +194,6 @@ sub writeoff { $sth->execute( $borrowernumber, $account->{'max(accountno)'}, $itemnum, $amount ); $sth->finish; - UpdateStats( $env, $branch, 'writeoff', $amount, '', '', '', + UpdateStats( $branch, 'writeoff', $amount, '', '', '', $borrowernumber ); } diff --git a/misc/fines2.pl b/misc/fines2.pl index 9a0fe0fc19..ca5334d396 100755 --- a/misc/fines2.pl +++ b/misc/fines2.pl @@ -129,7 +129,6 @@ for (my $i=0;$i<$numOverdueItems;$i++){ if ($borrower->{'cardnumber'} ne ''){ my $cost=ReplacementCost($data->[$i]->{'itemnumber'}); my $dbh = C4::Context->dbh; - my $env; my $accountno=C4::Circulation::Circ2::getnextacctno($data->[$i]->{'borrowernumber'}); my $item=GetBiblioFromItemNumber($data->[$i]->{'itemnumber'}); if ($item->{'itemlost'} ne '1' && $item->{'itemlost'} ne '2' ){ diff --git a/misc/notifys/fines.pl b/misc/notifys/fines.pl index e06f74a9b8..3548f6126b 100755 --- a/misc/notifys/fines.pl +++ b/misc/notifys/fines.pl @@ -99,9 +99,7 @@ sub levyFines { if ($borrower->{'cardnumber'} ne ''){ my $cost=ReplacementCost($overdue->{'itemnumber'}); my $dbh=C4Connect(); - my $env; - - my $accountno=C4::Circulation::Circ2::getnextacctno($overdue->{'borrowernumber'}); + my $accountno=C4::Circulation::getnextacctno($overdue->{'borrowernumber'}); my $item=GetBiblioFromItemNumber($overdue->{'itemnumber'}); if ($item->{'itemlost'} ne '1' && $item->{'itemlost'} ne '2' ){ $item->{'title'}=~ s/\'/\\'/g; @@ -273,10 +271,8 @@ my %actions; my @bookdetails; my $total_fines = 0; - foreach my $over (@alloverdues) { - my %row_data; - my $env; #FIXME what is this varible for? - + foreach my $over (@alloverdues) { + my %row_data; if ( my $item = GetBiblioFromItemNumber( $over->{'itemnumber'})){ print "getting fine ($over->{'itemnumber'} $overdue->{'borrowernumber'} $over->{'borrowernumber'}\n"; my $fine = GetFine($over->{'itemnumber'},$overdue->{'borrowernumber'}); @@ -316,12 +312,10 @@ my %actions; } } - $template->param(BOOKDETAILS => \@bookdetails); - - my $env; + $template->param(BOOKDETAILS => \@bookdetails); my %params; %params->{'borrowernumber'} = $overdue->{'borrowernumber'}; - my ($count, $acctlines, $total) = &getboracctrecord($env, \%params); + my ($count, $acctlines, $total) = &getboracctrecord(\%params); $template->param(FINES_TOTAL => $total_fines); $template->param(OWING => $total); my $name= "$borrower->{'firstname'} $borrower->{'surname'}"; diff --git a/opac/opac-dictionary.pl b/opac/opac-dictionary.pl index 22398b6966..6d36353edd 100755 --- a/opac/opac-dictionary.pl +++ b/opac/opac-dictionary.pl @@ -75,8 +75,6 @@ my $type = $input->param('type'); my $dbh = C4::Context->dbh; my ( $template, $loggedinuser, $cookie ); -my $env; - my $startfrom = $input->param('startfrom'); $startfrom = 0 if ( !defined $startfrom ); my $searchdesc; diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl index 4b40f825e1..d529d3d59f 100755 --- a/opac/opac-renew.pl +++ b/opac/opac-renew.pl @@ -12,7 +12,6 @@ my $query = new CGI; my $itemnumber = $query->param('item'); my $borrowernumber = $query->param("borrowernumber"); -my %env; my $status = CanBookBeRenewed( $borrowernumber, $itemnumber ); if ( $status == 1 ) { AddRenewal( $borrowernumber, $itemnumber ); diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 0ed2f6d918..1be5e6a6fa 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -110,7 +110,6 @@ foreach my $issue ( @$issues ) { $issue->{$publictype} = 1; # check if item is renewable - my %env; my $status = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); $issue->{'status'} = $status; diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 07f415ec8e..2d42d6eed0 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -72,16 +72,15 @@ if ($type eq 'str8' && $borrowernumber ne ''){ $i2++; } } - my $env; my $const; if ($input->param('request') eq 'any'){ $const='a'; - CreateReserve(\$env,$branch,$borrowernumber->{'borrowernumber'},$biblionumber,$const,\@realbi,$rank[0],$notes,$title,$checkitem,$found); + CreateReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,$const,\@realbi,$rank[0],$notes,$title,$checkitem,$found); } elsif ($reqbib[0] ne ''){ $const='o'; - CreateReserve(\$env,$branch,$borrowernumber->{'borrowernumber'},$biblionumber,$const,\@reqbib,$rank[0],$notes,$title,$checkitem, $found); + CreateReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,$const,\@reqbib,$rank[0],$notes,$title,$checkitem, $found); } else { - CreateReserve(\$env,$branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem, $found); + CreateReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title,$checkitem, $found); } print $input->redirect("request.pl?biblionumber=$biblionumber"); diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl index 8ca84a4789..ba95040660 100755 --- a/reserve/renewscript.pl +++ b/reserve/renewscript.pl @@ -43,7 +43,6 @@ else { # # renew items # -my %env; my $cardnumber = $input->param("cardnumber"); my $borrowernumber = $input->param("borrowernumber"); diff --git a/reserve/request.pl b/reserve/request.pl index 08b4a88b38..1beb70c1a4 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -62,7 +62,6 @@ my $dat = GetBiblioData($biblionumber); my $findborrower = $input->param('findborrower'); $findborrower =~ s|,| |g; my $cardnumber = $input->param('cardnumber'); -my %env; my $borrowerslist; my $messageborrower; @@ -70,7 +69,7 @@ my $date = sprintf( '%04d-%02d-%02d', Today() ); if ($findborrower) { my ( $count, $borrowers ) = - BornameSearch( \%env, $findborrower, 'cardnumber', 'web' ); + BornameSearch($findborrower, 'cardnumber', 'web' ); my @borrowers = @$borrowers; @@ -351,7 +350,6 @@ foreach my $res ( sort { $a->{found} cmp $b->{found} } @$reserves ) { } if ( ( $res->{'found'} eq 'W' ) or ( $res->{'priority'} eq '0' ) ) { - my %env; my $item = $res->{'itemnumber'}; $item = getiteminformation($item,undef); $reserve{'wait'}= 1; diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl index 48dc3a105a..7d0bb6461b 100755 --- a/serials/routing-preview.pl +++ b/serials/routing-preview.pl @@ -44,7 +44,6 @@ my ($count,@serials) = GetSerials($subscriptionid); my ($template, $loggedinuser, $cookie); if($ok){ - my $env; # get biblio information.... my $biblio = $subs->{'biblionumber'}; @@ -72,7 +71,7 @@ if($ok){ if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){ UpdateReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch); } else { - CreateReserve(\$env,$branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title); + CreateReserve($branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title); } } diff --git a/tools/letter.pl b/tools/letter.pl index c4346fd1f7..eb954f8506 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -47,7 +47,7 @@ use C4::Interface::CGI::Output; sub StringSearch { - my ($env,$searchstring,$type)=@_; + my ($searchstring,$type)=@_; my $dbh = C4::Context->dbh; $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); @@ -252,8 +252,7 @@ if ($op eq 'add_form') { $template->param(search => 1); $template->param(searchfield => $searchfield); } - my $env; - my ($count,$results)=StringSearch($env,$searchfield,'web'); + my ($count,$results)=StringSearch($searchfield,'web'); my $toggle="white"; my @loop_data =(); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ -- 2.39.2