PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -20,8 +20,7 @@ if (is_admin() === false) {
if (!is_numeric($_POST['template_id'])) {
echo 'ERROR: No template selected';
exit;
}
else {
} else {
$rules = preg_split('/,/', mres($_POST['rule_id']));
$success = false;
foreach ($rules as $rule_id) {
@@ -29,15 +28,14 @@ else {
if ($db_id > 0) {
$success = true;
$ids[] = $db_id;
}
else {
} else {
echo 'ERROR: Alert rules have not been attached to this template.';
exit;
}
}
if ($success === true) {
dbDelete('alert_template_map', 'id NOT IN ('.implode(',', $ids).') AND alert_templates_id =?',array($_POST['template_id']));
dbDelete('alert_template_map', 'id NOT IN ('.implode(',', $ids).') AND alert_templates_id =?', array($_POST['template_id']));
echo "Alert rules have been attached to this template. $template_map_ids";
exit;
}