[geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.25,1.26
dhaun at geeklog.net
dhaun at geeklog.net
Fri Jan 23 15:04:22 EST 2004
Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory geeklog_prod:/tmp/cvs-serv17480
Modified Files:
lib-sessions.php
Log Message:
Added missing global variable $_CONF in SESS_getUserIdFromSession(). Also make sure $_USER['uid'] is always set.
Index: lib-sessions.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** lib-sessions.php 28 Dec 2003 18:48:05 -0000 1.25
--- lib-sessions.php 23 Jan 2004 20:04:19 -0000 1.26
***************
*** 92,100 ****
$userdata = Array();
! // Check for a cookie on the users's machine. If the cookie exists, build an
! // array of the users info and setup the theme.
! if (isset($HTTP_COOKIE_VARS[$_CONF["cookie_session"]])) {
! $sessid = $HTTP_COOKIE_VARS[$_CONF["cookie_session"]];
if ($_SESS_VERBOSE) {
COM_errorLog("got $sessid as the session id from lib-common.php",1);
--- 92,100 ----
$userdata = Array();
! // Check for a cookie on the users's machine. If the cookie exists, build
! // an array of the users info and setup the theme.
! if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_session']])) {
! $sessid = $HTTP_COOKIE_VARS[$_CONF['cookie_session']];
if ($_SESS_VERBOSE) {
COM_errorLog("got $sessid as the session id from lib-common.php",1);
***************
*** 184,190 ****
setcookie($_CONF['cookie_lastvisit'], time(), $expiredate1, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']);
! // Set LastVisitTemp cookie, which only gets the time from the LastVisit cookie
! // if it does not exist yet otherwise, it gets the time from the LastVisitTemp
! // cookie
if (!isset($HTTP_COOKIE_VARS[$_CONF['cookie_lastvisittemp']])) {
$temptime = $HTTP_COOKIE_VARS[$_CONF['cookie_lastvisit']];
--- 184,190 ----
setcookie($_CONF['cookie_lastvisit'], time(), $expiredate1, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']);
! // Set LastVisitTemp cookie, which only gets the time from the LastVisit
! // cookie if it does not exist yet otherwise, it gets the time from the
! // LastVisitTemp cookie
if (!isset($HTTP_COOKIE_VARS[$_CONF['cookie_lastvisittemp']])) {
$temptime = $HTTP_COOKIE_VARS[$_CONF['cookie_lastvisit']];
***************
*** 200,205 ****
}
! return $_USER;
}
--- 200,208 ----
}
! if (!isset ($_USER['uid'])) {
! $_USER['uid'] = 1; // must be an anonymous user
! }
+ return $_USER;
}
***************
*** 332,336 ****
function SESS_getUserIdFromSession($sessid, $cookietime, $remote_ip, $md5_based=0)
{
! global $_TABLES, $_SESS_VERBOSE;
if ($_SESS_VERBOSE) {
--- 335,339 ----
function SESS_getUserIdFromSession($sessid, $cookietime, $remote_ip, $md5_based=0)
{
! global $_CONF, $_TABLES, $_SESS_VERBOSE;
if ($_SESS_VERBOSE) {
More information about the geeklog-cvs
mailing list