mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: MySQL strict and query fixes (#5338)
* refactor: MySQL strict and query fixes * moved sql file
This commit is contained in:
committed by
Tony Murray
parent
3d0cf76e9b
commit
d5296319fb
@@ -22,7 +22,7 @@ if (!is_numeric($_POST['alert_id'])) {
|
||||
exit;
|
||||
} else {
|
||||
if (dbDelete('alert_rules', '`id` = ?', array($_POST['alert_id']))) {
|
||||
if (dbDelete('alert_map', 'rule = ?', array($_POST['alert_id'])) || dbFetchCell('COUNT(id) FROM alert_map WHERE rule = ?', array($_POST['alert_id'])) == 0) {
|
||||
if (dbDelete('alert_map', 'rule = ?', array($_POST['alert_id'])) || dbFetchCell('SELECT COUNT(*) FROM alert_map WHERE rule = ?', array($_POST['alert_id'])) == 0) {
|
||||
echo 'Maps has been deleted.';
|
||||
} else {
|
||||
echo 'WARNING: Maps could not be deleted.';
|
||||
|
Reference in New Issue
Block a user