summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2018-09-19 15:11:00 +0200
committerUrban Müller2018-09-19 15:11:00 +0200
commite7098aae53f9aed2bb63a8ef74bf210b6c344f40 (patch)
treec9a8a9e5bfea51c6f9b15111b9156bca99522868 /it.class
parent8ee4a71bdebcf3e7b3d64e582640f24f81023160 (diff)
downloaditools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.tar.gz
itools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.tar.bz2
itools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.zip
make sure it::log does not producee @it::fatal in with /opt/ultra binaries
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 2 insertions, 3 deletions
diff --git a/it.class b/it.class
index d62ca1f..6145fe1 100644
--- a/it.class
+++ b/it.class
@@ -87,8 +87,7 @@ static function log($name /* ... */)
*/
static function log_line($name, $line)
{
- $log = $GLOBALS['ULTRAHOME'] == "/opt/ultra/bin" ? "../log" : "log";
- $basefn = substr($name, 0, 1) == "/" ? $name : $GLOBALS['ULTRAHOME'] . "/$log/$name";
+ $basefn = substr($name, 0, 1) == "/" ? $name : ($GLOBALS['ULTRAHOME'] == "/opt/ultra/bin" ? it::match('/www/[^/]*', getcwd()) : $GLOBALS['ULTRAHOME']) . "/log/$name";
$fullfn = $basefn . "-" . date('Ymd');
if (substr($fullfn, 0, 1) == "/")
@@ -241,7 +240,7 @@ static function error($p = array())
if ($p['fatal'] && $_SERVER['REMOTE_ADDR'])
{
- @http_response_code(500);
+ http_response_code(500);
echo "<!DOCTYPE html><html><head><title></title></head><body>Internal Server Error</body></html>";
}