From ee06b581ce9debe2e0f39450d525925f3896e8b2 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 7 Apr 2010 15:01:19 +0200 Subject: [PATCH] MT3186: Remove warnings from Auth_with_cas Signed-off-by: Henri-Damien LAURENT Signed-off-by: Galen Charlton --- C4/Auth_with_cas.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm index 501fdefc98..f9a03a3f17 100644 --- a/C4/Auth_with_cas.pm +++ b/C4/Auth_with_cas.pm @@ -18,6 +18,7 @@ package C4::Auth_with_cas; # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; +use warnings; use C4::Debug; use C4::Context; @@ -44,20 +45,20 @@ my $casserver = C4::Context->preference('casServerUrl'); sub logout_cas { my ($query) = @_; my $cas = Authen::CAS::Client->new($casserver); - print $query->redirect($cas->logout_url(url => %ENV->{'SCRIPT_URI'})); + print $query->redirect($cas->logout_url(url => $ENV{'SCRIPT_URI'})); } # Login to CAS sub login_cas { my ($query) = @_; my $cas = Authen::CAS::Client->new($casserver); - print $query->redirect($cas->login_url(%ENV->{'SCRIPT_URI'})); + print $query->redirect($cas->login_url($ENV{'SCRIPT_URI'})); } # Returns CAS login URL with callback to the requesting URL sub login_cas_url { my $cas = Authen::CAS::Client->new($casserver); - return $cas->login_url(%ENV->{'SCRIPT_URI'}); + return $cas->login_url($ENV{'SCRIPT_URI'}); } # Checks for password correctness @@ -73,7 +74,7 @@ sub checkpw_cas { $debug and warn "Got ticket : $ticket"; # We try to validate it - my $val = $cas->service_validate(%ENV->{'SCRIPT_URI'}, $ticket); + my $val = $cas->service_validate($ENV{'SCRIPT_URI'}, $ticket); # If it's valid if( $val->is_success() ) { @@ -88,7 +89,7 @@ sub checkpw_cas { $retnumber = $sth->fetchrow; return (1, $retnumber, $userid); } - my $sth = $dbh->prepare("select userid from borrowers where cardnumber=?"); + $sth = $dbh->prepare("select userid from borrowers where cardnumber=?"); $sth->execute($userid); if ( $sth->rows ) { $retnumber = $sth->fetchrow; -- 2.20.1