simplify smarty.const.foo and smarty.const.$foo logic

This commit is contained in:
mohrt
2003-02-28 16:36:19 +00:00
parent 0a03b8c306
commit 63b1a2b04d

View File

@@ -1746,7 +1746,7 @@ class Smarty_Compiler extends Smarty {
case 'const': case 'const':
array_shift($indexes); array_shift($indexes);
$_val = $this->_parse_var_props(substr($indexes[0],1)); $_val = $this->_parse_var_props(substr($indexes[0],1));
$compiled_ref = '(defined(' . $_val . ') ? ' . $this->_dequote($_val) . ' : null)'; $compiled_ref = '@constant(' . $_val . ')';
$_max_index = 1; $_max_index = 1;
break; break;