phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104.4.1,1


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104.4.1,1.104.4.2 class.sessions_db.inc.php,1.2.2.10.2.3,1.2.2.10.2.4 class.sessions_php4.inc.php,1.6.2.10.2.1,1.6.2.10.2.2
Date: Sat, 17 May 2003 19:58:15 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv2400

Modified Files:
      Tag: Version-0_9_16-branch
        class.sessions.inc.php class.sessions_db.inc.php 
        class.sessions_php4.inc.php 
Log Message:
merged the changes in the session-class from HEAD:
- configurable session and app_session timeout
- logs are now in server-time (not gmt)
- get_var


Index: class.sessions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions.inc.php,v
retrieving revision 1.104.4.1
retrieving revision 1.104.4.2
diff -C2 -r1.104.4.1 -r1.104.4.2
*** class.sessions.inc.php      17 May 2003 20:45:06 -0000      1.104.4.1
--- class.sessions.inc.php      17 May 2003 23:58:12 -0000      1.104.4.2
***************
*** 69,78 ****
                {
                        $this->db = $this->db2 = $GLOBALS['phpgw']->db;
!                       $this->sessionid = 
(isset($GLOBALS['HTTP_GET_VARS']['sessionid'])?$GLOBALS['HTTP_GET_VARS']['sessionid']:(isset($GLOBALS['HTTP_COOKIE_VARS']['sessionid'])?$GLOBALS['HTTP_COOKIE_VARS']['sessionid']:''));
!                       $this->kp3       = 
(isset($GLOBALS['HTTP_GET_VARS']['kp3'])?$GLOBALS['HTTP_GET_VARS']['kp3']:(isset($GLOBALS['HTTP_COOKIE_VARS']['kp3'])?$GLOBALS['HTTP_COOKIE_VARS']['kp3']:''));
  
                        /* Create the crypto object */
                        $GLOBALS['phpgw']->crypto = 
CreateObject('phpgwapi.crypto');
-                       $GLOBALS['phpgw']->datetime = 
CreateObject('phpgwapi.datetime');
                        $this->phpgw_set_cookiedomain();
                        
--- 69,77 ----
                {
                        $this->db = $this->db2 = $GLOBALS['phpgw']->db;
!                       $this->sessionid = 
get_var('sessionid',array('GET','COOKIE'));
!                       $this->kp3       = get_var('kp3',array('GET','COOKIE'));
  
                        /* Create the crypto object */
                        $GLOBALS['phpgw']->crypto = 
CreateObject('phpgwapi.crypto');
                        $this->phpgw_set_cookiedomain();
                        
***************
*** 102,106 ****
                        if 
(!isset($GLOBALS['phpgw_info']['server']['install_id']))
                        {
!                               $this->install_id  = 
md5($GLOBALS['phpgw']->datetime->gmtnow . 
$GLOBALS['phpgw']->common->randomstring(10));
                                $save_rep = True;
                        }
--- 101,115 ----
                        if 
(!isset($GLOBALS['phpgw_info']['server']['install_id']))
                        {
!                               $GLOBALS['phpgw_info']['server']['install_id']  
= md5($GLOBALS['phpgw']->common->randomstring(15));
!                               $save_rep = True;
!                       }
!                       if 
(!isset($GLOBALS['phpgw_info']['server']['sessions_timeout']))
!                       {
!                               
$GLOBALS['phpgw_info']['server']['sessions_timeout'] = 14400;
!                               $save_rep = True;
!                       }
!                       if 
(!isset($GLOBALS['phpgw_info']['server']['sessions_app_timeout']))
!                       {
!                               
$GLOBALS['phpgw_info']['server']['sessions_app_timeout'] = 86400;
                                $save_rep = True;
                        }
***************
*** 114,117 ****
--- 123,128 ----
                                
$config->value('num_unsuccessful_ip',$GLOBALS['phpgw_info']['server']['num_unsuccessful_ip']);
                                
$config->value('install_id',$GLOBALS['phpgw_info']['server']['install_id']);
+                               
$config->value('sessions_timeout',$GLOBALS['phpgw_info']['server']['sessions_timeout']);
+                               
$config->value('sessions_app_timeout',$GLOBALS['phpgw_info']['server']['sessions_app_timeout']);
                                $config->save_repository();
                                unset($config);
***************
*** 156,161 ****
                        if(empty($sessionid) || !$sessionid)
                        {
!                               $sessionid = 
$GLOBALS['HTTP_GET_VARS']['sessionid'] ? $GLOBALS['HTTP_GET_VARS']['sessionid'] 
: $GLOBALS['HTTP_COOKIE_VARS']['sessionid'];
!                               $kp3       = $GLOBALS['HTTP_GET_VARS']['kp3']   
    ? $GLOBALS['HTTP_GET_VARS']['kp3']       : 
$GLOBALS['HTTP_COOKIE_VARS']['kp3'];
                        }
  
--- 167,172 ----
                        if(empty($sessionid) || !$sessionid)
                        {
!                               $sessionid = 
get_var('sessionid',array('GET','COOKIE'));
!                               $kp3       = 
get_var('kp3',array('GET','COOKIE'));
                        }
  
***************
*** 165,168 ****
--- 176,185 ----
                        $session = $this->read_session($sessionid);
  
+                       if ($session['session_dla'] <= (time() - 
$GLOBALS['phpgw_info']['server']['sessions_timeout']))
+                       {
+                               $this->clean_sessions();
+                               return False;
+                       }
+ 
                        $this->session_flags = $session['session_flags'];
  
***************
*** 371,375 ****
                        $login_array = explode('@', $login);
                        $this->account_lid = $login_array[0];
!                       $now = $GLOBALS['phpgw']->datetime->gmtnow;
  
                        if (count($login_array) > 1)
--- 388,392 ----
                        $login_array = explode('@', $login);
                        $this->account_lid = $login_array[0];
!                       $now = time();
  
                        if (count($login_array) > 1)
***************
*** 406,410 ****
                        $GLOBALS['phpgw_info']['user']['account_id'] = 
$this->account_id;
                        
$GLOBALS['phpgw']->accounts->accounts($this->account_id);
!                       $this->sessionid = 
md5($GLOBALS['phpgw']->datetime->gmtnow . 
$GLOBALS['phpgw']->common->randomstring(10));
                        $this->kp3       = 
md5($GLOBALS['phpgw']->common->randomstring(15));
  
--- 423,427 ----
                        $GLOBALS['phpgw_info']['user']['account_id'] = 
$this->account_id;
                        
$GLOBALS['phpgw']->accounts->accounts($this->account_id);
!                       $this->sessionid = 
md5($GLOBALS['phpgw']->common->randomstring(15));
                        $this->kp3       = 
md5($GLOBALS['phpgw']->common->randomstring(15));
  
***************
*** 432,436 ****
  
                        $this->read_repositories(False);
!                       if ($this->user['expires'] != -1 && 
$this->user['expires'] < $GLOBALS['phpgw']->datetime->gmtnow)
                        {
                                if(is_object($GLOBALS['phpgw']->log))
--- 449,453 ----
  
                        $this->read_repositories(False);
!                       if ($this->user['expires'] != -1 && 
$this->user['expires'] < time())
                        {
                                if(is_object($GLOBALS['phpgw']->log))
***************
*** 482,486 ****
                function 
log_access($sessionid,$login='',$user_ip='',$account_id='')
                {
!                       $now = $GLOBALS['phpgw']->datetime->gmtnow;
  
                        if ($login != '')
--- 499,503 ----
                function 
log_access($sessionid,$login='',$user_ip='',$account_id='')
                {
!                       $now = time();
  
                        if ($login != '')
***************
*** 514,518 ****
                {
                        $blocked = False;
!                       $block_time = $GLOBALS['phpgw']->datetime->gmtnow - 
$GLOBALS['phpgw_info']['server']['block_time'] * 60;
                        
                        $ip = $this->db->db_addslashes($ip);
--- 531,535 ----
                {
                        $blocked = False;
!                       $block_time = time() - 
$GLOBALS['phpgw_info']['server']['block_time'] * 60;
                        
                        $ip = $this->db->db_addslashes($ip);
***************
*** 534,538 ****
                        if ($blocked && 
$GLOBALS['phpgw_info']['server']['admin_mails'] &&
                                // max. one mail each 5mins
!                           
$GLOBALS['phpgw_info']['server']['login_blocked_mail_time'] < 
$GLOBALS['phpgw']->datetime->gmtnow-5*60)
                        {
                                // notify admin(s) via email
--- 551,555 ----
                        if ($blocked && 
$GLOBALS['phpgw_info']['server']['admin_mails'] &&
                                // max. one mail each 5mins
!                           
$GLOBALS['phpgw_info']['server']['login_blocked_mail_time'] < time()-5*60)
                        {
                                // notify admin(s) via email
***************
*** 554,558 ****
                                $config = 
CreateObject('phpgwapi.config','phpgwapi');
                                $config->read_repository();
!                               
$config->value('login_blocked_mail_time',$GLOBALS['phpgw']->datetime->gmtnow);
                                $config->save_repository();
                        }
--- 571,575 ----
                                $config = 
CreateObject('phpgwapi.config','phpgwapi');
                                $config->read_repository();
!                               
$config->value('login_blocked_mail_time',time());
                                $config->save_repository();
                        }
***************
*** 691,695 ****
                        $login_array = explode('@', $login);
                        $this->account_lid = $login_array[0];
!                       $now = $GLOBALS['phpgw']->datetime->gmtnow;
  
                        if ($login_array[1] != '')
--- 708,712 ----
                        $login_array = explode('@', $login);
                        $this->account_lid = $login_array[0];
!                       $now = time();
  
                        if ($login_array[1] != '')
***************
*** 891,1007 ****
                function link($url, $extravars = '')
                {
!                       $kp3 = $GLOBALS['HTTP_GET_VARS']['kp3'] ? 
$GLOBALS['HTTP_GET_VARS']['kp3'] : $GLOBALS['HTTP_COOKIE_VARS']['kp3'];
  
!                       if (! $kp3)
                        {
!                               $kp3 = $GLOBALS['phpgw_info']['user']['kp3'];
                        }
  
!                       // Explicit hack to work around problems with php 
running as CGI on windows
!                       // please let us know if this doesn't work for you!
! 
!                       // I am not sure how my changes will affect the 
following.
!                       // Could someone with access to a Windows install check 
it ? (jengo)
! 
! /*                    if (! $url && (PHP_OS == 'Windows' || PHP_OS == 'OS/2' 
|| PHP_OS == 'WIN32' || PHP_OS == 'WIN16'))
                        {
!                               $exe = strpos($GLOBALS['PHP_SELF'],'php.exe');
!                               if ($exe != false) {
!                                       $exe += 7; // strlen('php.exe')
!                                       $url_root = split ('/', 
$GLOBALS['phpgw_info']['server']['webserver_url']);
!                                       $url = (strlen($url_root[0])? 
$url_root[0].'//':'') . $url_root[2];
!                                       $url .= 
substr($PHP_SELF,$exe,strlen($GLOBALS['PHP_SELF'])-$exe);
                                }
                        }
- */
- 
-                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . $url;
- 
-                       // This needs to be tested as well. (jengo)
- 
- /*                    if (! $url)
-                       {
-                               $url_root = split ('/', 
$GLOBALS['phpgw_info']['server']['webserver_url']);
-                               // Some hosting providers have their paths 
screwy.
-                               //       If the value from $PHP_SELF is not 
what you expect, you can use this to patch it
-                               //       It will need to be adjusted to your 
specific problem tho.
-                               //
-                               //$patched_php_self = 
str_replace('/php4/php/phpgroupware', '/phpgroupware', $GLOBALS['PHP_SELF']);
-                               $patched_php_self = $GLOBALS['PHP_SELF'];
-                               $url = (strlen($url_root[0])? 
$url_root[0].'//':'') . $url_root[2] . $patched_php_self;
-                       }
- */
- 
-                       // build the extravars string from a array
                        
!                       if (is_array($extravars))
                        {
!                               while(list($key,$value) = each($extravars))
                                {
!                                       if (!empty($new_extravars))
!                                       {
!                                               $new_extravars .= '&';
!                                       }
!                                       $new_extravars .= "$key=$value";
                                }
!                               // This needs to be explictly reset to a string 
variable type for PHP3
!                               settype($extravars,'string');
!                               $extravars = $new_extravars;
!                       }
! 
!                       if 
(isset($GLOBALS['phpgw_info']['server']['usecookies']) && 
$GLOBALS['phpgw_info']['server']['usecookies'])
!                       {
!                               if ($extravars)
                                {
!                                       $url .= '?' . $extravars;
                                }
                        }
!                       else
                        {
!                               $sessionID  = 'sessionid=' . 
@$GLOBALS['phpgw_info']['user']['sessionid'];
!                               $sessionID .= '&kp3=' . $kp3;
!                               $sessionID .= '&domain=' . 
@$GLOBALS['phpgw_info']['user']['domain'];
!                               // This doesn't belong in the API.
!                               // Its up to the app to pass this value. (jengo)
!                               // Putting it into the app requires a massive 
number of updates in email app. 
!                               // Until that happens this needs to stay here 
(seek3r)
!                               if 
(isset($GLOBALS['phpgw_info']['flags']['newsmode']) && 
!                                       
$GLOBALS['phpgw_info']['flags']['newsmode'])
                                {
!                                       $url .= '&newsmode=on';
                                }
! 
!                               if ($extravars)
                                {
!                                       $url .= '?' . $extravars . '&' . 
$sessionID;
                                }
!                               else
                                {
!                                       $url .= '?' . $sessionID;
                                }
                        }
  
! /*                    $url = str_replace('/?', '/index.php?', $url);
!                       $webserver_url_count = 
strlen($GLOBALS['phpgw_info']['server']['webserver_url']);
!                       $slash_check = strtolower(substr($url ,0,1));
!                       if (substr($url ,0,$webserver_url_count) != 
$GLOBALS['phpgw_info']['server']['webserver_url'])
                        {
!                               $app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
!                               if ($slash_check == '/')
                                {
!                                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . $url;
                                }
!                               elseif ($app == 'home' || $app == 'logout' || 
$app == 'login')
                                {
!                                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'].'/'.$url; 
                                }
!                               else
                                {
!                                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'].'/'.$app.'/'.$url; 
                                }
!                       } */
!                       //echo "$url\n";
                        return $url;
                }
- 
        }
--- 908,1012 ----
                function link($url, $extravars = '')
                {
!                       /* first we process the $url to build the full 
scriptname */
!                       $full_scriptname = True;
  
!                       $url_firstchar = substr($url ,0,1);
!                       if ($url_firstchar == '/' && 
$GLOBALS['phpgw_info']['server']['webserver_url'] == '/')
                        {
!                               $full_scriptname = False;
                        }
  
!                       if ($url_firstchar != '/')
                        {
!                               $app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
!                               if ($app != 'home' && $app != 'login' && $app 
!= 'logout')
!                               {
!                                       $url = $app.'/'.$url;
                                }
                        }
                        
!                       if($full_scriptname)
                        {
!                               $webserver_url_count = 
strlen($GLOBALS['phpgw_info']['server']['webserver_url'])-1;
!                               
if(substr($GLOBALS['phpgw_info']['server']['webserver_url'] 
,$webserver_url_count,1) != '/' && $url_firstchar != '/')
                                {
!                                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] .'/'. $url;
                                }
!                               else
                                {
!                                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . $url;
                                }
                        }
! 
!                       
if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) && 
$GLOBALS['phpgw_info']['server']['enforce_ssl'] && 
!$GLOBALS['HTTP_SERVER_VARS']['HTTPS'])
                        {
!                               if(substr($url ,0,4) != 'http')
                                {
!                                       $url = 
'https://'.$GLOBALS['phpgw_info']['server']['hostname'].$url;
                                }
!                               else
                                {
!                                       $url = str_replace ( 'http:', 'https:', 
$url);
                                }
!                       }
! 
!                       /* Now we process the extravars into a proper url 
format */
!                       /* if its not an array, then we turn it into one */
!                       /* We do this to help prevent any duplicates from being 
sent. */
!                       if (!is_array($extravars) && $extravars != '')
!                       {
!                               $a = explode('&', $extravars);
!                               $i = 0;
!                               while ($i < count($a))
                                {
!                           $b = split('=', $a[$i]);
!                                       $new_extravars[$b[0]] = $b[1];
!                          $i++;
                                }
+                               $extravars = $new_extravars;
+                               unset($new_extravars);
                        }
  
!                       /* if using frames we make sure there is a framepart */
!                       if(@defined('PHPGW_USE_FRAMES') && PHPGW_USE_FRAMES)
                        {
!                               if (!isset($extravars['framepart']))
                                {
!                                       $extravars['framepart']='body';
                                }
!                       }
!                       
!                       /* add session params if not using cookies */
!                       if (@!$GLOBALS['phpgw_info']['server']['usecookies'])
!                       {
!                               $kp3 = get_var('kp3',Array('GET','COOKIE'));
!                               if (!$kp3)
                                {
!                                       $kp3 = 
$GLOBALS['phpgw_info']['user']['kp3'];
                                }
! 
!                               $extravars['sessionid'] = 
@$GLOBALS['phpgw_info']['user']['sessionid'];
!                               $extravars['kp3'] = $kp3;
!                               $extravars['domain'] = 
@$GLOBALS['phpgw_info']['user']['domain'];
!                       }
! 
!                       /* if we end up with any extravars then we generate the 
url friendly string */
!                       /* and return the result */
!                       if (is_array($extravars))
!                       {
!                               $new_extravars = '';
!                               reset($extravars);
!                               while(list($key,$value) = each($extravars))
                                {
!                                       if (!empty($new_extravars))
!                                       {
!                                               $new_extravars .= '&';
!                                       }
!                                       $new_extravars .= 
$key.'='.htmlentities(urlencode($value));
                                }
!                               return $url .= '?' . $new_extravars;
!                       }
!                       /* if no extravars then we return the cleaned up 
url/scriptname */
                        return $url;
                }
        }

Index: class.sessions_db.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions_db.inc.php,v
retrieving revision 1.2.2.10.2.3
retrieving revision 1.2.2.10.2.4
diff -C2 -r1.2.2.10.2.3 -r1.2.2.10.2.4
*** class.sessions_db.inc.php   17 May 2003 20:45:06 -0000      1.2.2.10.2.3
--- class.sessions_db.inc.php   17 May 2003 23:58:12 -0000      1.2.2.10.2.4
***************
*** 40,48 ****
                        // I am going to make this a config option durring 
0.9.11, instead of an application (jengo)
  
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_sessions WHERE session_dla <= '" . ($GLOBALS['phpgw']->datetime->gmtnow - 
7200)
                                . "' AND session_flags 
!='A'",__LINE__,__FILE__);
  
                        // This is set a little higher, we don't want to kill 
session data for anonymous sessions.
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_app_sessions WHERE session_dla <= '" . 
($GLOBALS['phpgw']->datetime->gmtnow  - 86400)
                                . "'",__LINE__,__FILE__);
                }
--- 40,48 ----
                        // I am going to make this a config option durring 
0.9.11, instead of an application (jengo)
  
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_sessions WHERE session_dla <= '" . (time() - 
$GLOBALS['phpgw_info']['server']['sessions_timeout'])
                                . "' AND session_flags 
!='A'",__LINE__,__FILE__);
  
                        // This is set a little higher, we don't want to kill 
session data for anonymous sessions.
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_app_sessions WHERE session_dla <= '" . (time() - 
$GLOBALS['phpgw_info']['server']['sessions_timeout'])
                                . "'",__LINE__,__FILE__);
                }
***************
*** 65,71 ****
                {
                        global $PHP_SELF;
!                       if (@isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
                        {
!                               $action = 
$GLOBALS['HTTP_GET_VARS']['menuaction'];
                        }
                        else
--- 65,71 ----
                {
                        global $PHP_SELF;
!                       if (@isset($_GET['menuaction']))
                        {
!                               $action = $_GET['menuaction'];
                        }
                        else
***************
*** 81,88 ****
                        }
  
!                       $GLOBALS['phpgw']->db->query("UPDATE phpgw_sessions SET 
session_dla='" . $GLOBALS['phpgw']->datetime->gmtnow . "', 
session_action='$action' "
                                . "WHERE session_id='" . 
$this->sessionid."'",__LINE__,__FILE__);
  
!                       $GLOBALS['phpgw']->db->query("UPDATE phpgw_app_sessions 
SET session_dla='" . $GLOBALS['phpgw']->datetime->gmtnow . "' "
                                . "WHERE sessionid='" . 
$this->sessionid."'",__LINE__,__FILE__);
                        return True;
--- 81,88 ----
                        }
  
!                       $GLOBALS['phpgw']->db->query("UPDATE phpgw_sessions SET 
session_dla='" . time() . "', session_action='$action' "
                                . "WHERE session_id='" . 
$this->sessionid."'",__LINE__,__FILE__);
  
!                       $GLOBALS['phpgw']->db->query("UPDATE phpgw_app_sessions 
SET session_dla='" . time() . "' "
                                . "WHERE sessionid='" . 
$this->sessionid."'",__LINE__,__FILE__);
                        return True;
***************
*** 174,178 ****
                                        $GLOBALS['phpgw']->db->query("INSERT 
INTO phpgw_app_sessions (sessionid,loginid,app,location,content,session_dla) "
                                                . "VALUES 
('".$this->sessionid."','".$this->account_id."','".$appname
!                                               . 
"','".$location."','".$encrypteddata."','" . 
$GLOBALS['phpgw']->datetime->gmtnow . "')",__LINE__,__FILE__);
                                }
                                else
--- 174,178 ----
                                        $GLOBALS['phpgw']->db->query("INSERT 
INTO phpgw_app_sessions (sessionid,loginid,app,location,content,session_dla) "
                                                . "VALUES 
('".$this->sessionid."','".$this->account_id."','".$appname
!                                               . 
"','".$location."','".$encrypteddata."','" . time() . "')",__LINE__,__FILE__);
                                }
                                else

Index: class.sessions_php4.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions_php4.inc.php,v
retrieving revision 1.6.2.10.2.1
retrieving revision 1.6.2.10.2.2
diff -C2 -r1.6.2.10.2.1 -r1.6.2.10.2.2
*** class.sessions_php4.inc.php 17 May 2003 20:45:06 -0000      1.6.2.10.2.1
--- class.sessions_php4.inc.php 17 May 2003 23:58:12 -0000      1.6.2.10.2.2
***************
*** 30,34 ****
                {
                        session_start();
!                       return $GLOBALS['phpgw_session'] = 
$GLOBALS['HTTP_SESSION_VARS']['phpgw_session'];
                }
  
--- 30,34 ----
                {
                        session_start();
!                       return $GLOBALS['phpgw_session'] = 
$_SESSION['phpgw_session'];
                }
  
***************
*** 59,63 ****
                
                        session_register('phpgw_session');
!                       $GLOBALS['HTTP_SESSION_VARS']['phpgw_session'] = 
$GLOBALS['phpgw_session'];
                }
  
--- 59,63 ----
                
                        session_register('phpgw_session');
!                       $_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
                }
  
***************
*** 65,83 ****
                function update_dla()
                {
!                       global $PHP_SELF;
!                       if (@isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
                        {
!                               $action = 
$GLOBALS['HTTP_GET_VARS']['menuaction'];
                        }
                        else
                        {
!                               $action = $PHP_SELF;
                        }
  
!                       $GLOBALS['phpgw_session']['session_dla'] = 
$GLOBALS['phpgw']->datetime->gmtnow;
                        $GLOBALS['phpgw_session']['session_action'] = $action;
                
                        session_register('phpgw_session');
!                       $GLOBALS['HTTP_SESSION_VARS']['phpgw_session'] = 
$GLOBALS['phpgw_session'];
  
                        return True;
--- 65,82 ----
                function update_dla()
                {
!                       if (@isset($_GET['menuaction']))
                        {
!                               $action = $_GET['menuaction'];
                        }
                        else
                        {
!                               $action = $_SERVER['PHP_SELF'];
                        }
  
!                       $GLOBALS['phpgw_session']['session_dla'] = time();
                        $GLOBALS['phpgw_session']['session_action'] = $action;
                
                        session_register('phpgw_session');
!                       $_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
  
                        return True;
***************
*** 125,129 ****
        
                        session_register('phpgw_session');
!                       $GLOBALS['HTTP_SESSION_VARS']['phpgw_session'] = 
$GLOBALS['phpgw_session'];
                }
  
--- 124,128 ----
        
                        session_register('phpgw_session');
!                       $_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
                }
  
***************
*** 154,158 ****
                                
$GLOBALS['phpgw_session']['phpgw_app_sessions'][$appname][$location]['content'] 
= $encrypteddata;
                                session_register('phpgw_session');
!                               $GLOBALS['HTTP_SESSION_VARS']['phpgw_session'] 
= $GLOBALS['phpgw_session'];
                                return $data;
                        }
--- 153,157 ----
                                
$GLOBALS['phpgw_session']['phpgw_app_sessions'][$appname][$location]['content'] 
= $encrypteddata;
                                session_register('phpgw_session');
!                               $_SESSION['phpgw_session'] = 
$GLOBALS['phpgw_session'];
                                return $data;
                        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]