diff options
author | Urban Müller | 2018-06-15 17:33:53 +0200 |
---|---|---|
committer | Urban Müller | 2018-06-15 17:33:53 +0200 |
commit | 6b0c87e5fad800ce625ff9ee47e27a2affd965b8 (patch) | |
tree | 0cdd3dbc0cc35412aae294fdf124ee389d57e734 /it.class | |
parent | 24cbb46dd72da6d4ab2440b0abd88f736d46064c (diff) | |
download | itools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.tar.gz itools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.tar.bz2 itools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.zip |
allow plain err messages in web views
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -282,6 +282,8 @@ static function error($p = array()) 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())); $p['title'] = "Mail: " . $p['title']; } + else if ($_SERVER['REMOTE_ADDR'] && EDC('edplain')) # toscreen mode: web + echo $p['title'] . "\n"; else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web echo "<pre style='z-index:10000; position:relative; background:white'>" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "</pre>"; # works with iso-8859-1 or utf-8, UTF8SAFE else # toscreen mode: shell (outputs to stderr) |