Renamed into ['session_stored_in_db'] to avoid confusion

skala
Yannick Warnier 13 years ago
parent 096b8663dc
commit cd6e0d47ac
  1. 7
      main/inc/lib/main_api.lib.php
  2. 2
      main/install/configuration.dist.php

@ -1221,7 +1221,6 @@ function api_get_course_info_by_id($id = null) {
* @param string variable - the variable name to save into the session
*/
function api_session_start($already_installed = true) {
global $storeSessionInDb;
global $_configuration;
/* Causes too many problems and is not configurable dynamically.
@ -1234,10 +1233,10 @@ function api_session_start($already_installed = true) {
}
*/
if (is_null($storeSessionInDb)) {
$storeSessionInDb = false;
if (is_null($_configuration['session_stored_in_db'])) {
$_configuration['session_stored_in_db'] = false;
}
if ($storeSessionInDb && function_exists('session_set_save_handler')) {
if ($_configuration['session_stored_in_db'] && function_exists('session_set_save_handler')) {
require_once api_get_path(LIBRARY_PATH).'session_handler.class.php';
$session_handler = new session_handler();
@session_set_save_handler(array(& $session_handler, 'open'), array(& $session_handler, 'close'), array(& $session_handler, 'read'), array(& $session_handler, 'write'), array(& $session_handler, 'destroy'), array(& $session_handler, 'garbage'));

@ -121,7 +121,7 @@ $_configuration['security_key'] = '{SECURITY_KEY}';
// Hash function method
$_configuration['password_encryption'] = '{ENCRYPT_PASSWORD}';
// You may have to restart your web server if you change this
$storeSessionInDb = false;
$_configuration['session_stored_in_db'] = false;
// Session lifetime
$_configuration['session_lifetime'] = SESSION_LIFETIME;
// Activation for multi-url access

Loading…
Cancel
Save