Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_official / html / includes [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
27 Jul 2002 16:30:15postnuke_official/html/includespnSession.php,1.25,1.26Mike
 sessions revisited - seems to work for PHP 4.1.2 on Windows too now (with & without register_globals)

Update of /home/cvsroot/postnuke_official/html/includes
In directory ns7.hostnuke.net:/tmp/cvs-serv23395

Modified Files:
	pnSession.php 
Log Message:
sessions revisited - seems to work for PHP 4.1.2 on Windows too now (with & without register_globals)


Index: pnSession.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/includes/pnSession.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** pnSession.php	25 Jun 2002 17:20:57 -0000	1.25
--- pnSession.php	27 Jul 2002 16:30:13 -0000	1.26
***************
*** 131,139 ****
  function pnSessionGetVar($name)
  {
!     global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
!     if (isset($HTTP_SESSION_VARS[$var])) {
!         return $HTTP_SESSION_VARS[$var];
      }
  
--- 131,147 ----
  function pnSessionGetVar($name)
  {
! //    global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
! // forget about $_SESSION for now - doesn't work for PHP 4.0.6
! // + HTTP_SESSION_VARS is buggy on Windows for PHP 4.1.2
! //    if (isset($HTTP_SESSION_VARS[$var])) {
! //        return $HTTP_SESSION_VARS[$var];
!     if (isset($GLOBALS[$var])) {
!         return $GLOBALS[$var];
!     } elseif (isset($GLOBALS['HTTP_SESSION_VARS'][$var])) {
!         // another 'feature' for Windows
!         $GLOBALS[$var] = $GLOBALS['HTTP_SESSION_VARS'][$var];
!         return $GLOBALS['HTTP_SESSION_VARS'][$var];
      }
  
***************
*** 148,155 ****
  function pnSessionSetVar($name, $value)
  {
!     global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
!     $HTTP_SESSION_VARS[$var] = $value;
  
      return true;
--- 156,169 ----
  function pnSessionSetVar($name, $value)
  {
! //    global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
! // forget about $_SESSION for now - doesn't work for PHP 4.0.6
! // + HTTP_SESSION_VARS is buggy on Windows for PHP 4.1.2
! //    $HTTP_SESSION_VARS[$var] = $value;
!     $GLOBALS[$var] = $value;
!     if (!session_is_registered($var)) {
!         session_register($var);
!     }
  
      return true;
***************
*** 162,170 ****
  function pnSessionDelVar($name)
  {
!     global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
!     if (isset($HTTP_SESSION_VARS[$var])) {
!         unset($HTTP_SESSION_VARS[$var]);
          // contrary to some of the PHP documentation, you *do* need this too !
          // http://www.php.net/manual/en/function.session-unregister.php is wrong
--- 176,189 ----
  function pnSessionDelVar($name)
  {
! //    global $HTTP_SESSION_VARS;
      $var = 'PNSV' . $name;
  
! // forget about $_SESSION for now - doesn't work for PHP 4.0.6
! // + HTTP_SESSION_VARS is buggy on Windows for PHP 4.1.2
! //    if (isset($HTTP_SESSION_VARS[$var])) {
! //        unset($HTTP_SESSION_VARS[$var]);
!      if (isset($GLOBALS[$var]) || isset($GLOBALS['HTTP_SESSION_VARS'][$var])) {
!         unset($GLOBALS[$var]);
!         unset($GLOBALS['HTTP_SESSION_VARS'][$var]);
          // contrary to some of the PHP documentation, you *do* need this too !
          // http://www.php.net/manual/en/function.session-unregister.php is wrong


Directory filter : [ all ] / postnuke_official / html / includes [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3