koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha C4/Members.pm members/deletemem.pl


From: Chris Cormack
Subject: [Koha-cvs] koha C4/Members.pm members/deletemem.pl
Date: Mon, 02 Jul 2007 00:38:18 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Chris Cormack <rangi>   07/07/02 00:38:18

Modified files:
        C4             : Members.pm 
        members        : deletemem.pl 

Log message:
        Fix for bug 1365

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Members.pm?cvsroot=koha&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/koha/members/deletemem.pl?cvsroot=koha&r1=1.15&r2=1.16

Patches:
Index: C4/Members.pm
===================================================================
RCS file: /sources/koha/koha/C4/Members.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- C4/Members.pm       13 Jun 2007 13:04:24 -0000      1.53
+++ C4/Members.pm       2 Jul 2007 00:38:17 -0000       1.54
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Members.pm,v 1.53 2007/06/13 13:04:24 toins Exp $
+# $Id: Members.pm,v 1.54 2007/07/02 00:38:17 rangi Exp $
 
 use strict;
 require Exporter;
@@ -31,7 +31,7 @@
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 
-$VERSION = do { my @v = '$Revision: 1.53 $' =~ /\d+/g; shift(@v) . "." . join( 
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.54 $' =~ /\d+/g; shift(@v) . "." . join( 
"_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -1620,6 +1620,8 @@
        WHERE borrowernumber = ?
    ";
     $sth = $dbh->prepare($query);
+    $sth->execute($borrowernumber);
+    $sth->finish;
     
&logaction(C4::Context->userenv->{'number'},"MEMBERS","DELETE",$borrowernumber,"")
 
         if C4::Context->preference("BorrowersLog");
     return $sth->rows;

Index: members/deletemem.pl
===================================================================
RCS file: /sources/koha/koha/members/deletemem.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- members/deletemem.pl        25 Apr 2007 14:07:34 -0000      1.15
+++ members/deletemem.pl        2 Jul 2007 00:38:18 -0000       1.16
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: deletemem.pl,v 1.15 2007/04/25 14:07:34 hdl Exp $
+# $Id: deletemem.pl,v 1.16 2007/07/02 00:38:18 rangi Exp $
 
 #script to delete items
 #written 2/5/00
@@ -46,10 +46,7 @@
 my %member2;
 $member2{'borrowernumber'}=$member;
 my ($countissues,$issues)=GetPendingIssues($member);
-my $i=0;
-foreach (sort keys %$issues) {
-       $i++;
-}
+
 my ($bor,$flags)=GetMemberDetails($member,'');
 if (C4::Context->preference("IndependantBranches")) {
        my $userenv = C4::Context->userenv;
@@ -66,8 +63,8 @@
 $sth->execute($member);
 my $data=$sth->fetchrow_hashref;
 $sth->finish;
-if ($i > 0 or $flags->{'CHARGES'}  or $data->{'borrowernumber'}){
-warn"je suis rentre dans la boucle";
+if ($countissues > 0 or $flags->{'CHARGES'}  or $data->{'borrowernumber'}){
+
        my ($template, $borrowernumber, $cookie)
                = get_template_and_user({template_name => 
"members/deletemem.tmpl",
                                        query => $input,
@@ -78,8 +75,8 @@
                                        });
        #   print $input->header;
        $template->param(borrowernumber => $member);
-       if ($i >0) {
-               $template->param(ItemsOnIssues => $i);
+       if ($countissues >0) {
+               $template->param(ItemsOnIssues => $countissues);
        }
        if ($flags->{'CHARGES'} ne '') {
                $template->param(charges => $flags->{'CHARGES'}->{'message'});




reply via email to

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