[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.1.2.5,1.1.2.6

Steve Tonnesen tonnesen at users.sourceforge.net
Wed Nov 6 00:26:27 CET 2002


Update of /cvsroot/koha/koha/opac
In directory usw-pr-cvs1:/tmp/cvs-serv22800/opac

Modified Files:
      Tag: rel-1-2
	opac-reserve.pl 
Log Message:
Added support for setting a required_date and an expiry_date on reserves.
Note that reserves system doesn't pay any attention to these dates, and the
librarian interface doesn't support setting these dates yet.


Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** opac-reserve.pl	28 Oct 2002 19:56:07 -0000	1.1.2.5
--- opac-reserve.pl	5 Nov 2002 23:26:25 -0000	1.1.2.6
***************
*** 126,129 ****
--- 126,137 ----
  	$template->param(no_items_selected => 1);
      }
+     my $required_date=join '-', $query->param('required-year'), $query->param('required-month'), $query->param('required-day');
+     my $expires_date=join '-', $query->param('expires-year'), $query->param('expires-month'), $query->param('expires-day');
+     ($query->param('required-year')) || ($required_date='');
+     ($query->param('expires-year')) || ($expires_date='');
+     warn "REQ: $required_date\n";
+     $template->param(required_date=> $required_date, 
+                      expires_date => $expires_date);
+ 
  
  } elsif ($query->param('place_reserve')) {
***************
*** 140,144 ****
      }
      my @reqbibs = keys %reqbibs;
!     CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'o',\@reqbibs,$rank,'',$title);
      print $query->redirect("/cgi-bin/koha/opac-user.pl");
  } else {
--- 148,154 ----
      }
      my @reqbibs = keys %reqbibs;
!     my $required_date=$query->param('required_date');
!     my $expires_date=$query->param('expires_date');
!     CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'o',\@reqbibs,$rank,'',$title, $required_date, $expires_date);
      print $query->redirect("/cgi-bin/koha/opac-user.pl");
  } else {





More information about the Koha-cvs mailing list