whitespace and add a test for ->Triggers being an array
This commit is contained in:
parent
d1a60dedc8
commit
514c83d3e9
|
@ -771,19 +771,19 @@ switch ( $tab )
|
|||
$breakCount = (int)(ceil(count($optTriggers)));
|
||||
$breakCount = min( 3, $breakCount );
|
||||
$optCount = 0;
|
||||
foreach( $optTriggers as $optTrigger )
|
||||
{
|
||||
if ( !ZM_OPT_X10 && $optTrigger == 'X10' )
|
||||
foreach( $optTriggers as $optTrigger ) {
|
||||
if ( ( ! ZM_OPT_X10 ) && ( $optTrigger == 'X10' ) )
|
||||
continue;
|
||||
if ( $optCount && ($optCount%$breakCount == 0) )
|
||||
echo "</br>";
|
||||
?>
|
||||
<input type="checkbox" name="newMonitor[Triggers][]" value="<?php echo $optTrigger ?>"<?php if ( isset($monitor->Triggers) && in_array( $optTrigger, $monitor->Triggers ) ) { ?> checked="checked"<?php } ?>/> <?php echo $optTrigger ?>
|
||||
<?php
|
||||
echo '</br>';
|
||||
echo '<input type="checkbox" name="newMonitor[Triggers][]" value="'. $optTrigger .'"';
|
||||
if ( isset($monitor->Triggers) && is_array( $monitor->Triggers ) and in_array( $optTrigger, $monitor->Triggers ) ) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
echo '/> '. $optTrigger ;
|
||||
$optCount ++;
|
||||
}
|
||||
if ( !$optCount )
|
||||
{
|
||||
if ( !$optCount ) {
|
||||
?>
|
||||
<em><?php echo translate('NoneAvailable') ?></em>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue