[Koha-cvs] CVS: koha/C4 Auth.pm,1.24,1.25 Input.pm,1.11,1.12

Paul POULAIN tipaul at users.sourceforge.net
Wed Mar 19 22:03:37 CET 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv14279/C4

Modified Files:
	Auth.pm Input.pm 
Log Message:
reindenting & code cleaning

Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** Auth.pm	6 Feb 2003 06:35:26 -0000	1.24
--- Auth.pm	19 Mar 2003 21:03:32 -0000	1.25
***************
*** 348,380 ****
  # tables passwd field
  #
! 
!     my ($dbh, $userid, $password) = @_;
!     {
!       my $sth=$dbh->prepare
! 	  ("select password,cardnumber from borrowers where userid=?");
!       $sth->execute($userid);
!       if ($sth->rows) {
! 	my ($md5password,$cardnumber) = $sth->fetchrow;
! 	if (md5_base64($password) eq $md5password) {
! 	    return 1,$cardnumber;
  	}
!       }
!     }
!     {
!       my $sth=$dbh->prepare
! 	  ("select password from borrowers where cardnumber=?");
!       $sth->execute($userid);
!       if ($sth->rows) {
! 	my ($md5password) = $sth->fetchrow;
! 	if (md5_base64($password) eq $md5password) {
! 	    return 1,$userid;
  	}
!       }
!     }
!     if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) {
!         # Koha superuser account
! 	return 2;
!     }
!     return 0;
  }
  
--- 348,375 ----
  # tables passwd field
  #
! 	my ($dbh, $userid, $password) = @_;
! 	warn "$userid / $password";
! 	my $sth=$dbh->prepare("select password,cardnumber from borrowers where userid=?");
! 	$sth->execute($userid);
! 	if ($sth->rows) {
! 		my ($md5password,$cardnumber) = $sth->fetchrow;
! 		warn "==> ".md5_base64($password)." = $md5password";
! 		if (md5_base64($password) eq $md5password) {
! 			return 1,$cardnumber;
! 		}
  	}
! 	my $sth=$dbh->prepare("select password from borrowers where cardnumber=?");
! 	$sth->execute($userid);
! 	if ($sth->rows) {
! 		my ($md5password) = $sth->fetchrow;
! 		if (md5_base64($password) eq $md5password) {
! 			return 1,$userid;
! 		}
  	}
! 	if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) {
! 		# Koha superuser account
! 		return 2;
! 	}
! 	return 0;
  }
  

Index: Input.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Input.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** Input.pm	18 Mar 2003 10:58:20 -0000	1.11
--- Input.pm	19 Mar 2003 21:03:33 -0000	1.12
***************
*** 81,85 ****
  sub checkdigit {
  	if (C4::Context->preference("checkdigit") eq "none") {
- 		warn "XXcheckdigit : ".C4::Context->preference("checkdigit");
  		return 1;
  	} else {
--- 81,84 ----





More information about the Koha-cvs mailing list