[Koha-cvs] CVS: koha memberentry.pl,1.11,1.12
Andrew Arensburger
arensb at users.sourceforge.net
Sun Oct 6 01:56:35 CEST 2002
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv17170
Modified Files:
memberentry.pl
Log Message:
Use C4::Context->preference, rather than getting all system
preferences and picking out only what's needed.
Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/memberentry.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** memberentry.pl 5 Oct 2002 09:45:55 -0000 1.11
--- memberentry.pl 5 Oct 2002 23:56:33 -0000 1.12
***************
*** 62,71 ****
my $cardnumber=$data->{'cardnumber'};
! my %systemprefs=systemprefs();
# FIXME
# This logic should probably be moved out of the presentation code.
# Not tonight though.
#
! if ($cardnumber eq '' && $systemprefs{'autoMemberNum'} eq '1') {
my $dbh = C4::Context->dbh;
my $query="select max(substring(borrowers.cardnumber,2,7)) from borrowers";
--- 62,74 ----
my $cardnumber=$data->{'cardnumber'};
! my $autonumber_members = C4::Context->preference("autoMemberNum") || 0;
! # Find out whether member numbers should be generated
! # automatically. Should be either "1" or something else.
! # Defaults to "0", which is interpreted as "no".
# FIXME
# This logic should probably be moved out of the presentation code.
# Not tonight though.
#
! if ($cardnumber eq '' && $autonumber_members eq '1') {
my $dbh = C4::Context->dbh;
my $query="select max(substring(borrowers.cardnumber,2,7)) from borrowers";
More information about the Koha-cvs
mailing list