[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_php4.inc.php,1.6.2.
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_php4.inc.php,1.6.2.10.2.4,1.6.2.10.2.5 |
Date: |
Sun, 18 May 2003 15:15:05 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv26599
Modified Files:
Tag: Version-0_9_16-branch
class.sessions_php4.inc.php
Log Message:
cacheing the data from other session in the appsession
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.4
retrieving revision 1.6.2.10.2.5
diff -C2 -r1.6.2.10.2.4 -r1.6.2.10.2.5
*** class.sessions_php4.inc.php 18 May 2003 08:37:42 -0000 1.6.2.10.2.4
--- class.sessions_php4.inc.php 18 May 2003 19:15:02 -0000 1.6.2.10.2.5
***************
*** 64,68 ****
// we need the install-id to differ between serveral
installs shareing one tmp-dir
$GLOBALS['phpgw_session']['session_install_id'] =
$GLOBALS['phpgw_info']['server']['install_id'];
!
session_register('phpgw_session');
$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
--- 64,68 ----
// we need the install-id to differ between serveral
installs shareing one tmp-dir
$GLOBALS['phpgw_session']['session_install_id'] =
$GLOBALS['phpgw_info']['server']['install_id'];
!
session_register('phpgw_session');
$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
***************
*** 151,155 ****
{
$data =
$GLOBALS['phpgw']->crypto->decrypt($data);
! //echo 'appsession returning: ';
_debug_array($data);
return $data;
}
--- 151,155 ----
{
$data =
$GLOBALS['phpgw']->crypto->decrypt($data);
! //echo "appsession returning:
location='$location',app='$appname',data=$data"; _debug_array($data);
return $data;
}
***************
*** 176,179 ****
--- 176,180 ----
@function list_sessions
@abstract get list of normal / non-anonymous sessions
+ @note The data form the session-files get cached in the
app_session phpgwapi/php4_session_cache
@author ralfbecker
*/
***************
*** 181,184 ****
--- 182,187 ----
{
//echo
"<p>session_php4::list_sessions($start,'$order','$sort',$all)</p>\n";
+ $session_cache =
$this->appsession('php4_session_cache','phpgwapi');
+
$values = array();
$maxmatchs =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
***************
*** 190,200 ****
continue;
}
! list($session) = file($path . '/' . $file);
! if (substr($session,0,14) != 'phpgw_session|')
{
! continue;
}
- $session = unserialize(substr($session,14));
if ($session['session_flags'] == 'A' ||
!$session['session_id'] ||
$session['session_install_id'] !=
$GLOBALS['phpgw_info']['server']['install_id'])
--- 193,223 ----
continue;
}
! if (isset($session_cache[$file])) // use
copy from cache
! {
! $session = $session_cache[$file];
! if ($session['session_flags'] == 'A' ||
!$session['session_id'] ||
! $session['session_install_id']
!= $GLOBALS['phpgw_info']['server']['install_id'])
! {
! continue; // no anonymous
sessions or other domains or installations
! }
! if (!$all_no_sort) // we need the
up-to-date data --> unset and reread it
! {
! unset($session_cache[$file]);
! }
! }
! if (!isset($session_cache[$file])) // not
in cache, read and cache it
{
! $fd = fopen ($path . '/' . $file,'r');
! $session = fread ($fd, filesize ($path
. '/' . $file));
! fclose ($fd);
! if (substr($session,0,14) !=
'phpgw_session|')
! {
! continue;
! }
! $session =
unserialize(substr($session,14));
! unset($session['phpgw_app_sessions']);
// not needed, saves memory
! $session_cache[$file] = $session;
}
if ($session['session_flags'] == 'A' ||
!$session['session_id'] ||
$session['session_install_id'] !=
$GLOBALS['phpgw_info']['server']['install_id'])
***************
*** 202,206 ****
continue; // no anonymous
sessions or other domains or installations
}
- unset($session['phpgw_app_sessions']); // not
needed, saves memory
//echo "file='$file'=<pre>"; print_r($session);
echo "</pre>";
--- 225,228 ----
***************
*** 229,232 ****
--- 251,256 ----
reset($values);
}
+
$this->appsession('php4_session_cache','phpgwapi',$session_cache);
+
return $values;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_php4.inc.php,1.6.2.10.2.4,1.6.2.10.2.5,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup setup_demo.php,1.30,1.31
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104,1.105 class.sessions_db.inc.php,1.16,1.17class.sessions_php4.inc.php,1.19,1.20
- Previous by thread:
[Phpgroupware-cvs] CVS: setup setup_demo.php,1.30,1.31
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions.inc.php,1.104,1.105 class.sessions_db.inc.php,1.16,1.17class.sessions_php4.inc.php,1.19,1.20
- Index(es):