sub checkauth {
my $query = shift;
+ # warn "Checking Auth";
# $authnotrequired will be set for scripts which will run without authentication
my $authnotrequired = shift;
my $flagsrequired = shift;
# If Version syspref is unavailable, it means Koha is beeing installed,
# and so we must redirect to OPAC maintenance page or to the WebInstaller
+ warn "about to check version";
unless (C4::Context->preference('Version')) {
if ($type ne 'opac') {
warn "Install required, redirecting to Installer";
}
=======
# my $session = new CGI::Session("driver:MySQL", $sessionID, {Handle=>$dbh});
- # this should be a system preference will work on this today, by default it will use mysql
- # but you can set it to use temporary files
my $session = new CGI::Session("driver:File", $sessionID, {Directory=>'/tmp'});
>>>>>>> Commenting out some noisy warns:C4/Auth.pm
C4::Context->_new_userenv($sessionID);
$session->param('branchname'), $session->param('flags'),
$session->param('emailaddress'), $session->param('branchprinter')
);
+# warn "".$session->param('cardnumber').", ".$session->param('firstname').",
+# ".$session->param('surname').", ".$session->param('branch');
}
my $ip;
my $lasttime;
= $sth->fetchrow
if ( $sth->rows );
+# warn "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
unless ( $sth->rows ) {
my $sth =
$dbh->prepare(
= $sth->fetchrow
if ( $sth->rows );
+# warn "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
unless ( $sth->rows ) {
$sth->execute($userid);
(