mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Fix coding style part 2
This commit is contained in:
@@ -12,20 +12,21 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if(is_admin() === false) {
|
||||
if (is_admin() === false) {
|
||||
die('ERROR: You need to be admin');
|
||||
}
|
||||
|
||||
if(!is_numeric($_POST['template_id'])) {
|
||||
echo('ERROR: No template selected');
|
||||
if (!is_numeric($_POST['template_id'])) {
|
||||
echo 'ERROR: No template selected';
|
||||
exit;
|
||||
} else {
|
||||
if(dbDelete('alert_templates', "`id` = ?", array($_POST['template_id']))) {
|
||||
echo('Alert template has been deleted.');
|
||||
exit;
|
||||
} else {
|
||||
echo('ERROR: Alert template has not been deleted.');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
if (dbDelete('alert_templates', '`id` = ?', array($_POST['template_id']))) {
|
||||
echo 'Alert template has been deleted.';
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
echo 'ERROR: Alert template has not been deleted.';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user