koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Reserves.pm,1.4,1.5


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/C4 Reserves.pm,1.4,1.5
Date: Sun, 13 Oct 2002 01:30:25 -0700

Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv14969

Modified Files:
        Reserves.pm 
Log Message:
Deleted unused variables.
Removed trailing whitespace.


Index: Reserves.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Reserves.pm 12 Oct 2002 07:31:35 -0000      1.4
--- Reserves.pm 13 Oct 2002 08:30:23 -0000      1.5
***************
*** 1,4 ****
--- 1,6 ----
  package C4::Reserves;
  
+ # $Id$
+ 
  # Copyright 2000-2002 Katipo Communications
  #
***************
*** 32,81 ****
  use C4::Circulation::Borrower;
  use C4::Search;
! use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
!   
  # set the version for version checking
  $VERSION = 0.01;
!     
  @ISA = qw(Exporter);
  @EXPORT = qw(&EnterReserves CalcReserveFee CreateReserve );
- %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
-                 
- # your exported package globals go here,
- # as well as any optionally exported functions
- 
- @EXPORT_OK   = qw($Var1 %Hashit);
- 
- 
- # non-exported package globals go here
- use vars qw(@more $stuff);
-       
- # initalize package globals, first exported ones
- 
- my $Var1   = '';
- my %Hashit = ();
-                   
- # then the others (which are still accessible as $Some::Module::stuff)
- my $stuff  = '';
- my @more   = ();
-       
- # all file-scoped lexicals must be created before
- # the functions below that use them.
-               
- # file-private lexicals go here
- my $priv_var    = '';
- my %secret_hash = ();
-                           
- # here's a file-private function as a closure,
- # callable as &$priv_func;  it cannot be prototyped.
- my $priv_func = sub {
-   # stuff goes here.
- };
-                                                   
- # make all your functions, whether exported or not;
  
  # FIXME - This doesn't appear to ever be used, except in modules that
  # appear to be obsolete.
  sub EnterReserves{
!   my ($env)address@hidden;  
    my $titlepanel = titlepanel($env,"Reserves","Enter Selection");
    my @flds = ("No of 
entries","Barcode","ISBN","Title","Keywords","Author","Subject");
--- 34,49 ----
  use C4::Circulation::Borrower;
  use C4::Search;
! use vars qw($VERSION @ISA @EXPORT);
! 
  # set the version for version checking
  $VERSION = 0.01;
! 
  @ISA = qw(Exporter);
  @EXPORT = qw(&EnterReserves CalcReserveFee CreateReserve );
  
  # FIXME - This doesn't appear to ever be used, except in modules that
  # appear to be obsolete.
  sub EnterReserves{
!   my ($env)address@hidden;
    my $titlepanel = titlepanel($env,"Reserves","Enter Selection");
    my @flds = ("No of 
entries","Barcode","ISBN","Title","Keywords","Author","Subject");
***************
*** 86,90 ****
    if ($reason ne "") {
      $donext = $reason;
!   } else {  
      my %search;
      $search{'title'}= $title;
--- 54,58 ----
    if ($reason ne "") {
      $donext = $reason;
!   } else {
      my %search;
      $search{'title'}= $title;
***************
*** 109,113 ****
          if ($keyword ne ''){
            
($count,@results)=&KeywordSearch($env,'intra',\%search,$num,$offset);
!         } else { 
            ($count,@results)=&CatSearch($env,'loose',\%search,$num,$offset);
          }
--- 77,81 ----
          if ($keyword ne ''){
            
($count,@results)=&KeywordSearch($env,'intra',\%search,$num,$offset);
!         } else {
            ($count,@results)=&CatSearch($env,'loose',\%search,$num,$offset);
          }
***************
*** 119,124 ****
        if ($no_ents == 1) {
          my @ents = split("\t",@results[0]);
!         $biblionumber  = @ents[2];       
!       } else {  
          my %biblio_xref;
          my @bibtitles;
--- 87,92 ----
        if ($no_ents == 1) {
          my @ents = split("\t",@results[0]);
!         $biblionumber  = @ents[2];
!       } else {
          my %biblio_xref;
          my @bibtitles;
***************
*** 130,134 ****
          my $auth = substr(@ents[0],0,30);
          substr($line,(70-length($auth)-2),length($auth)+2) = "  ".$auth;
!           @bibtitles[$i]=$line;        
            address@hidden;
            $i++;
--- 98,102 ----
          my $auth = substr(@ents[0],0,30);
          substr($line,(70-length($auth)-2),length($auth)+2) = "  ".$auth;
!           @bibtitles[$i]=$line;
            address@hidden;
            $i++;
***************
*** 139,148 ****
                  $biblionumber = $biblio_xref{$bibres};
          } else {
!         $donext = $results;       
        }
        }
!       
        if ($biblionumber eq "") {
!         error_msg($env,"No items found");   
        } else {
          my @items = GetItems($env,$biblionumber);
--- 107,116 ----
                  $biblionumber = $biblio_xref{$bibres};
          } else {
!         $donext = $results;
        }
        }
! 
        if ($biblionumber eq "") {
!         error_msg($env,"No items found");
        } else {
          my @items = GetItems($env,$biblionumber);
***************
*** 169,175 ****
                  my ($reason,$borcode,$branch,$constraint,$bibitems) =
              MakeReserveScreen($env, $data, address@hidden, address@hidden);
!                 if ($borcode ne "") { 
            my ($borrnum,$borrower) = findoneborrower($env,$dbh,$borcode);
!                   if ($reason eq "") { 
                      if ($borrnum ne "") {
                my $fee =
--- 137,143 ----
                  my ($reason,$borcode,$branch,$constraint,$bibitems) =
              MakeReserveScreen($env, $data, address@hidden, address@hidden);
!                 if ($borcode ne "") {
            my ($borrnum,$borrower) = findoneborrower($env,$dbh,$borcode);
!                   if ($reason eq "") {
                      if ($borrnum ne "") {
                my $fee =
***************
*** 178,191 ****
                  $donext = "Circ"
                }
!             
              } else {
                      $donext = $reason;
            }
!         } else { $donext = "Circ" }  
!       } 
        }
      }
    }
!   return ($donext);  
  }
  
--- 146,159 ----
                  $donext = "Circ"
                }
! 
              } else {
                      $donext = $reason;
            }
!         } else { $donext = "Circ" }
!       }
        }
      }
    }
!   return ($donext);
  }
  
***************
*** 197,202 ****
    my $dbh = C4::Context->dbh;
    my $const = lc substr($constraint,0,1);
!   my $query = "select * from borrowers,categories 
!     where (borrowernumber = '$borrnum') 
      and (borrowers.categorycode = categories.categorycode)";
    my $sth = $dbh->prepare($query);
--- 165,170 ----
    my $dbh = C4::Context->dbh;
    my $const = lc substr($constraint,0,1);
!   my $query = "select * from borrowers,categories
!     where (borrowernumber = '$borrnum')
      and (borrowers.categorycode = categories.categorycode)";
    my $sth = $dbh->prepare($query);
***************
*** 210,214 ****
      # first find biblioitem records
      my @biblioitems;
!     my $query1 = "select * from biblio,biblioitems 
         where (biblio.biblionumber = '$biblionumber')
         and (biblio.biblionumber = biblioitems.biblionumber)";
--- 178,182 ----
      # first find biblioitem records
      my @biblioitems;
!     my $query1 = "select * from biblio,biblioitems
         where (biblio.biblionumber = '$biblionumber')
         and (biblio.biblionumber = biblioitems.biblionumber)";
***************
*** 226,230 ****
          }
          $x++;
!         } 
        if ($const eq 'o') {if ($found == 1) {push @biblioitems,$data;}
        } else {if ($found == 0) {push @biblioitems,$data;} }
--- 194,198 ----
          }
          $x++;
!         }
        if ($const eq 'o') {if ($found == 1) {push @biblioitems,$data;}
        } else {if ($found == 0) {push @biblioitems,$data;} }
***************
*** 237,247 ****
      my $allissued = 1;
      while ($x < $cntitemsfound) {
!       my $bitdata = @biblioitems[$x]; 
!       my $query2 = "select * from items 
!         where biblioitemnumber = '$bitdata->{'biblioitemnumber'}'"; 
        my $sth2 = $dbh->prepare($query2);
        $sth2->execute;
!       while (my $itdata=$sth2->fetchrow_hashref) { 
!         my $query3 = "select * from issues 
             where itemnumber = '$itdata->{'itemnumber'}' and returndate is 
null";
          my $sth3 = $dbh->prepare($query3);
--- 205,215 ----
      my $allissued = 1;
      while ($x < $cntitemsfound) {
!       my $bitdata = @biblioitems[$x];
!       my $query2 = "select * from items
!         where biblioitemnumber = '$bitdata->{'biblioitemnumber'}'";
        my $sth2 = $dbh->prepare($query2);
        $sth2->execute;
!       while (my $itdata=$sth2->fetchrow_hashref) {
!         my $query3 = "select * from issues
             where itemnumber = '$itdata->{'itemnumber'}' and returndate is 
null";
          my $sth3 = $dbh->prepare($query3);
***************
*** 258,262 ****
        if (my $rdata = $rsth->fetchrow_hashref) { } else {
          $fee = 0;
!       }       
      }
    }
--- 226,230 ----
        if (my $rdata = $rsth->fetchrow_hashref) { } else {
          $fee = 0;
!       }
      }
    }
***************
*** 274,278 ****
    my @datearr = localtime(time);
    my $resdate = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
!   #eval {     
      # updates take place here
      if ($fee > 0) {
--- 242,246 ----
    my @datearr = localtime(time);
    my $resdate = (1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
!   #eval {
      # updates take place here
      if ($fee > 0) {
***************
*** 307,318 ****
    #  # update failed
    #  my $temp = @_;
!   #  #  error_msg($env,"Update failed");    
!   #  $dbh->rollback(); 
    #}
    return();
! } # end CreateReserve    
!     
! 
! 
!                       
! END { }       # module clean-up code here (global destructor)
--- 275,281 ----
    #  # update failed
    #  my $temp = @_;
!   #  #  error_msg($env,"Update failed");
!   #  $dbh->rollback();
    #}
    return();
! } # end CreateReserve




reply via email to

[Prev in Thread] Current Thread [Next in Thread]