Changeset 435
- Timestamp:
- 05/09/07 13:55:00 (2 years ago)
- Files:
-
- trunk/lib/jelix/tpl/jTplCompiler.class.php (modified) (2 diffs)
- trunk/testapp/modules/unittest/classes/utjtplexpr.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/tpl/jTplCompiler.class.php
r430 r435 49 49 protected $_allowedAssign; 50 50 protected $_allowedInForeach; 51 52 protected $_allowedConstants = array('TRUE','FALSE','NULL', 'M_1_PI', 'M_2_PI', 'M_2_SQRTPI', 'M_E', 53 'M_LN10', 'M_LN2', 'M_LOG10E', 'M_LOG2E', 'M_PI','M_PI_2','M_PI_4','M_SQRT1_2','M_SQRT2'); 51 54 52 55 private $_pluginPath=array(); … … 417 420 $result.='$t->_vars[\''.substr($str,1).'\']'; 418 421 }elseif($type == T_WHITESPACE || in_array($type, $allowed)){ 419 if($type == T_STRING && defined($str) ){422 if($type == T_STRING && defined($str) && !in_array(strtoupper($str),$this->_allowedConstants)){ 420 423 $this->doError2('errors.tpl.tag.constant.notallowed', $this->_currentTag, $str); 421 424 } trunk/testapp/modules/unittest/classes/utjtplexpr.class.php
r415 r435 99 99 '$aa*(234+$b)'=>'$t->_vars[\'aa\']*(234+$t->_vars[\'b\'])', 100 100 '$aa[$bb[4]]'=>'$t->_vars[\'aa\'][$t->_vars[\'bb\'][4]]', 101 '$aa == false'=>'$t->_vars[\'aa\'] == false', 102 '$aa == true'=>'$t->_vars[\'aa\'] == true', 103 '$aa == null'=>'$t->_vars[\'aa\'] == null', 101 104 102 105 );
