summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2018-06-27 14:52:42 +0200
committerUrban Müller2018-06-27 14:52:42 +0200
commitad34103f7af9fb3b1a6830b891aa74a7663960eb (patch)
tree03dd3a6c9c4361d6568d5e8368ec8769570b0722
parent99b7fc8dc08da090bb7f00c2882e1daeec4434ba (diff)
downloaditools-ad34103f7af9fb3b1a6830b891aa74a7663960eb.tar.gz
itools-ad34103f7af9fb3b1a6830b891aa74a7663960eb.tar.bz2
itools-ad34103f7af9fb3b1a6830b891aa74a7663960eb.zip
support muting of alerts
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 8b443dc..ce42027 100644
--- a/it.class
+++ b/it.class
@@ -225,7 +225,7 @@ static function error($p = array())
$lastsentfn = "/tmp/alertdata/it_error_mailsent_" . urlencode($p['blockmailid']);
clearstatcache();
$sendmail = time() - max(@filemtime($lastsentfn), it_cache::get($lastsentfn, ['distributed' => true])) > $p['blockmail'];
- if ($sendmail)
+ if ($sendmail && !it_cache::get('it_error_mute_' . $GLOBALS['ULTRASITE'], [ 'distributed' => true ]))
{
@unlink($lastsentfn);
@touch($lastsentfn);