mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use one sql query to fetch device alert rules (#8391)
* Use one sql query to fetch device alert rules Rename $device to $device_id to avoid confusion. I didn't see any variable collisions. * don't return disabled rules * remove semi-colin
This commit is contained in:
committed by
Neil Lathwood
parent
aec567f890
commit
72752fa2d0
@@ -101,6 +101,7 @@ function dbQuery($sql, $parameters = array())
|
||||
$fullSql = dbMakeQuery($sql, $parameters);
|
||||
if ($debug) {
|
||||
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
|
||||
$fullSql = str_replace(PHP_EOL, '', $fullSql);
|
||||
if (preg_match('/(INSERT INTO `alert_log`).*(details)/i', $fullSql)) {
|
||||
echo "\nINSERT INTO `alert_log` entry masked due to binary data\n";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user