diff --git a/qfq/store/Store.php b/qfq/store/Store.php index 2aabd0340b1ad878ddbc9f9be39812b8a858f9d8..60e512a68f7698e56fb2d0970b9a84da42a82eb5 100644 --- a/qfq/store/Store.php +++ b/qfq/store/Store.php @@ -160,7 +160,7 @@ class Store { } catch (\Exception $e) { throw new qfq\UserException ("Error read file " . QFQ_INI . ": " . $e->getMessage(), ERROR_READ_FILE); } - self::setVarArray($config, STORE_SYSTEM); + self::setVarArray($config, STORE_SYSTEM,true); } /** @@ -168,9 +168,9 @@ class Store { * @param $store * @throws CodeException */ - public function setVarArray(array $dataArray, $store) { + public function setVarArray(array $dataArray, $store, $flagOverwrite = false) { - if (isset(self::$raw[$store]) && count(self::$raw[$store]) > 0) { + if ($flagOverwrite && isset(self::$raw[$store]) && count(self::$raw[$store]) > 0) { throw new CodeException("Raw values already been copied to store '$store'. Do this only one time.", ERROR_VALUE_ALREADY_CODPIED); } @@ -194,7 +194,7 @@ class Store { if (isset($GLOBALS["TSFE"]->fe_user->user["usergroup"])) $arr[TYPO3_FE_USER_GROUP] = $GLOBALS["TSFE"]->fe_user->user["usergroup"]; - self::setVarArray($arr, STORE_TYPO3); + self::setVarArray($arr, STORE_TYPO3, true); } /* @@ -215,7 +215,7 @@ class Store { if (isset($_POST[CLIENT_SIP])) $arr[CLIENT_POST_SIP] = $_POST[CLIENT_SIP]; - self::setVarArray($arr, STORE_CLIENT); + self::setVarArray($arr, STORE_CLIENT, true); } /** @@ -235,7 +235,7 @@ class Store { $param[SIP_URLPARAM] = self::$sip->getQueryStringFromSip($s); // self::setVarArray(KeyValueStringParser::parse($param, "=", "&"), STORE_SIP); - self::setVarArray($param, STORE_SIP); + self::setVarArray($param, STORE_SIP, true); } } @@ -330,15 +330,17 @@ class Store { $tmpParam = [SIP_RECORD_ID => $recordId, SIP_FORM => $formName]; - // Store in SIP Store (cause it's empty until now). - self::setVarArray($tmpParam, STORE_SIP); - // Construct fake urlparam $tmpUrlparam = OnArray::toString($tmpParam); // Create a fake SIP which has never been passed by URL - further processing might expect this to exist. $sip = self::getSip()->queryStringToSip($tmpUrlparam, RETURN_SIP); self::setVar(CLIENT_SIP, $sip, STORE_CLIENT); + + // Store in SIP Store (cause it's empty until now). + $tmpParam[SIP_SIP] = $sip; + self::setVarArray($tmpParam, STORE_SIP); + } /**