Changeset 16070
- Timestamp:
- 04/11/08 15:42:59 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/config/midcom_config.php
r15505 r16070 527 527 $GLOBALS['midcom_config_default']['auto_formatter'] = array(); 528 528 529 /** 530 * Sessioning service, disabling the service will help with external caches. 531 * The second option is to allow logged in users to benefit from the service 532 */ 533 $GLOBALS['midcom_config_default']['sessioning_service_enable'] = true; 534 $GLOBALS['midcom_config_default']['sessioning_service_always_enable_for_users'] = true; 529 535 530 536 /* ----- Include the site config ----- */ trunk/midcom/midcom.core/midcom/services/_sessioning.php
r14773 r16070 70 70 $started = true; 71 71 72 } 73 74 function _initialize($unconditional_start = false) 75 { 76 static $initialized = false; 77 if ($initialized) 78 { 79 return true; 80 } 81 82 if ( !$GLOBALS['midcom_config']['sessioning_service_enable'] 83 && !( $GLOBALS['midcom_config']['sessioning_service_always_enable_for_users'] 84 && $_MIDGARD['user'] 85 ) 86 ) 87 { 88 return false; 89 } 90 91 // Try to start session only if the client sends the id OR we need to set data 92 if ( !isset($_REQUEST[session_name()]) 93 && !$unconditional_start) 94 { 95 return false; 96 } 97 72 98 @session_start(); 73 99 … … 80 106 $_SESSION["midcom_session_data"]["midcom.service.sessioning"]["startup"] = serialize(time()); 81 107 } 108 $initialized = true; 109 return true; 82 110 } 83 111 … … 93 121 function exists ($domain, $key) 94 122 { 123 if (!$this->_initialize()) 124 { 125 return false; 126 } 95 127 if (! array_key_exists($domain, $_SESSION["midcom_session_data"])) 96 128 { … … 194 226 function set ($domain, $key, $value) 195 227 { 228 if (!$this->_initialize(true)) 229 { 230 return false; 231 } 196 232 static $no_cache = false; 197 233 if (!$no_cache) trunk/midcom/midcom.helper.datamanager2/schema.php
r15104 r16070 576 576 function register_to_session($guid) 577 577 { 578 $key = $this->name . $guid; 579 // Seems we do not need this anymore, but return key still 580 return $key; 581 578 582 $session =& $_MIDCOM->get_service('session'); 579 $key = $this->name . $guid;580 581 583 $session->set('midcom.helper.datamanager2', $key, $this->_raw_schema); 582 584 return $key;
