mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
bugfix: url's containg var[]=val got corrupted
This commit is contained in:
parent
40c4e903e8
commit
32dc4fdb8b
@ -1176,7 +1176,14 @@
|
|||||||
foreach(explode('&',$extravars) as $expr)
|
foreach(explode('&',$extravars) as $expr)
|
||||||
{
|
{
|
||||||
list($var,$val) = explode('=', $expr,2);
|
list($var,$val) = explode('=', $expr,2);
|
||||||
$vars[$var] = $val;
|
if (substr($var,-2) == '[]')
|
||||||
|
{
|
||||||
|
$vars[substr($var,0,-2)][] = $val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$vars[$var] = $val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,7 +1201,17 @@
|
|||||||
$query = array();
|
$query = array();
|
||||||
foreach($vars as $key => $value)
|
foreach($vars as $key => $value)
|
||||||
{
|
{
|
||||||
$query[] = $key.'='.urlencode($value);
|
if (is_array($value))
|
||||||
|
{
|
||||||
|
foreach($value as $val)
|
||||||
|
{
|
||||||
|
$query[] = $key.'[]='.urlencode($val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$query[] = $key.'='.urlencode($value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$url .= '?' . implode('&',$query);
|
$url .= '?' . implode('&',$query);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user