[Koha-cvs] CVS: koha/opac opac-logout.pl,1.2,1.3

Andrew Arensburger arensb at users.sourceforge.net
Fri Oct 11 14:50:44 CEST 2002


Update of /cvsroot/koha/koha/opac
In directory usw-pr-cvs1:/tmp/cvs-serv5782

Modified Files:
	opac-logout.pl 
Log Message:
Replaced &requireDBI with C4::Context->dbh, thus making the "use
Database" statement unnecessary.
Replaced a prepare()/execute() with a do().


Index: opac-logout.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-logout.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** opac-logout.pl	3 Oct 2002 08:51:29 -0000	1.2
--- opac-logout.pl	11 Oct 2002 12:50:42 -0000	1.3
***************
*** 2,6 ****
  
  use CGI;
! use C4::Database;
  use C4::Output;
  
--- 2,6 ----
  
  use CGI;
! use C4::Context;
  use C4::Output;
  
***************
*** 28,31 ****
--- 28,32 ----
  my $sessions;
  open (S, "/tmp/sessions");
+ 	# FIXME - Come up with a better logging mechanism
  while (my ($sid, $u, $lasttime) = split(/:/, <S>)) {
      chomp $lasttime;
***************
*** 42,46 ****
  }
  
! my $dbh=C4Connect;
  
  # Check that this is the ip that created the session before deleting it
--- 43,47 ----
  }
  
! my $dbh = C4::Context->dbh;
  
  # Check that this is the ip that created the session before deleting it
***************
*** 57,62 ****
  }
  
! $sth=$dbh->prepare("delete from sessions where sessionID=?");
! $sth->execute($sessionID);
  open L, ">>/tmp/sessionlog";
  my $time=localtime(time());
--- 58,62 ----
  }
  
! $dbh->do("delete from sessions where sessionID=?", $sessionID);
  open L, ">>/tmp/sessionlog";
  my $time=localtime(time());





More information about the Koha-cvs mailing list