mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This reverts commit d1a0ccda46
.
This commit is contained in:
@@ -22,7 +22,6 @@ use LibreNMS\Exceptions\InvalidIpException;
|
||||
use LibreNMS\Util\Git;
|
||||
use LibreNMS\Util\Html;
|
||||
use LibreNMS\Util\IP;
|
||||
use LibreNMS\Util\Laravel;
|
||||
|
||||
function generate_priority_label($priority)
|
||||
{
|
||||
@@ -664,7 +663,7 @@ if (!function_exists('d_echo')) {
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if (Laravel::isBooted()) {
|
||||
if (class_exists('\Log')) {
|
||||
\Log::debug(is_string($text) ? rtrim($text) : $text);
|
||||
} elseif ($debug) {
|
||||
print_r($text);
|
||||
|
@@ -21,7 +21,6 @@ use Illuminate\Database\QueryException;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Exceptions\DatabaseConnectException;
|
||||
use LibreNMS\DB\Eloquent;
|
||||
use LibreNMS\Util\Laravel;
|
||||
|
||||
function dbIsConnected()
|
||||
{
|
||||
@@ -464,9 +463,11 @@ function dbHandleException(QueryException $exception)
|
||||
}
|
||||
}
|
||||
|
||||
$message .= $exception->getTraceAsString();
|
||||
foreach ($exception->getTrace() as $trace) {
|
||||
$message .= "\n " . $trace['file'] . ':' . $trace['line'];
|
||||
}
|
||||
|
||||
if (Laravel::isBooted()) {
|
||||
if (class_exists('Log')) {
|
||||
Log::error($message);
|
||||
} else {
|
||||
c_echo("%rSQL Error!%n ");
|
||||
|
@@ -998,7 +998,7 @@ function send_mail($emails, $subject, $message, $html = false)
|
||||
}
|
||||
$mail->send();
|
||||
return true;
|
||||
} catch (\PHPMailer\PHPMailer\Exception $e) {
|
||||
} catch (phpmailerException $e) {
|
||||
return $e->errorMessage();
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
|
@@ -23,8 +23,6 @@
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
use LibreNMS\Util\Laravel;
|
||||
|
||||
if (!function_exists('d_echo')) {
|
||||
/**
|
||||
* Legacy convenience function - please use this instead of 'if ($debug) { echo ...; }'
|
||||
@@ -37,7 +35,7 @@ if (!function_exists('d_echo')) {
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if (Laravel::isBooted()) {
|
||||
if (class_exists('\Log')) {
|
||||
\Log::debug(is_string($text) ? rtrim($text) : $text);
|
||||
} elseif ($debug) {
|
||||
print_r($text);
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
$ipmi_rows = dbFetchRows("SELECT * FROM sensors WHERE device_id = ? AND poller_type='ipmi'", array($device['device_id']));
|
||||
|
Reference in New Issue
Block a user