From 6b0c87e5fad800ce625ff9ee47e27a2affd965b8 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 15 Jun 2018 17:33:53 +0200 Subject: allow plain err messages in web views --- it.class | 2 ++ 1 file changed, 2 insertions(+) (limited to 'it.class') diff --git a/it.class b/it.class index e56c4f2..c601c9c 100644 --- a/it.class +++ b/it.class @@ -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 "
" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "
"; # works with iso-8859-1 or utf-8, UTF8SAFE else # toscreen mode: shell (outputs to stderr) -- cgit v1.2.3