mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
Merge pull request #12 from jenolan/master
Commit 7b2a2c4a88
changed the constant pro...
This commit is contained in:
@@ -79,8 +79,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
$compiler->trigger_template_error("(secure mode) constants not permitted");
|
$compiler->trigger_template_error("(secure mode) constants not permitted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if( strpos( $_index[1], '$') === false ){
|
||||||
return "@constant({$_index[1]})";
|
return "@constant('{$_index[1]}')";
|
||||||
|
} else {
|
||||||
|
return "@constant({$_index[1]})";
|
||||||
|
}
|
||||||
|
|
||||||
case 'config':
|
case 'config':
|
||||||
if (isset($_index[2])) {
|
if (isset($_index[2])) {
|
||||||
|
Reference in New Issue
Block a user