Fixed typo in location variable.
[fa-stable.git] / includes / session.inc
index 990a51c01a1403f6d9a333888f2021b1e9078544..98ed4677ccba50aab299aa3e16ae525a76ec968e 100644 (file)
@@ -75,11 +75,8 @@ class SessionManager
                $_SESSION['OBSOLETE'] = true;
                $_SESSION['EXPIRES'] = time() + 10;
 
-               // Create new session destroying the old one if posiible
-               if (phpversion() >= "5.1.0")
-                       session_regenerate_id(true);
-               else    
-                       session_regenerate_id();
+               // Create new session without destroying the old one
+               session_regenerate_id();
  
                // Grab current session ID and close both sessions to allow other scripts to use them
                $newSession = session_id();
@@ -297,10 +294,10 @@ foreach ($installed_extensions as $ext)
 
 ini_set('session.gc_maxlifetime', 36000); // 10hrs
 
+hook_session_start(@$_POST["company_login_name"]);
+
 $Session_manager = new SessionManager();
 $Session_manager->sessionStart('FA'.md5(dirname(__FILE__)));
-//session_name('FA'.md5(dirname(__FILE__)));
-//session_start();
 
 // this is to fix the "back-do-you-want-to-refresh" issue - thanx PHPFreaks
 header("Cache-control: private");
@@ -322,6 +319,7 @@ $_SESSION['language']->set_language($_SESSION['language']->code);
 include_once($path_to_root . "/includes/access_levels.inc");
 include_once($path_to_root . "/version.php");
 include_once($path_to_root . "/includes/main.inc");
+include_once($path_to_root . "/includes/app_entries.inc");
 
 // Ajax communication object
 $Ajax = new Ajax();
@@ -401,5 +399,3 @@ $SysPrefs = &$_SESSION['SysPrefs'];
 // POST vars cleanup needed for direct reuse.
 // We quote all values later with db_escape() before db update.
 $_POST = strip_quotes($_POST);
-
-?>
\ No newline at end of file