Ticket #652: patch.diff

File patch.diff, 1.7 kB (added by ametaireau, 6 months ago)

diff file

  • lib/jelix/plugins/tpl/html/block.formcontrols.php

    old new  
    33* @package     jelix 
    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 
    1010*/ 
     
    5050            }'; 
    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].'; 
    5656            } 
     
    9494    $content.='if(!isset($t->_privateVars[\'__displayed_ctrl\'][$ctrlref]) 
    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; 
    100100'; 
Download in other formats: Original Format