summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2012-04-04 15:32:25 +0000
committerUrban Müller2012-04-04 15:32:25 +0000
commitb88037b253c848a2a786c7cd3b28b3b75ce7d6c7 (patch)
tree5d20ef53aca5905fe0ef26f356bc80a746c6e248 /it.class
parenta0231e4df6f8bfa82451c05998bb349ece764610 (diff)
downloaditools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.tar.gz
itools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.tar.bz2
itools-b88037b253c848a2a786c7cd3b28b3b75ce7d6c7.zip
force sending of mails in it::error if not displayable
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it.class b/it.class
index 1be8f7c..8b81ba3 100644
--- a/it.class
+++ b/it.class
@@ -228,7 +228,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
$body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body);
}
- it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body) + (($cc = $GLOBALS['it_defaultconfig']['error_cc']) ? array('Cc' => $cc) : array()));
+ it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()));
}
else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web
echo "<pre>" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "</pre>"; # works with iso-8859-1 or utf-8, UTF8SAFE
@@ -813,7 +813,7 @@ static function mail($p)
{
$headers = $p;
unset($headers['forcemail'], $headers['Body']);
- $mail = new it_mail($headers);
+ $mail = new it_mail(array_filter($headers));
$mail->add_body($p['Body']);
return $mail->send($p);