mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove debug globals (#12811)
* Remove $debug global and $vdebug global makes these variables more accessible and protects from collisions. * the on boot set sends application as the first parameter, just handle that * Relocate other debug related functions * Log debug to stdout * Wrong output * remove stupid constants * Fix lint and style issues
This commit is contained in:
@@ -81,7 +81,7 @@ if ($error_msg) {
|
||||
Rrd::graph($graphfile, $rrd_options);
|
||||
d_echo($rrd_cmd);
|
||||
if (is_file($graphfile)) {
|
||||
if (! $debug) {
|
||||
if (! \LibreNMS\Util\Debug::isEnabled()) {
|
||||
set_image_type();
|
||||
if ($output === 'base64') {
|
||||
$imagedata = file_get_contents($graphfile);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
if (is_numeric($vars['id'])) {
|
||||
$acc = dbFetchRow('SELECT * FROM `mac_accounting` AS M, `ports` AS I, `devices` AS D WHERE M.ma_id = ? AND I.port_id = M.port_id AND I.device_id = D.device_id', [$vars['id']]);
|
||||
|
||||
if ($debug) {
|
||||
if (\LibreNMS\Util\Debug::isEnabled()) {
|
||||
echo '<pre>';
|
||||
print_r($acc);
|
||||
echo '</pre>';
|
||||
|
Reference in New Issue
Block a user