Changeset 1046

Show
Ignore:
Timestamp:
07/24/08 08:50:10 (4 months ago)
Author:
bastnic
Message:

fixed #652 : improvements on jtpl plugin formcontrol, p=ametaireau

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/CREDITS

    r1044 r1046  
    6868 - documentation 
    6969 - many improvements (jClasses::inc(), jIniFile, jAppManager, jelix-scripts etc ) 
     70 - coord plugin for Zend Framework (#651) 
    7071 
    7172Dominique Papin (aka bibo) 
     
    145146 - tpl plugin stripws (#140) 
    146147 
     148Alexis Métaireau 
     149 - improvements on jtpl plugin formcontrol (#652) 
     150 
    147151Aubanel Monnier 
    148152 - jResponseLatexToPdf and jtpl plugins for latex 
  • trunk/lib/jelix/plugins/tpl/html/block.formcontrols.php

    r1030 r1046  
    44* @subpackage  jtpl_plugin 
    55* @author      Jouanneau Laurent 
    6 * @contributor Mickaël Fradin, F.Fernandez, Dominique Papin 
    7 * @copyright   2007-2008 Jouanneau laurent, 2007 Mickaël Fradin, 2007 F.Fernandez, 2007 Dominique Papin 
     6* @contributor Mickaël Fradin, F.Fernandez, Dominique Papin, Alexis Métaireau 
     7* @copyright   2007-2008 Jouanneau laurent, 2007 Mickaël Fradin, 2007 F.Fernandez, 2007 Dominique Papin, 2008 Alexis Métaireau 
    88* @link        http://www.jelix.org 
    99* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5151        } 
    5252        elseif(count($param) == 2){ 
    53             $content = 'if(is_array('.$param[0].')){ 
     53            $content = 'if(is_array('.$param[0].') || '.$param[0].' === null){ 
    5454                $ctrls_to_display = '.$param[0].'; 
    5555                $ctrls_notto_display = '.$param[1].'; 
     
    9595       && (  ($ctrls_to_display===null && $ctrls_notto_display === null) 
    9696          || ($ctrls_to_display===null && !in_array($ctrlref, $ctrls_notto_display)) 
    97           || in_array($ctrlref, $ctrls_to_display))) { 
     97          || (is_array($ctrls_to_display) && in_array($ctrlref, $ctrls_to_display) ))) { 
    9898        $t->_privateVars[\'__ctrlref\'] = $ctrlref; 
    9999        $t->_privateVars[\'__ctrl\'] = $ctrl; 
Download in other formats: Unified Diff Zip Archive