[Koha-cvs] CVS: koha/opac opac-userupdate.pl,1.1.2.4,1.1.2.5

Steve Tonnesen tonnesen at users.sourceforge.net
Mon Oct 28 21:54:37 CET 2002


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

Modified Files:
      Tag: rel-1-2
	opac-userupdate.pl 
Log Message:
Made patron update request email address into a system preference: KohaAdminEmailAddress.


Index: opac-userupdate.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-userupdate.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** opac-userupdate.pl	28 Oct 2002 19:56:10 -0000	1.1.2.4
--- opac-userupdate.pl	28 Oct 2002 20:54:34 -0000	1.1.2.5
***************
*** 7,10 ****
--- 7,11 ----
  use C4::Output;       # gettemplate
  use C4::Auth;         # checkauth, getborrowernumber.
+ use C4::Context;
  use C4::Koha;
  use C4::Circulation::Circ2;
***************
*** 27,31 ****
  my @fields = ('title', 'surname', 'firstname', 'phone', 'faxnumber', 'streetaddress', 'emailaddress', 'city');
  my $update;
! my $updateemailaddress = "finlay\@katipo.co.nz";      #Will have to change this! !!!!!!!!!!!!!!!!!!!
  if ($query->{'title'}) {
      # get all the fields:
--- 28,43 ----
  my @fields = ('title', 'surname', 'firstname', 'phone', 'faxnumber', 'streetaddress', 'emailaddress', 'city');
  my $update;
! my $updateemailaddress= C4::Context->preference('KohaAdminEmailAddress');
! if ($updateemailaddress eq '') {
!     warn "KohaAdminEmailAddress system preference not set.  Couldn't send patron update information for $borr->{'firstname'} $borr->{'surname'} (#$borrowernumber)\n";
!     my $template = gettemplate("kohaerror.tmpl", "opac");
! 
!     $template->param(errormessage => 'KohaAdminEmailAddress system preference
!     is not set.  Please visit the library to update your user record');
! 
!     print $query->header(), $template->output;
!     exit;
! }
! 
  if ($query->{'title'}) {
      # get all the fields:
***************
*** 48,51 ****
--- 60,64 ----
  	warn "Mail sent ok\n";
  	print $query->redirect('/cgi-bin/koha/opac-user.pl');
+ 	exit;
      } else {
  # do something if it doesnt work....





More information about the Koha-cvs mailing list