Handle when controls is not defined, like in WebSite monitors
parent
7aa229658b
commit
10d70022fe
|
@ -8,6 +8,7 @@ if (ZM_OPT_CONTROL and canView('Control')) {
|
||||||
var controlOptions = new Object();
|
var controlOptions = new Object();
|
||||||
<?php
|
<?php
|
||||||
global $controls;
|
global $controls;
|
||||||
|
if ($controls) {
|
||||||
foreach ($controls as $control) {
|
foreach ($controls as $control) {
|
||||||
echo '
|
echo '
|
||||||
controlOptions['.$control->Id().'] = new Array();
|
controlOptions['.$control->Id().'] = new Array();
|
||||||
|
@ -17,6 +18,7 @@ controlOptions['.$control->Id().'][0] = '.
|
||||||
echo 'controlOptions['. $control->Id().']['.$i.'] = \''.translate('Preset').' '.$i .'\';'.PHP_EOL;
|
echo 'controlOptions['. $control->Id().']['.$i.'] = \''.translate('Preset').' '.$i .'\';'.PHP_EOL;
|
||||||
}
|
}
|
||||||
} # end foreach row
|
} # end foreach row
|
||||||
|
}
|
||||||
} # end if ZM_OPT_CONTROL
|
} # end if ZM_OPT_CONTROL
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue