Triggers cannot be null, it is '' instead
This commit is contained in:
parent
bb72e3000c
commit
e56976c800
|
@ -724,22 +724,19 @@ switch ( $tab ) {
|
||||||
$breakCount = (int)(ceil(count($optTriggers)));
|
$breakCount = (int)(ceil(count($optTriggers)));
|
||||||
$breakCount = min(3, $breakCount);
|
$breakCount = min(3, $breakCount);
|
||||||
$optCount = 0;
|
$optCount = 0;
|
||||||
foreach( $optTriggers as $optTrigger ) {
|
foreach ( $optTriggers as $optTrigger ) {
|
||||||
if ( !ZM_OPT_X10 && $optTrigger == 'X10' )
|
if ( $optTrigger == 'X10' and !ZM_OPT_X10 )
|
||||||
continue;
|
continue;
|
||||||
if ( $optCount && ($optCount%$breakCount == 0) )
|
if ( $optCount && ($optCount%$breakCount == 0) )
|
||||||
echo '</br>';
|
echo '</br>';
|
||||||
?>
|
echo '<input type="checkbox" name="newMonitor[Triggers][]" value="'. $optTrigger '"'.
|
||||||
<input type="checkbox" name="newMonitor[Triggers][]" value="<?php echo $optTrigger ?>"<?php if ( ( null !== $monitor->Triggers() ) && in_array( $optTrigger, $monitor->Triggers() ) ) { ?> checked="checked"<?php } ?>/> <?php echo $optTrigger ?>
|
( ( '' !== $monitor->Triggers()) && in_array($optTrigger, $monitor->Triggers()) ) ? ' checked="checked"':''). '/> '. $optTrigger;
|
||||||
<?php
|
|
||||||
$optCount ++;
|
$optCount ++;
|
||||||
}
|
} # end foreach trigger option
|
||||||
if ( !$optCount ) {
|
if ( !$optCount ) {
|
||||||
?>
|
echo '<em>'. translate('NoneAvailable') .'</em>';
|
||||||
<em><?php echo translate('NoneAvailable') ?></em>
|
}
|
||||||
<?php
|
?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue