Changeset 312

Show
Ignore:
Timestamp:
11/23/06 21:56:31 (2 years ago)
Author:
laurentj
Message:

correction de quelques bugs :
- ticket #43 Erreur de compilation de template avec une locale ayant un module 'default'
- ticket #44 Valeur des checkbox mal gérée dans jForms
- ticket #45 erreur php sur le plugin de template ifacl
- ticket #50 jDateTime : erreur dans les formats de dates
- ticket #52 fonction js ajouter utilisateur dans jxacl doit mettre le focus sur le champ utilisateur
- fix bug sur le build des modules additionnels
- fix bug sur jZone : oubli de protected sur la methode _createContent

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/buildmodules.php

    r303 r312  
    3131 
    3232if($PACKAGE_TAR_GZ || $PACKAGE_ZIP ){ 
     33    $BUILD_SUBPATH = 'additionnal-modules/'; 
    3334    if($NIGHTLY_NAME) 
    34         $PACKAGE_NAME=$APPNAME.'-nightly'; 
     35        $PACKAGE_NAME='additionnal-modules-nightly'; 
    3536    else 
    36         $PACKAGE_NAME=$APPNAME.'-SVN-'.$SVN_REVISION; 
     37        $PACKAGE_NAME='additionnal-modules-SVN-'.$SVN_REVISION; 
     38}else{ 
     39    $BUILD_SUBPATH = 'lib/jelix-modules/'; 
     40 
    3741} 
    3842 
     
    4044 
    4145//... creation des repertoires 
    42 jBuildUtils::createDir($MAIN_TARGET_PATH); 
     46jBuildUtils::createDir($MAIN_TARGET_PATH.$BUILD_SUBPATH); 
    4347 
    4448//... execution des manifests 
    45 jManifest::process('build/manifests/jelix-modules.mn', 'lib/jelix-modules/', $MAIN_TARGET_PATH, $GLOBALS); 
     49jManifest::process('build/manifests/jelix-modules.mn', 'lib/jelix-modules/', $MAIN_TARGET_PATH.$BUILD_SUBPATH, $GLOBALS); 
    4650 
    4751//... packages 
    4852 
    4953if($PACKAGE_TAR_GZ){ 
    50     exec('tar czf '.$MAIN_TARGET_PATH.$PACKAGE_NAME.'.tar.gz -C '.$MAIN_TARGET_PATH.' '.$APPNAME); 
     54    exec('tar czf '.$MAIN_TARGET_PATH.$PACKAGE_NAME.'.tar.gz -C '.$MAIN_TARGET_PATH.' '.$BUILD_SUBPATH); 
    5155} 
    5256 
    5357if($PACKAGE_ZIP){ 
    5458    chdir($MAIN_TARGET_PATH); 
    55     exec('zip -r '.$PACKAGE_NAME.'.zip '.$APPNAME); 
     59    exec('zip -r '.$PACKAGE_NAME.'.zip '.$BUILD_SUBPATH); 
    5660    chdir(dirname(__FILE__)); 
    5761} 
  • trunk/lib/jelix-modules/jelix/locales/en_US/format.ISO-8859-1.properties

    r254 r312  
    1 # format utilisant les caract�s de remplacement de la fonction date 
     1# format string for php date function (see http://www.php.net/manual/en/function.date.php) 
    22date = m/d/Y 
    33datetime = m/d/Y H:i:s 
    44time = H:i:s 
    55 
     6# format string for php strptime function  (see http://www.php.net/manual/en/function.strftime.php) 
     7date_st = %m/%d/%Y 
     8datetime_st = %m/%d/%Y %H:%M:%S 
     9time_st = %H:%M:%S 
    610 
    711format.monetary = $ %d 
  • trunk/lib/jelix-modules/jelix/locales/fr_FR/format.ISO-8859-1.properties

    r254 r312  
    1 # format utilisant les caract�s de remplacement de la fonction date 
     1# format pour la fonction date (voir http://www.php.net/manual/en/function.date.php) 
    22date = d/m/Y 
    33datetime = d/m/Y H:i:s 
    44time = H:i:s 
    55 
     6# format pour la fonction strptime (voir http://www.php.net/manual/en/function.strftime.php) 
     7date_st = %d/%m/%Y 
     8datetime_st = %d/%m/%Y %H:%M:%S 
     9time_st = %H:%M:%S 
    610 
    711format.monetary = %d EURO 
  • trunk/lib/jelix-modules/jelix/locales/fr_FR/format.UTF-8.properties

    r254 r312  
    1 # format utilisant les caractères de remplacement de la fonction date 
     1# format pour la fonction date (voir http://www.php.net/manual/en/function.date.php) 
    22date = d/m/Y 
    33datetime = d/m/Y H:i:s 
    44time = H:i:s 
    55 
     6# format pour la fonction strptime (voir http://www.php.net/manual/en/function.strftime.php) 
     7date_st = %d/%m/%Y 
     8datetime_st = %d/%m/%Y %H:%M:%S 
     9time_st = %H:%M:%S 
    610 
    711format.monetary = %d EURO 
  • trunk/lib/jelix-modules/jxacl/templates/xuladmin.tpl

    r307 r312  
    358358                <popupset> 
    359359                    <popup id="addUserMenu"> 
    360                             <menuitem label="Ajouter un Utilisateur" onclick="openModal('jxaclNotifyBox1','jxaclModalBox2')"/> 
     360                            <menuitem label="Ajouter un Utilisateur" onclick="document.getElementById('user').focus();"/> 
    361361                            <menuitem label="Supprimer cet Utilisateur" onclick="removeUserFromGrp(document.getElementById('users'));"/> 
    362362                    </popup> 
  • trunk/lib/jelix/forms/jFormsBase.class.php

    r310 r312  
    6868        foreach($this->_controls as $name=>$ctrl){ 
    6969            $value = $req->getParam($name); 
    70             if($value !== null) 
    71                 $this->_container->datas[$name]= $value; 
     70            //if($value !== null) on commente pour le moment, 
     71            // �revoir un meilleur test, pour les formulaires sur plusieurs pages 
     72            $this->_container->datas[$name]= $value; 
    7273        } 
    7374    } 
  • trunk/lib/jelix/tpl/jTplCompiler.class.php

    r309 r312  
    3838    T_IS_NOT_IDENTICAL, T_IS_SMALLER_OR_EQUAL, T_LOGICAL_AND, 
    3939    T_LOGICAL_OR, T_LOGICAL_XOR, T_SR, T_SL, T_DOUBLE_ARROW); 
     40 
     41    private $_inLocaleOk = array(T_STRING, T_ABSTRACT, T_AS, T_BREAK, T_CASE, T_CATCH, T_CLASS, T_CLONE, 
     42       T_CONST, T_CONTINUE, T_DECLARE, T_DEFAULT, T_DO, T_ECHO, T_ELSE, T_ELSEIF, T_EMPTY, 
     43       T_EXIT, T_FINAL, T_FOR, T_FOREACH, T_FUNCTION, T_GLOBAL, T_IF, T_IMPLEMENTS, T_INSTANCEOF, 
     44       T_INTERFACE, T_LOGICAL_AND, T_LOGICAL_OR, T_LOGICAL_XOR, T_NEW, T_PRIVATE, T_PUBLIC, 
     45       T_PROTECTED, T_RETURN, T_STATIC, T_SWITCH, T_THROW, T_TRY, T_USE, T_VAR, T_WHILE); 
    4046 
    4147    private $_allowedInVar; 
     
    409415                    continue; 
    410416                } 
    411  
    412                 if($type == T_STRING && $inLocale){ 
     417                if($inLocale && in_array($type,$this->_inLocaleOk)){ 
    413418                    $locale.=$str; 
    414419                }elseif($type == T_VARIABLE && $inLocale){ 
  • trunk/lib/jelix/tpl/plugins/common/block.ifacl.php

    r248 r312  
    1313 * a special if block to test easily a right value 
    1414 * 
    15  * usage : {ifacl array('subject',54)} ..here generated content if the user has the right  {/ifacl} 
     15 * usage : {ifacl 'subject',54} ..here generated content if the user has the right  {/ifacl} 
    1616 * @param jTplCompiler $compiler the template compiler 
    1717 * @param boolean true if it is the begin of block, else false 
    18  * @param $params array  1=>subject 2=>right value 3=>optional resource 
     18 * @param $param array  1=>subject 2=>right value 3=>optional resource 
    1919 * @return string the php code corresponding to the begin or end of the block 
    2020 */ 
    21 function jtpl_block_ifacl($compiler, $begin, $params=array()) 
     21function jtpl_block_ifacl($compiler, $begin, $param=array()) 
    2222{ 
    2323    if($begin){ 
    2424        if(count($param) == 2){ 
    25             $content = ' if(jAcl::check('.$param[1].','.$param[2].')){'; 
     25            $content = ' if(jAcl::check('.$param[0].','.$param[1].')){'; 
    2626        }elseif(count($param) == 3){ 
    27             $content = ' if(jAcl::check('.$param[1].','.$param[2].','.$param[3].')){'; 
     27            $content = ' if(jAcl::check('.$param[0].','.$param[1].','.$param[2].')){'; 
    2828        }else{ 
    2929            $content=''; 
  • trunk/lib/jelix/tpl/plugins/common/block.ifnotacl.php

    r248 r312  
    1313 * a special if block to test easily a right value 
    1414 * 
    15  * usage : {ifnotacl array('subject',54)} ..here generated content if the user has NOT the right  {/ifnotacl} 
     15 * usage : {ifnotacl 'subject',54} ..here generated content if the user has NOT the right  {/ifnotacl} 
    1616 * @param jTplCompiler $compiler the template compiler 
    1717 * @param boolean true if it is the begin of block, else false 
     
    2222{ 
    2323    if($begin){ 
    24         if(count($param) == 2){ 
    25             $content = ' if(!jAcl::check('.$param[1].','.$param[2].')){'; 
    26         }elseif(count($param) == 3){ 
    27             $content = ' if(!jAcl::check('.$param[1].','.$param[2].','.$param[3].')){'; 
     24        if(count($params) == 2){ 
     25            $content = ' if(!jAcl::check('.$params[0].','.$params[1].')){'; 
     26        }elseif(count($params) == 3){ 
     27            $content = ' if(!jAcl::check('.$param[0].','.$params[1].','.$params[2].')){'; 
    2828        }else{ 
    2929            $content=''; 
  • trunk/lib/jelix/utils/jDateTime.class.php

    r300 r312  
    3939            preg_match_all('/%(\w)/',$format,$patt); 
    4040            foreach($patt[1] as $k=>$v){ 
    41                 if(isset($plop[$v])) 
    42                     $result[$plop[$v]]= intval($m[$k+1]); 
     41                if(!isset($plop[$v])) continue; 
     42                $result[$plop[$v]] = intval($m[$k+1]); 
     43                if($plop[$v] == 'tm_mon'){ 
     44                    $result[$plop[$v]] -= 1; 
     45                } 
    4346            } 
    4447            $result['tm_year'] -= 1900; 
     
    143146        switch($format){ 
    144147           case self::LANG_DFORMAT: 
    145                $lf = jLocale::get('jelix~format.date'); 
     148               $lf = jLocale::get('jelix~format.date_st'); 
    146149               if($res = strptime ( $str, $lf )){ 
    147150                   $ok=true; 
    148151                   $this->year = $res['tm_year']+1900; 
    149                    $this->month = $res['tm_mon']
     152                   $this->month = $res['tm_mon'] +1
    150153                   $this->day = $res['tm_mday']; 
    151154               } 
    152155               break; 
    153156           case self::LANG_DTFORMAT: 
    154                $lf = jLocale::get('jelix~format.datetime'); 
     157               $lf = jLocale::get('jelix~format.datetime_st'); 
    155158               if($res = strptime ( $str, $lf )){ 
    156159                   $ok=true; 
    157160                   $this->year = $res['tm_year']+1900; 
    158                    $this->month = $res['tm_mon']
     161                   $this->month = $res['tm_mon'] +1
    159162                   $this->day = $res['tm_mday']; 
    160163                   $this->hour = $res['tm_hour']; 
     
    164167               break; 
    165168           case self::LANG_TFORMAT: 
    166                $lf = jLocale::get('jelix~format.time'); 
     169               $lf = jLocale::get('jelix~format.time_st'); 
    167170               if($res = strptime ( $str, $lf )){ 
    168171                   $ok=true; 
  • trunk/lib/jelix/utils/jZone.class.php

    r248 r312  
    195195    * @return string generated content 
    196196    */ 
    197     function _createContent (){ 
     197    protected function _createContent (){ 
    198198        if($this->_tplname != ''){ 
    199199            $this->_tpl = new jTpl(); 
Download in other formats: Unified Diff Zip Archive