From 00ec3c59f52d8ce1490c54319a44721cd827d518 Mon Sep 17 00:00:00 2001 From: finlayt Date: Wed, 13 Nov 2002 03:02:45 +0000 Subject: [PATCH] resolving some simple conflicts --- C4/Auth.pm | 11 +++++++++-- C4/Print.pm | 3 +-- search.pl | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 2f14956315..0065dbc0b0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1,6 +1,5 @@ package C4::Auth; - # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -63,6 +62,9 @@ sub haspermission { my ($cardnumber) = $sth->fetchrow; ($cardnumber) || ($cardnumber=$userid); my $flags=getuserflags($cardnumber,$dbh); + foreach my $fl (keys %$flags){ + warn "$fl : $flags->{$fl}\n"; + } my $configfile=configfile(); if ($userid eq $configfile->{'user'}) { # Super User Account from /etc/koha.conf @@ -93,6 +95,7 @@ sub checkauth { my $template = gettemplate("opac-auth.tmpl", "opac"); my $dbh=C4Connect(); my $sth=$dbh->prepare("SELECT userid,ip,lasttime FROM sessions WHERE sessionid=?"); + warn "SessionID = $sessionID\n"; $sth->execute($sessionID); if ($sth->rows) { my ($userid, $ip, $lasttime) = $sth->fetchrow; @@ -121,7 +124,9 @@ sub checkauth { my $sti=$dbh->prepare("UPDATE sessions SET lasttime=? WHERE sessionID=?"); $sti->execute(time(), $sessionID); - if (my $flags = haspermission($dbh, $userid, $flagsrequired)) { + my $flags = haspermission($dbh, $userid, $flagsrequired); + warn "Flags : $flags\n"; + if ($flags) { return ($userid, $cookie, $sessionID, $flags); } else { $template->param(nopermission => 1); @@ -140,6 +145,7 @@ sub checkauth { } else { ($sessionID) || ($sessionID=int(rand()*100000).'-'.time()); + warn "sessionID : $sessionID"; my $userid=$query->param('userid'); my $password=$query->param('password'); my ($return, $cardnumber) = checkpw($dbh,$userid,$password); @@ -177,6 +183,7 @@ sub checkauth { if ($userid) { $template->param(message => "Invalid userid or password entered."); } + warn "Im in here!\n"; my @inputs; my $self_url = $query->self_url(); foreach my $name (param $query) { diff --git a/C4/Print.pm b/C4/Print.pm index 46b5bf2cde..3090b9bdff 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -49,6 +49,7 @@ The functions in this module handle sending text to a printer. =cut @ISA = qw(Exporter); + @EXPORT = qw(&remoteprint &printreserve &printslip); =item remoteprint @@ -69,9 +70,7 @@ C<$items> is a reference-to-list, where each element is a reference-to-hash describing a borrowed item. C<$items> may be gotten from C<¤tissues>. -=cut #' -# FIXME - It'd be nifty if this could generate pretty PostScript. sub remoteprint { my ($env,$items,$borrower)=@_; diff --git a/search.pl b/search.pl index f86c79f037..36043d9a3a 100755 --- a/search.pl +++ b/search.pl @@ -11,7 +11,7 @@ use C4::Output; # no contains gettemplate my $query=new CGI; my $type=$query->param('type'); -my ($loggedinuser, $cookie, $sessionID) = checkauth($query); +my ($loggedinuser, $cookie, $sessionID) = checkauth($query, (1); -- 2.39.5