Changeset 16068
- Timestamp:
- 04/11/08 15:34:07 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.core/midcom/config/midcom_config.php
r15503 r16068 507 507 $GLOBALS['midcom_config_default']['auto_formatter'] = array(); 508 508 509 /** 510 * Sessioning service, disabling the service will help with external caches. 511 * The second option is to allow logged in users to benefit from the service 512 */ 513 $GLOBALS['midcom_config_default']['sessioning_service_enable'] = true; 514 $GLOBALS['midcom_config_default']['sessioning_service_always_enable_for_users'] = true; 515 509 516 /* ----- Include the site config ----- */ 510 517 /* This should be replaced by $_MIDGARD constructs */ branches/MidCOM_2_8/midcom.core/midcom/services/_sessioning.php
r14775 r16068 71 71 $started = true; 72 72 73 } 74 75 function _initialize($unconditional_start = false) 76 { 77 static $initialized = false; 78 if ($initialized) 79 { 80 return true; 81 } 82 83 if ( !$GLOBALS['midcom_config']['sessioning_service_enable'] 84 && !( $GLOBALS['midcom_config']['sessioning_service_always_enable_for_users'] 85 && $_MIDGARD['user'] 86 ) 87 ) 88 { 89 return false; 90 } 91 92 // Try to start session only if the client sends the id OR we need to set data 93 if ( !isset($_REQUEST[session_name()]) 94 && !$unconditional_start) 95 { 96 return false; 97 } 98 73 99 @session_start(); 74 100 … … 81 107 $_SESSION["midcom_session_data"]["midcom.service.sessioning"]["startup"] = serialize(time()); 82 108 } 109 $initialized = true; 110 return true; 83 111 } 84 112 … … 94 122 function exists ($domain, $key) 95 123 { 124 if (!$this->_initialize()) 125 { 126 return false; 127 } 96 128 if (! array_key_exists($domain, $_SESSION["midcom_session_data"])) 97 129 { … … 195 227 function set ($domain, $key, $value) 196 228 { 229 if (!$this->_initialize(true)) 230 { 231 return false; 232 } 197 233 static $no_cache = false; 198 234 if (!$no_cache)
