mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-15 16:14:32 +02:00
Fix coding style part 2
This commit is contained in:
@@ -12,16 +12,17 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if(is_admin() === false) {
|
||||
if (is_admin() === false) {
|
||||
die('ERROR: You need to be admin');
|
||||
}
|
||||
|
||||
$template_id = ($_POST['template_id']);
|
||||
|
||||
if(is_numeric($template_id) && $template_id > 0) {
|
||||
foreach (dbFetchRows("SELECT `alert_rule_id` FROM `alert_template_map` WHERE `alert_templates_id` = ?",array($template_id)) as $rule) {
|
||||
if (is_numeric($template_id) && $template_id > 0) {
|
||||
foreach (dbFetchRows('SELECT `alert_rule_id` FROM `alert_template_map` WHERE `alert_templates_id` = ?', array($template_id)) as $rule) {
|
||||
$rules[] = $rule['alert_rule_id'];
|
||||
}
|
||||
$output = array('rule_id'=>$rules);
|
||||
|
||||
$output = array('rule_id' => $rules);
|
||||
echo _json_encode($output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user