diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -395,6 +395,9 @@ function exec(/* $cmd, $values1 = array(), ... */) foreach ($args as $arg) $values += (array)$arg; + #for escapeshellarg in it::_exec_quotevalue + $oldlocale = setlocale( LC_CTYPE, 0 ); + setlocale(LC_CTYPE, 'de_CH'); while (list($tag, $option, $key) = it::match('({(-?)(\w+)})', $cmd)) { $parts = array(); @@ -417,17 +420,19 @@ function exec(/* $cmd, $values1 = array(), ... */) $cmd = str_replace($tag, join(" ", $parts), $cmd); } + setlocale(LC_CTYPE, $oldlocale); $s = gettimeofday(); $result = EDC('noexec') ? "" : (string)shell_exec($cmd); $e = gettimeofday(); $msec= intval(($e['sec'] - $s['sec']) * 1000 + ($e['usec'] - $s['usec']) / 1000); - it::log('exec', "$msec\t$cmd"); + @it::log('exec', "$msec\t$cmd"); return $result; } +#fails with C locale!!! function _exec_quotevalue($value) { $result = strval($value); |