Index: trunk/kernel/include/usersession.php =================================================================== diff -u -r2941 -r3282 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 2941) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 3282) @@ -129,7 +129,7 @@ $this->Set("GroupList",$this->Get("GroupList")); $this->Set("Language",$this->Get("Language")); $this->Set("tz",$this->Get("tz")); - $this->Set("LastAccessed",date("U")); + $this->Set("LastAccessed",adodb_date("U")); $this->Update(); } } @@ -217,7 +217,7 @@ { global $objConfig; - //$this->Set("LastAccessed",date("U")); + //$this->Set("LastAccessed",adodb_date("U")); $this->Set("IpAddress",$_SERVER["REMOTE_ADDR"]); if(!isset($this->m_SessionKey)) { @@ -262,7 +262,7 @@ { global $objConfig; - $this->Set("LastAccessed", time()); + $this->Set("LastAccessed", adodb_mktime()); if(!is_numeric($this->Get("PortalUserId"))) { $this->Set("PortalUserId",0); @@ -525,10 +525,10 @@ $app->setVisitField('PortalUserId', $this->Get('PortalUserId') ); } - $this->Set('LastAccessed', date('U') ); + $this->Set('LastAccessed', adodb_date('U') ); $this_login = $this->GetPersistantVariable("ThisLogin"); $this->SetPersistantVariable("LastLogin", $this_login); - $this->SetPersistantVariable("ThisLogin", time()); + $this->SetPersistantVariable("ThisLogin", adodb_mktime()); $this->ResetSysPermCache(); $this->PermCache = array(); $this->Update(); @@ -552,7 +552,7 @@ $this->Set("PortalUserId", 0); // not logged-in $this->Set('LastAccessed',0); // session become expired $this->Set("GroupId", $objConfig->Get("User_GuestGroup")); - #$this->SetPersistantVariable("LastLogin", time()); + #$this->SetPersistantVariable("LastLogin", adodb_mktime()); if ($FrontEnd) $group_list = $objConfig->Get('User_GuestGroup').','.$objConfig->Get('User_LoggedInGroup'); $this->Set("GroupList", $group_list); @@ -751,7 +751,7 @@ { global $objConfig; - $cutoff = time()-$objConfig->Get("SessionTimeout"); + $cutoff = adodb_mktime()-$objConfig->Get("SessionTimeout"); $thiskey = $this->GetSessionKey(); $sql = "SELECT SessionKey from ".GetTablePrefix()."UserSession WHERE LastAccessed<$cutoff AND SessionKey != '$thiskey'"; $result = $this->adodbConnection->Execute($sql); @@ -1049,7 +1049,7 @@ function GetTotalSessions() { - # $time = time() - 900; + # $time = adodb_mktime() - 900; $sql = "SELECT count(*) as SesCount FROM ".GetTablePrefix()."UserSession"; $result = $this->adodbConnection->Execute($sql); if ($result === false) @@ -1177,7 +1177,7 @@ global $objConfig; $a = $this->Get("LastAccessed"); - $cutoff = time()-$objConfig->Get("SessionTimeout"); + $cutoff = adodb_mktime()-$objConfig->Get("SessionTimeout"); //echo $a." ".$cutoff."
"; //$ip = ($_SERVER['REMOTE_ADDR'] == $this->Get("IpAddress")); //echo $this->Get("IpAddress"); @@ -1192,8 +1192,7 @@ function UpdateAccessTime() { - $now = time(); - $this->Set("LastAccessed",$now); + $this->Set("LastAccessed", adodb_mktime() ); } function InSpamControl($ResourceId,$DataType=NULL)