Commit 373e1513 authored by Michael Stucki's avatar Michael Stucki
Browse files

* Fixed a bug cause by a backport - a function was missing. However the 3.7.1...

* Fixed a bug cause by a backport - a function was missing. However the 3.7.1 release archives have been fixed yet before the announcement, so it should be fine for everybody.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_3-7@760 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 963640fb
2005-05-29 Michael Stucki <michael@typo3.org>
* Fixed a bug cause by a backport - a function was missing. However the 3.7.1 release archives have been fixed yet before the announcement, so it should be fine for everybody.
2005-05-22 Michael Stucki <michael@typo3.org>
* Release of TYPO3 3.7.1
......
......@@ -1280,6 +1280,7 @@ class t3lib_div {
* @param boolean If set, parameters which were blank strings would be removed.
* @param boolean If set, the param name itselt (for example "param[key][key2]") would be rawurlencoded as well.
* @return string Imploded result, fx. &param[key][key2]=value2&param[key][key3]=value3
* @see explodeUrl2Array()
*/
function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0) {
if (is_array($theArray)) {
......@@ -1298,6 +1299,31 @@ class t3lib_div {
return $str;
}
/**
* Explodes a string with GETvars (eg. "&id=1&type=2&ext[mykey]=3") into an array
*
* @param string GETvars string
* @param boolean If set, the string will be parsed into a multidimensional array if square brackets are used in variable names (using PHP function parse_str())
* @return array Array of values. All values AND keys are rawurldecoded() as they properly should be. But this means that any implosion of the array again must rawurlencode it!
* @see implodeArrayForUrl()
*/
function explodeUrl2Array($string,$multidim=FALSE) {
if ($multidim) {
parse_str($string,$tempGetVars);
return $tempGetVars;
} else {
$output = array();
$p = explode('&',$string);
foreach($p as $v) {
if (strlen($v)) {
list($pK,$pV) = explode('=',$v,2);
$output[rawurldecode($pK)] = rawurldecode($pV);
}
}
return $output;
}
}
/**
* Returns an array with selected keys from incoming data.
* (Better read source code if you want to find out...)
......
Markdown is supported
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