Fix coding style part 2

This commit is contained in:
Job Snijders
2015-07-15 11:04:22 +02:00
parent ad9590df9b
commit d8693f05ae
733 changed files with 37359 additions and 33947 deletions
+5 -4
View File
@@ -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);
}