Changeset:
        ea4eaf635cf5
        
https://sourceforge.net/p/mrbs/hg-code/ci/ea4eaf635cf51c97301dd2768f9686b0e4f02ec4
Author:
        John Beranek <jbera...@users.sourceforge.net>
Date:
        Wed Oct 12 21:59:47 2016 +0100
Log message:

Merge

diffstat:

 checklang.php                  |   6 ------
 web/session/session_cookie.inc |   8 --------
 web/session/session_php.inc    |  31 +++++--------------------------
 3 files changed, 5 insertions(+), 40 deletions(-)

diffs (99 lines):

diff -r 0f83dfa471b5 -r ea4eaf635cf5 checklang.php
--- a/checklang.php     Wed Oct 12 16:14:11 2016 +0100
+++ b/checklang.php     Wed Oct 12 21:59:47 2016 +0100
@@ -23,12 +23,6 @@
   $lang = $_GET['lang'];
   $update = empty($_GET['update']) ? false : true;
 }
-else if (!empty($HTTP_GET_VARS))
-{
-  $lang = (array)$HTTP_GET_VARS['lang'];
-  $update = empty($HTTP_GET_VARS['update']) ? false : true;
-}
-
 
 // Language file prefix
 $langs = "lang/lang.";
diff -r 0f83dfa471b5 -r ea4eaf635cf5 web/session/session_cookie.inc
--- a/web/session/session_cookie.inc    Wed Oct 12 16:14:11 2016 +0100
+++ b/web/session/session_cookie.inc    Wed Oct 12 21:59:47 2016 +0100
@@ -240,14 +240,6 @@
   {
     $token = unslashes($_COOKIE["SessionToken"]);
   }
-  else
-  {
-    global $HTTP_COOKIE_VARS;
-    if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS["SessionToken"]))
-    {
-      $token = unslashes($HTTP_COOKIE_VARS["SessionToken"]);
-    }
-  }
 
   if (isset($token) && ($token != ""))
   {
diff -r 0f83dfa471b5 -r ea4eaf635cf5 web/session/session_php.inc
--- a/web/session/session_php.inc       Wed Oct 12 16:14:11 2016 +0100
+++ b/web/session/session_php.inc       Wed Oct 12 21:59:47 2016 +0100
@@ -65,7 +65,7 @@
 // the user
 if (!empty($auth["session_php"]["inactivity_expire_time"]))
 {
-  if (isset($_SESSION) && isset($_SESSION['LastActivity']) &&
+  if (isset($_SESSION['LastActivity']) &&
       ((time() - $_SESSION['LastActivity']) > 
$auth["session_php"]["inactivity_expire_time"]))
   {
     unset($_SESSION["UserName"]);
@@ -91,15 +91,8 @@
   {
 
     // Unset the session variables
-    if (isset($_SESSION))
-    {
-      $_SESSION = array();
-    }
-    else
-    {
-      global $HTTP_SESSION_VARS;
-      $HTTP_SESSION_VARS = array();
-    }
+    session_unset();
+    session_destroy();
   }
   else
   {
@@ -111,15 +104,7 @@
       exit();
     }
 
-    if (isset($_SESSION))
-    {
-      $_SESSION["UserName"] = $NewUserName;
-    }
-    else
-    {
-      global $HTTP_SESSION_VARS;
-      $HTTP_SESSION_VARS["UserName"] = $NewUserName;
-    }
+    $_SESSION["UserName"] = $NewUserName;
   }
   // preserve the original $HTTP_REFERER by sending it as a GET parameter
   if (!empty($returl))
@@ -229,16 +214,10 @@
 
 function getUserName()
 {
-  global $HTTP_SESSION_VARS;
-  
-  if (isset($_SESSION) && isset($_SESSION["UserName"]) && 
($_SESSION["UserName"] !== ''))
+  if (isset($_SESSION["UserName"]) && ($_SESSION["UserName"] !== ''))
   {
     return $_SESSION["UserName"];
   }
-  elseif (isset($HTTP_SESSION_VARS["UserName"]) && 
($HTTP_SESSION_VARS["UserName"] !== ''))
-  {
-    return $HTTP_SESSION_VARS["UserName"];
-  }
 
   return NULL;
 }

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to