summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class11
1 files changed, 9 insertions, 2 deletions
diff --git a/it.class b/it.class
index 04022e7..2258c7d 100644
--- a/it.class
+++ b/it.class
@@ -38,11 +38,18 @@ function log($name /* ... */)
$line = date("Y-m-d H:i:s") . "\t" . implode("\t", array_slice($args, 1)) . "\n";
$fn = $GLOBALS['ULTRAHOME'] . "/log/$name-" . date('Ymd');
+ $existed = file_exists($fn);
+
if ($fh = fopen($fn, "a"))
{
fputs($fh, $line);
fclose($fh);
- @chgrp($fn, "www");
+
+ if (!$existed)
+ {
+ @chgrp($fn, "www");
+ @symlink($fn, $GLOBALS['ULTRAHOME'] . "/log/$name");
+ }
}
}
@@ -319,7 +326,7 @@ function exec(/* $cmd, $values1 = array(), ... */)
it::log('exec', $cmd);
- return (string)shell_exec($cmd);
+ return EDC('noexec') ? "" : (string)shell_exec($cmd);
}
function _exec_quotevalue($value)