summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2018-06-15 17:33:53 +0200
committerUrban Müller2018-06-15 17:33:53 +0200
commit6b0c87e5fad800ce625ff9ee47e27a2affd965b8 (patch)
tree0cdd3dbc0cc35412aae294fdf124ee389d57e734
parent24cbb46dd72da6d4ab2440b0abd88f736d46064c (diff)
downloaditools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.tar.gz
itools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.tar.bz2
itools-6b0c87e5fad800ce625ff9ee47e27a2affd965b8.zip
allow plain err messages in web views
-rw-r--r--it.class2
1 files changed, 2 insertions, 0 deletions
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 "<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)