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 = (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 ( !ZM_OPT_X10 && $optTrigger == '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 ( isset($monitor->Triggers) && in_array( $optTrigger, $monitor->Triggers ) ) { ?> checked="checked"<?php } ?>/> <?php echo $optTrigger ?>
|
if ( isset($monitor->Triggers) && is_array( $monitor->Triggers ) and in_array( $optTrigger, $monitor->Triggers ) ) {
|
||||||
<?php
|
echo ' checked="checked"';
|
||||||
|
}
|
||||||
|
echo '/> '. $optTrigger ;
|
||||||
$optCount ++;
|
$optCount ++;
|
||||||
}
|
}
|
||||||
if ( !$optCount )
|
if ( !$optCount ) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<em><?php echo translate('NoneAvailable') ?></em>
|
<em><?php echo translate('NoneAvailable') ?></em>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue