[Koha-cvs] CVS: koha/C4 Auth.pm,1.9.2.19,1.9.2.20
Finlay Thompson
finlayt at users.sourceforge.net
Wed Dec 4 03:38:35 CET 2002
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv19811
Modified Files:
Tag: rel-1-2
Auth.pm
Log Message:
Auth now checks the defaulton field on the userflags table as well
Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.9.2.19
retrieving revision 1.9.2.20
diff -C2 -r1.9.2.19 -r1.9.2.20
*** Auth.pm 2 Dec 2002 01:33:39 -0000 1.9.2.19
--- Auth.pm 4 Dec 2002 02:38:33 -0000 1.9.2.20
***************
*** 71,80 ****
$sth->execute($cardnumber);
my ($flags) = $sth->fetchrow;
! $sth=$dbh->prepare("SELECT bit, flag FROM userflags");
$sth->execute;
! while (my ($bit, $flag) = $sth->fetchrow) {
! if ($flags & (2**$bit)) {
$userflags->{$flag}=1;
}
}
return $userflags;
--- 71,83 ----
$sth->execute($cardnumber);
my ($flags) = $sth->fetchrow;
! $sth=$dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
$sth->execute;
! while (my ($bit, $flag, $defaulton) = $sth->fetchrow) {
! if (($flags & (2**$bit)) || $defaulton) {
$userflags->{$flag}=1;
}
+ }
+ foreach my $key (keys %$userflags) {
+ warn "$key \n";
}
return $userflags;
More information about the Koha-cvs
mailing list