issue layout copy feature add

layout file upload bug fix


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10864 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-07-11 01:41:07 +00:00
parent 997aae1884
commit 484111e9c1
8 changed files with 164 additions and 5 deletions

View file

@ -222,9 +222,18 @@ class Validator
foreach($filters as $key=>$filter) {
$fname = preg_replace('/\[\]$/', '', $key);
$exists = array_key_exists($key, $fields);
$filter = array_merge($filter_default, $filter);
$value = $exists ? $fields[$fname] : null;
if(preg_match("/(^[a-z_]*)[\[](?:\'|\")?([a-z_]*)(?:\'|\")?[\]]$/i", $key, $matches))
{
$exists = array_key_exists($matches[1], $fields);
$value = $exists ? $fields[$matches[1]][$matches[2]] : null;
}
else
{
$exists = array_key_exists($key, $fields);
$value = $exists ? $fields[$fname] : null;
}
if(is_array($value)) $value = implode('', $value);