Ported session storage code to support PostgreSQL

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Nighswonger 2007-11-14 16:10:05 -06:00 committed by Joshua Ferraro
parent 758e5aa0ef
commit 8b50bde81b
1 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# -*- tab-width: 8 -*-
# NOTE: This file uses 8-character tabs; do not change the tab size!
@ -412,9 +413,12 @@ sub checkauth {
if ($storage_method eq 'mysql'){
$session = new CGI::Session("driver:MySQL", $sessionID, {Handle=>$dbh});
}
elsif ($storage_method eq 'Pg') {
$session = new CGI::Session("driver:PostgreSQL", $sessionID, {Handle=>$dbh});
}
else {
# catch all defaults to tmp should work on all systems
$session = new CGI::Session("driver:File", $sessionID, {Directory=>'/tmp'});
$session = new CGI::Session("driver:File", $sessionID, {Directory=>'/tmp'});
}
C4::Context->_new_userenv($sessionID);
if ($session){
@ -501,6 +505,9 @@ sub checkauth {
if ($storage_method eq 'mysql'){
$session = new CGI::Session("driver:MySQL", $sessionID, {Handle=>$dbh});
}
elsif ($storage_method eq 'Pg') {
$session = new CGI::Session("driver:PostgreSQL", $sessionID, {Handle=>$dbh});
}
else {
# catch all defaults to tmp should work on all systems
$session = new CGI::Session("driver:File", $sessionID, {Directory=>'/tmp'});