Update of /cvsroot/upcase-project/UpCase/lib
In directory usw-pr-cvs1:/tmp/cvs-serv5383
Modified Files:
uc_session_handler.php
Log Message:
Don't depend on uc_config.inc anymore, use a DbData object instead
Index: uc_session_handler.php
===================================================================
RCS file: /cvsroot/upcase-project/UpCase/lib/uc_session_handler.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** uc_session_handler.php 16 Jul 2002 15:31:56 -0000 1.1.1.1
--- uc_session_handler.php 5 Aug 2002 08:42:04 -0000 1.2
***************
*** 1,25 ****
<?php
! include_once("config/uc_config.inc");
include_once("lib/adodb/adodb.inc.php");
$DB_CONN = "";
$IP = "";
! $SESSIONS = $uc_config["prefix"] . $uc_config["table"]["sessions"];
// set it to the name of the table that hold session data
assert(!empty($SESSION_DATA));
function uc_session_open($save_path, $session_name)
{
! global $uc_config;
global $DB_CONN;
global $IP;
!
! $DB_CONN = NewADOConnection($uc_config["engine"]);
! $DB_CONN->PConnect($uc_config["host"],
! $uc_config["user"],
! $uc_config["password"],
! $uc_config["name"]) or
die("Unable to connect to Session database: " . $DB_CONN->ErrorMsg());
--- 1,29 ----
<?php
! include_once("lib/uc_dbdata.php");
include_once("lib/adodb/adodb.inc.php");
+
+ $dbdata = new DbData("/var/www/vhosts/test1/UpCase/config/upcase.xml");
+
$DB_CONN = "";
$IP = "";
! $SESSIONS = $dbdata->tblPrefix . $dbdata->dbTables["sessions"];
// set it to the name of the table that hold session data
assert(!empty($SESSION_DATA));
+
function uc_session_open($save_path, $session_name)
{
! global $dbdata;
global $DB_CONN;
global $IP;
!
! $DB_CONN = NewADOConnection($dbdata->dbType);
! $DB_CONN->PConnect($dbdata->dbHost,
! $dbdata->dbUser,
! $dbdata->dbPasswd,
! $dbdata->dbName) or
die("Unable to connect to Session database: " . $DB_CONN->ErrorMsg());
***************
*** 51,55 ****
! $res = $DB_CONN->Execute($query) or die("Error unable to get sessio: "
. $DB_CONN->ErrorMsg());
if ($res->RecordCount() == 1)
--- 55,59 ----
! $res = $DB_CONN->Execute($query) or die("Error unable to get session: "
. $DB_CONN->ErrorMsg());
if ($res->RecordCount() == 1)
|