mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-10 04:03:01 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@157 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8788afbd5f
commit
bbecc3b9e1
12 changed files with 154 additions and 103 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue