koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Auth.pm [rel_2_2]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha/C4 Auth.pm [rel_2_2]
Date: Wed, 05 Apr 2006 15:43:27 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Henri-Damien LAURENT <address@hidden>   06/04/05 15:43:27

Modified files:
        C4             : Auth.pm 

Log message:
        Bugfixing declaring $branchname.
        Changing Union for left join.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Auth.pm.diff?only_with_tag=rel_2_2&tr1=1.36.2.13&tr2=1.36.2.14&r1=text&r2=text

Patches:
Index: koha/C4/Auth.pm
diff -u koha/C4/Auth.pm:1.36.2.13 koha/C4/Auth.pm:1.36.2.14
--- koha/C4/Auth.pm:1.36.2.13   Wed Apr  5 15:06:58 2006
+++ koha/C4/Auth.pm     Wed Apr  5 15:43:27 2006
@@ -403,13 +403,13 @@
                                        C4::Context->_unset_userenv($sessionID);
                        }
                        if ($return == 1){
-                               my 
($bornum,$firstname,$surname,$userflags,$branchcode,$emailaddress);
-                               my $sth=$dbh->prepare("select 
borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress
 from borrowers,branches where borrowers.branchcode=branches.branchcode and 
userid=?");
+                               my 
($bornum,$firstname,$surname,$userflags,$branchcode,$branchname,$emailaddress);
+                               my $sth=$dbh->prepare("select 
borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress
 from borrowers left join branches on borrowers.branchcode=branches.branchcode 
where userid=?");
                                $sth->execute($userid);
                                
($bornum,$firstname,$surname,$userflags,$branchcode,$branchname, $emailaddress) 
= $sth->fetchrow if ($sth->rows);
 #                              warn 
"$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
                                unless ($sth->rows){
-                                       my $sth=$dbh->prepare("select 
borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress
 from borrowers,branches where borrowers.branchcode=branches.branchcode and 
cardnumber=?");
+                                       my $sth=$dbh->prepare("select 
borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress
 from borrowers left join branches on borrowers.branchcode=branches.branchcode 
where cardnumber=?");
                                        $sth->execute($cardnumber);
                                        
($bornum,$firstname,$surname,$userflags,$branchcode, $branchname,$emailaddress) 
= $sth->fetchrow if ($sth->rows);
 #                                      warn 
"$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]