Ticket #652: patch.diff
| File patch.diff, 1.7 kB (added by ametaireau, 6 months ago) |
|---|
-
lib/jelix/plugins/tpl/html/block.formcontrols.php
old new 3 3 * @package jelix 4 4 * @subpackage jtpl_plugin 5 5 * @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 8 8 * @link http://www.jelix.org 9 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 10 */ … … 50 50 }'; 51 51 } 52 52 elseif(count($param) == 2){ 53 $content = 'if(is_array('.$param[0].') ){53 $content = 'if(is_array('.$param[0].') || '.$param[0].' === null){ 54 54 $ctrls_to_display = '.$param[0].'; 55 55 $ctrls_notto_display = '.$param[1].'; 56 56 } … … 94 94 $content.='if(!isset($t->_privateVars[\'__displayed_ctrl\'][$ctrlref]) 95 95 && ( ($ctrls_to_display===null && $ctrls_notto_display === null) 96 96 || ($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) ))) { 98 98 $t->_privateVars[\'__ctrlref\'] = $ctrlref; 99 99 $t->_privateVars[\'__ctrl\'] = $ctrl; 100 100 ';
