koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.25,1.26


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/C4 Reserves2.pm,1.25,1.26
Date: Sun, 19 Jan 2003 23:38:56 -0800

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv13122/C4

Modified Files:
        Reserves2.pm 
Log Message:
Removed scoping-related perl warnings


Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** Reserves2.pm        14 Oct 2002 04:22:25 -0000      1.25
--- Reserves2.pm        20 Jan 2003 07:38:54 -0000      1.26
***************
*** 300,307 ****
--- 300,311 ----
      }
      if (($biblio and $borr) and (not $item)) {
+ 
        # removing a reserve record....
        my $q_biblio = $dbh->quote($biblio);
        $borr = $dbh->quote($borr);
+ 
        # get the prioritiy on this record....
+       my $priority;
+       {
        my $query = "SELECT priority FROM reserves
                                      WHERE biblionumber   = $q_biblio
***************
*** 311,318 ****
        my $sth=$dbh->prepare($query);
        $sth->execute;
!       my ($priority) = $sth->fetchrow_array;
        $sth->finish;
        # update the database, removing the record...
!         # FIXME - There's already a $query in this scope.
          my $query = "update reserves set cancellationdate = now(),
                                           found            = Null,
--- 315,324 ----
        my $sth=$dbh->prepare($query);
        $sth->execute;
!       ($priority) = $sth->fetchrow_array;
        $sth->finish;
+       }
+ 
        # update the database, removing the record...
!       {
          my $query = "update reserves set cancellationdate = now(),
                                           found            = Null,
***************
*** 322,329 ****
                                       and cancellationdate is NULL
                                       and (found <> 'F' or found is NULL)";
-         # FIXME - There's already a $sth in this scope.
        my $sth = $dbh->prepare($query);
        $sth->execute;
        $sth->finish;
        # now fix the priority on the others....
        fixpriority($priority, $biblio);
--- 328,336 ----
                                       and cancellationdate is NULL
                                       and (found <> 'F' or found is NULL)";
        my $sth = $dbh->prepare($query);
        $sth->execute;
        $sth->finish;
+       }
+ 
        # now fix the priority on the others....
        fixpriority($priority, $biblio);
***************
*** 346,349 ****
--- 353,357 ----
      my ($res) = @_;
      my $dbh = C4::Context->dbh;
+ 
      # fill in a reserve record....
      # FIXME - Remove some of the redundancy here
***************
*** 351,355 ****
--- 359,366 ----
      my $borr = $res->{'borrowernumber'}; $borr = $dbh->quote($borr);
      my $resdate = $res->{'reservedate'}; $resdate = $dbh->quote($resdate);
+ 
      # get the priority on this record....
+     my $priority;
+     {
      my $query = "SELECT priority FROM reserves
                                  WHERE biblionumber   = $qbiblio
***************
*** 358,365 ****
      my $sth=$dbh->prepare($query);
      $sth->execute;
!     my ($priority) = $sth->fetchrow_array;
      $sth->finish;
      # update the database...
!     # FIXME - There's already a $query in this scope.
      my $query = "UPDATE reserves SET found            = 'F',
                                       priority         = 0
--- 369,378 ----
      my $sth=$dbh->prepare($query);
      $sth->execute;
!     ($priority) = $sth->fetchrow_array;
      $sth->finish;
+     }
+ 
      # update the database...
!     {
      my $query = "UPDATE reserves SET found            = 'F',
                                       priority         = 0
***************
*** 367,374 ****
                                   AND reservedate      = $resdate
                                   AND borrowernumber   = $borr";
-     # FIXME - There's already a $sth in this scope.
      my $sth = $dbh->prepare($query);
      $sth->execute;
      $sth->finish;
      # now fix the priority on the others (if the priority wasn't
      # already sorted!)....
--- 380,388 ----
                                   AND reservedate      = $resdate
                                   AND borrowernumber   = $borr";
      my $sth = $dbh->prepare($query);
      $sth->execute;
      $sth->finish;
+     }
+ 
      # now fix the priority on the others (if the priority wasn't
      # already sorted!)....




reply via email to

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