issue 2159, fixed a problem that does not restore prev. value of array name type(ex. aaa[]) on return page by error. fixed a problem that restore prev. value at all form on page have multiple form.

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-09-05 11:30:14 +00:00
parent d60b68df35
commit 49fe776379
4 changed files with 108 additions and 16 deletions

View file

@ -964,11 +964,22 @@ class Context {
{
foreach($_GET as $key => $val)
{
$vars[] = $key . '=' . ($val ? urlencode(Context::convertEncodingStr($val)) : '');
if(is_array($val))
{
foreach($val as $key2 => $val2)
{
$vars[] = $key . "[$key2]=" . ($val2 ? urlencode(Context::convertEncodingStr($val2)) : '');
}
}
else
{
$vars[] = $key . '=' . ($val ? urlencode(Context::convertEncodingStr($val)) : '');
}
}
$url .= '?' . join('&', $vars);
}
}
return $url;
}