From 864632224f92940637cac73864af3a8965e72d7c Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 1 Jun 2012 13:30:51 +0000 Subject: support aslive(), longer subjects --- it.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index eb7efb6..487508d 100644 --- a/it.class +++ b/it.class @@ -155,7 +155,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de @mkdir("/tmp/alertdata"); @chmod("/tmp/alertdata", 0777); - $toscreen = ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel'); + $toscreen = !EDC('aslive') && (ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel')); @fseek(STDOUT, 0, SEEK_END); # Work around PHP bug 49819: posix_isatty seeks to start if ($toscreen && !it::is_live()) @@ -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, array('utf8' => false)); } - it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); + it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); } 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 @@ -236,7 +236,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de error_log(substr($p['title'], 0, 100000) . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . " " . (EDC('verbose') ? D($p['locals']) : "")); } - if ($_SERVER['REMOTE_ADDR']) + if ($_SERVER['REMOTE_ADDR']) # additional entry in log/error_log error_log("it::error: " . $p['title'] . " Url: $url"); file_put_contents("/tmp/alertdata/alert.log", it::date() . " " . $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . "\n", FILE_APPEND); -- cgit v1.2.3