git-svn-id: http://xe-core.googlecode.com/svn/trunk@157 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-02-22 06:00:07 +00:00
parent 8788afbd5f
commit bbecc3b9e1
12 changed files with 154 additions and 103 deletions

View file

@ -154,8 +154,8 @@
$tmp_str = substr($code,8);
$tmp_arr = explode(' ', $tmp_str);
$var_name = $tmp_arr[0];
if(substr($var_name,0,1)=='$') $prefix = sprintf('if(is_array($__Context->%s)) ', substr($var_name,1));
else $prefix = sprintf('if(is_array(%s)) ', $var_name);
if(substr($var_name,0,1)=='$') $prefix = sprintf('if(count($__Context->%s)) ', substr($var_name,1));
else $prefix = sprintf('if(count(%s)) ', $var_name);
}
$output = preg_replace('/\$([a-zA-Z0-9\_\-]+)/i','$__Context->\\1', $code).'{';
break;