$_SESSION = array();
} else {
$this->setupSessionHandler();
- session_start();
if ($session_flags & self::SESSION_READONLY) {
/* Close the session immediately so no changes can be
made but values are still available. */
* The custom session handler object will be contained in the
* $sessionHandler public member variable.
*
+ * @param boolean $start Initiate the session?
+ *
* @throws Horde_Exception
*/
- public function setupSessionHandler()
+ public function setupSessionHandler($start = true)
{
global $conf;
/* We want to create an instance here, not get, since we may be
* destroying the previous instances in the page. */
$this->sessionHandler = $GLOBALS['injector']->createInstance('Horde_SessionHandler');
+
+ if ($start) {
+ session_start();
+ }
}
/**
/* Only the server needs to start a session. */
if ($this->_backendMode == SYNCML_BACKENDMODE_SERVER) {
/* Reload the Horde SessionHandler if necessary. */
- $GLOBALS['registry']->setupSessionHandler();
+ $GLOBALS['registry']->setupSessionHandler(false);
}
parent::sessionStart($syncDeviceID, $sessionId, $backendMode);
Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true));
/* Check for sessionhandler object. */
-$registry->setupSessionHandler();
+$registry->setupSessionHandler(false);
if (!$registry->sessionHandler) {
throw new Horde_Exception('Horde is unable to load the session handler.');
}
}
$registry->setupSessionHandler();
- @session_start();
Horde_Nls::setLanguageEnvironment($language, $vars->app);