Index: remote/formidableajax.php =================================================================== --- remote/formidableajax.php (revision 474) +++ remote/formidableajax.php (working copy) @@ -26,7 +26,11 @@ "thrower" => t3lib_div::_GP("thrower"), "arguments" => t3lib_div::_GP("arguments"), ); - + + if(!array_key_exists("_SESSION", $GLOBALS) || !array_key_exists("ameos_formidable", $GLOBALS["_SESSION"])) { + $this->denyService("SESSION is not started !"); + } + if(array_key_exists($this->aRequest["object"], $GLOBALS["TYPO3_CONF_VARS"]["EXTCONF"]["ameos_formidable"]["ajax_services"])) { if(array_key_exists($this->aRequest["servicekey"], $GLOBALS["TYPO3_CONF_VARS"]["EXTCONF"]["ameos_formidable"]["ajax_services"][$this->aRequest["object"]])) { // requested service exists @@ -298,6 +302,7 @@ } } +session_start(); $oAjax = new formidableajax(); if($oAjax->init() !== FALSE) { Index: ext_localconf.php =================================================================== --- ext_localconf.php (revision 474) +++ ext_localconf.php (working copy) @@ -39,22 +39,6 @@ } } - if(!isset($GLOBALS["_SESSION"])) { - session_start(); - } - - if(!array_key_exists("ameos_formidable", $GLOBALS["_SESSION"])) { - - $GLOBALS["_SESSION"]["ameos_formidable"] = array(); - $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"] = array(); - $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"]["tx_ameosformidable"] = array(); - $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"]["tx_ameosformidable"]["ajaxevent"] = array(); - - $GLOBALS["_SESSION"]["ameos_formidable"]["hibernate"] = array(); - - $GLOBALS["_SESSION"]["ameos_formidable"]["applicationdata"] = array(); - } - if(!array_key_exists("ameos_formidable", $GLOBALS["TYPO3_CONF_VARS"]["EXTCONF"])) { require_once(PATH_formidable . 'ext_emconf.php'); Index: api/class.tx_ameosformidable.php =================================================================== --- api/class.tx_ameosformidable.php (revision 474) +++ api/class.tx_ameosformidable.php (working copy) @@ -201,6 +201,8 @@ * @return void */ function init(&$oParent, $mXml, $iForcedEntryId = FALSE) { + + $this->sessionStart(); $this->start_tstamp = t3lib_div::milliseconds(); @@ -508,7 +510,25 @@ $this->bInited = TRUE; } + + function sessionStart() { + if(!isset($GLOBALS["_SESSION"])) { + session_start(); + } + if(!array_key_exists("ameos_formidable", $GLOBALS["_SESSION"])) { + + $GLOBALS["_SESSION"]["ameos_formidable"] = array(); + $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"] = array(); + $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"]["tx_ameosformidable"] = array(); + $GLOBALS["_SESSION"]["ameos_formidable"]["ajax_services"]["tx_ameosformidable"]["ajaxevent"] = array(); + + $GLOBALS["_SESSION"]["ameos_formidable"]["hibernate"] = array(); + + $GLOBALS["_SESSION"]["ameos_formidable"]["applicationdata"] = array(); + } + } + function initAPI(&$oParent) { $this->_oParent =& $oParent; }