summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2019-09-13 18:16:43 +0200
committerUrban Müller2019-09-16 13:51:58 +0200
commit7a76228a0755e5211d124750423feb0fcfda6c94 (patch)
tree85c10ecff3e9c07f4cc60b118c559d18ff196e5c /it.class
parentb165f909a36748f0d749c250cdba3006ccd23105 (diff)
downloaditools-7a76228a0755e5211d124750423feb0fcfda6c94.tar.gz
itools-7a76228a0755e5211d124750423feb0fcfda6c94.tar.bz2
itools-7a76228a0755e5211d124750423feb0fcfda6c94.zip
lowercase minor errors (twin, debugparams)
Diffstat (limited to 'it.class')
-rw-r--r--it.class7
1 files changed, 6 insertions, 1 deletions
diff --git a/it.class b/it.class
index 9b03eed..74dc4da 100644
--- a/it.class
+++ b/it.class
@@ -285,7 +285,12 @@ static function error($p = array())
$body = it::replace(array('(pw|passw|password|secret)(\' => |\] => |=)[^&\s]*' => '$1$2********'), $body, array('utf8' => false));
}
- it::mail(array('To' => $p['to'], 'Subject' => ($p['fatal'] ? "Fatal: " : "Error: ") . substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()));
+ $type = ($p['fatal'] ? "Fatal: " : "Error: ");
+ $debugparams = it::replace(['^debug_' => ""], it::grep('^debug_(.*)', array_keys($GLOBALS)));
+ if (!it::is_live() || array_diff($debugparams, it::match('[-\w]+', $GLOBALS['ULTRAHOME'], ['all' => true]), ["devel", "twin", "utf8check", gethostname()]))
+ $type = mb_strtolower($type);
+
+ it::mail(['To' => $p['to'], 'Subject' => $type . substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()]);
$p['title'] = "Mail: " . $p['title'];
}
else if ($_SERVER['REMOTE_ADDR'] && EDC('edplain')) # toscreen mode: web