[Koha-cvs] koha renewscript.pl [dev_week]
Kyle Hall
kyle.m.hall at gmail.com
Mon Mar 19 18:05:39 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Kyle Hall <kylemhall> 07/03/19 17:05:39
Modified files:
. : renewscript.pl
Log message:
Added alert for failed renewals from moremember.pl
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/renewscript.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.6.2.1&r2=1.6.2.1.2.1
Patches:
Index: renewscript.pl
===================================================================
RCS file: /sources/koha/koha/Attic/renewscript.pl,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.1.2.1
diff -u -b -r1.6.2.1 -r1.6.2.1.2.1
--- renewscript.pl 27 Jan 2005 19:38:27 -0000 1.6.2.1
+++ renewscript.pl 19 Mar 2007 17:05:39 -0000 1.6.2.1.2.1
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: renewscript.pl,v 1.6.2.1 2005/01/27 19:38:27 oleonard Exp $
+# $Id: renewscript.pl,v 1.6.2.1.2.1 2007/03/19 17:05:39 kylemhall Exp $
#written 18/1/2000 by chris at katipo.co.nz
#script to renew items from the web
@@ -47,20 +47,37 @@
my $destination = $input->param("destination");
my $cardnumber = $input->param("cardnumber");
my $bornum=$input->param("bornum");
+
+my @renewFailures;
+
while ( my ($itemno, $value) = each %data) {
# warn "$itemno = $value\n";
if ($value eq 'y'){
#means we want to renew this item
#check its status
- my $status=renewstatus(\%env,$bornum,$itemno);
+
+ my $status = renewstatus( \%env, $bornum, $itemno );
if ($status == 1){
renewbook(\%env,$bornum,$itemno);
+ } else {
+ push( @renewFailures, $itemno );
}
}
}
+
+
if($destination eq "circ"){
- print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
+ my $redirectString = "/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber";
+ print $input->redirect( $redirectString );
} else {
- print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$bornum");
+ my $redirectString = "/cgi-bin/koha/members/moremember.pl?bornum=$bornum";
+
+ my $count = 1;
+ foreach $renewFailure ( @renewFailures ) {
+ $redirectString .= "&renewFailure$count=$renewFailure";
+ $count++;
+ }
+
+ print $input->redirect( $redirectString );
}
\ No newline at end of file
More information about the Koha-cvs
mailing list