diff options
author | Urban Müller | 2012-06-01 13:30:51 +0000 |
---|---|---|
committer | Urban Müller | 2012-06-01 13:30:51 +0000 |
commit | 864632224f92940637cac73864af3a8965e72d7c (patch) | |
tree | 2266c87eba6c961aead4382f256cd4ed09fa3c69 | |
parent | 34ce80f4ecb285c9fc453fc83819168c3b870507 (diff) | |
download | itools-864632224f92940637cac73864af3a8965e72d7c.tar.gz itools-864632224f92940637cac73864af3a8965e72d7c.tar.bz2 itools-864632224f92940637cac73864af3a8965e72d7c.zip |
support aslive(), longer subjects
-rw-r--r-- | it.class | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 "<pre>" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "</pre>"; # 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); |