diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -550,15 +550,17 @@ static function shell_command(/* $cmd, $values1 = array(), ... */) #for escapeshellarg in it::_exec_quotevalue $oldlocale = setlocale(LC_CTYPE, 0); setlocale(LC_CTYPE, 'de_CH'); - foreach (it::match('({(-?)([a-z0-9]\w*)})', $cmd, array('all' => true)) as $tags) + foreach (it::match('({(-?-?)([a-z0-9]\w*)})', $cmd, array('all' => true)) as $tags) { list($tag, $option, $key) = $tags; $parts = array(); if ($option) { - foreach ((array)$values["-$key"] as $key => $value) + foreach ((array)$values[$option . $key] as $key => $value) { + if ($option == '--') + $key = ($key[1] ? '--' : '-') . $key; if ($value === true || $value === false || $value === null) $parts[] = $value ? $key : ""; else foreach ((array)$value as $val) |