Changeset 415

Show
Ignore:
Timestamp:
04/09/07 20:25:13 (2 years ago)
Author:
laurentj
Message:

fixed bug #135: constante name were not verified in expression in jtpl

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix-modules/jelix/locales/en_EN/errors.ISO-8859-1.properties

    r385 r415  
    4848tplplugin.block.bad.argument.number=(316)In the tag %s  in the template %3$s, bad argument number (%2$s expected) 
    4949tpl.tag.locale.end.missing=(317)In the tag %s  in the template  %s, the end of a locale key is missing 
     50tpl.tag.constant.notallowed=(318)In the tag %s in the template %3$s, constants (%2$s) are not allowed 
    5051 
    5152#---- mail 
  • trunk/lib/jelix-modules/jelix/locales/en_EN/errors.UTF-8.properties

    r385 r415  
    4848tplplugin.block.bad.argument.number=(316)In the tag %s  in the template %3$s, bad argument number (%2$s expected) 
    4949tpl.tag.locale.end.missing=(317)In the tag %s  in the template  %s, the end of a locale key is missing 
     50tpl.tag.constant.notallowed=(318)In the tag %s in the template %3$s, constants (%2$s) are not allowed 
    5051 
    5152#---- mail 
  • trunk/lib/jelix-modules/jelix/locales/en_US/errors.ISO-8859-1.properties

    r385 r415  
    4848tplplugin.block.bad.argument.number=(316)In the tag %s  in the template %3$s, bad argument number (%2$s expected) 
    4949tpl.tag.locale.end.missing=(317)In the tag %s  in the template  %s, the end of a locale key is missing 
     50tpl.tag.constant.notallowed=(318)In the tag %s in the template %3$s, constants (%2$s) are not allowed 
    5051 
    5152#---- mail 
  • trunk/lib/jelix-modules/jelix/locales/en_US/errors.UTF-8.properties

    r385 r415  
    4848tplplugin.block.bad.argument.number=(316)In the tag %s  in the template %3$s, bad argument number (%2$s expected) 
    4949tpl.tag.locale.end.missing=(317)In the tag %s  in the template  %s, the end of a locale key is missing 
     50tpl.tag.constant.notallowed=(318)In the tag %s in the template %3$s, constants (%2$s) are not allowed 
     51 
    5052 
    5153#---- mail 
  • trunk/lib/jelix-modules/jelix/locales/fr_FR/errors.ISO-8859-1.properties

    r385 r415  
    4545tplplugin.block.bad.argument.number=(316)Dans le tag %s du template %3$s, nombre d'arguments incorrect (%2$s attendus) 
    4646tpl.tag.locale.end.missing=(317)Dans le tag %s du template %s, il manque la fin de la clef de localisation 
     47tpl.tag.constant.notallowed=(318)Dans le tag %s du template %3$s, les constantes (%2$s) sont interdites 
    4748 
    4849#---- mail 
  • trunk/lib/jelix-modules/jelix/locales/fr_FR/errors.UTF-8.properties

    r385 r415  
    4949tplplugin.block.bad.argument.number=(316)Dans le tag %s du template %3$s, nombre d'arguments incorrect (%2$s attendus) 
    5050tpl.tag.locale.end.missing=(317)Dans le tag %s du template %s, il manque la fin de la clef de localisation 
     51tpl.tag.constant.notallowed=(318)Dans le tag %s du template %3$s, les constantes (%2$s) sont interdites 
    5152 
    5253#---- mail 
  • trunk/lib/jelix/tpl/jTplCompiler.class.php

    r386 r415  
    416416                    $result.='$t->_vars[\''.substr($str,1).'\']'; 
    417417                }elseif($type == T_WHITESPACE || in_array($type, $allowed)){ 
     418                    if($type == T_STRING && defined($str)){ 
     419                        $this->doError2('errors.tpl.tag.constant.notallowed', $this->_currentTag, $str); 
     420                    } 
    418421                    $result.=$str; 
    419422                }else{ 
  • trunk/lib/jelix/tpl/locales/fr.php

    r215 r415  
    2222    'errors.tplplugin.block.too.many.arguments'=>'Dans le tag %s du template %s, arguments en trop', 
    2323    'errors.tplplugin.block.bad.argument.number'=>'Dans le tag %s du template %3$s, nombre d\'arguments incorrect (%2$s attendus)', 
    24  
     24    'errors.tpl.tag.constant.notallowed'=>'Dans le tag %s du template %3$s, les constantes (%2$s) sont interdites', 
    2525); 
    2626 
  • trunk/testapp/modules/unittest/classes/utjtplexpr.class.php

    r382 r415  
    5555        '$aa'=>'$t->_vars[\'aa\']', 
    5656        '$aa.$bb'=>'$t->_vars[\'aa\'].$t->_vars[\'bb\']', 
    57         '$aa.PHP_VERSION'=>'$t->_vars[\'aa\'].PHP_VERSION', 
    5857        '$aa."bbb"'=>'$t->_vars[\'aa\']."bbb"', 
    5958        '$aa+234'=>'$t->_vars[\'aa\']+234', 
     
    107106        'foreach($a)'=>array('jelix~errors.tpl.tag.phpsyntax.invalid',array('','foreach','')), 
    108107        '@aaa.bbb'=>array('jelix~errors.tpl.tag.locale.end.missing',array('','')), 
     108        '$aaa.PHP_VERSION'=>array('jelix~errors.tpl.tag.constant.notallowed',array('','PHP_VERSION','')), 
    109109        '@aaa.b,bb@'=>array('jelix~errors.tpl.tag.character.invalid',array('',',','')), 
    110110        '@@'=>array('jelix~errors.tpl.tag.locale.invalid',array('','')), 
Download in other formats: Unified Diff Zip Archive