mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
disable warnings/errors if not debugging
git-svn-id: http://www.observium.org/svn/observer/trunk@1688 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+16
-5
@@ -36,6 +36,22 @@ if ($options['i'] && isset($options['n'])) {
|
||||
$doing = $options['n'] ."/".$options['i'];
|
||||
}
|
||||
|
||||
if (isset($options['d'])) {
|
||||
echo("DEBUG!\n");
|
||||
$debug = TRUE;
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_reporting', 1);
|
||||
} else {
|
||||
$debug = FALSE;
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('error_reporting', 0);
|
||||
}
|
||||
|
||||
|
||||
if(!$where) {
|
||||
echo("-h <device id> | <device hostname> Poll single device\n");
|
||||
echo("-h odd Poll odd numbered devices (same as -i 2 -n 0)\n");
|
||||
@@ -95,11 +111,6 @@ if (file_exists('.svn'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($options['d'])) { echo("DEBUG!\n"); $debug = 1; } else { $debug = 0; }
|
||||
|
||||
|
||||
$devices_discovered = 0;
|
||||
|
||||
$device_query = mysql_query("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC");
|
||||
|
||||
Reference in New Issue
Block a user