Skip to content
Snippets Groups Projects
Commit badfc6fb authored by Peter Rotich's avatar Peter Rotich
Browse files

Only send alerts if logs is written to DB.

parent a3dd33d7
No related branches found
No related tags found
No related merge requests found
...@@ -288,14 +288,14 @@ class osTicket { ...@@ -288,14 +288,14 @@ class osTicket {
$level=3; //Debug $level=3; //Debug
} }
//Alert admin if enabled...
if($alert)
$this->alertAdmin($title, $message);
//Logging everything during upgrade. //Logging everything during upgrade.
if($this->getConfig()->getLogLevel()<$level && !$force) if($this->getConfig()->getLogLevel()<$level && !$force)
return false; return false;
//Alert admin if enabled...
if($alert && $this->getConfig()->getLogLevel() >= $level)
$this->alertAdmin($title, $message);
//Save log based on system log level settings. //Save log based on system log level settings.
$loglevel=array(1=>'Error','Warning','Debug'); $loglevel=array(1=>'Error','Warning','Debug');
$sql='INSERT INTO '.SYSLOG_TABLE.' SET created=NOW(), updated=NOW() ' $sql='INSERT INTO '.SYSLOG_TABLE.' SET created=NOW(), updated=NOW() '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment