Commit b044dbd4 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Store: in function fillSip added parameter 's' and 'SIP_URL_PARAM'. ...

Store: in function fillSip added parameter 's' and 'SIP_URL_PARAM'.  getStore() now handles non existing stores well.
parent c716e5d8
...@@ -231,8 +231,11 @@ class Store { ...@@ -231,8 +231,11 @@ class Store {
if ($s !== false) { if ($s !== false) {
// if session is given, copy values to store // if session is given, copy values to store
$param = self::$sip->getVarsFromSip($s); $param = self::$sip->getVarsFromSip($s);
$param[SIP_SIP] = $s;
$param[SIP_URLPARAM] = self::$sip->getQueryStringFromSip($s);
self::setVarArray(KeyValueStringParser::parse($param, "=", "&"), STORE_SIP); // self::setVarArray(KeyValueStringParser::parse($param, "=", "&"), STORE_SIP);
self::setVarArray($param, STORE_SIP);
} }
} }
...@@ -320,12 +323,12 @@ class Store { ...@@ -320,12 +323,12 @@ class Store {
$tmpUrlparam = OnArray::toString($tmpParam); $tmpUrlparam = OnArray::toString($tmpParam);
// Create a fake SIP which has never been passed by URL - further processing might expect this to exist. // Create a fake SIP which has never been passed by URL - further processing might expect this to exist.
$sip = self::getSip()->urlparamToSip($tmpUrlparam, RETURN_SIP); $sip = self::getSip()->queryStringToSip($tmpUrlparam, RETURN_SIP);
self::setVar(CLIENT_SIP, $sip, STORE_CLIENT); self::setVar(CLIENT_SIP, $sip, STORE_CLIENT);
} }
/** /**
* @return null * @return null|Sip
*/ */
public static function getSip() { public static function getSip() {
return self::$sip; return self::$sip;
...@@ -347,8 +350,19 @@ class Store { ...@@ -347,8 +350,19 @@ class Store {
* @return mixed * @return mixed
*/ */
public static function getStore($store) { public static function getStore($store) {
if (isset(self::$raw[$store])) {
return self::$raw[$store];
}
return array();
}
return self::$raw[$store]; /**
* @param $store
*/
public static function unsetStore($store) {
if (isset(self::$raw[$store])) {
self::$raw = array();
}
} }
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment