diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -482,9 +482,10 @@ static function filter_keys($array, $keys, $p = array()) /** * Construct shell command using it::shell_command, log it, execute it and return output as string. - * Keywords {keyword} are replace a la ET(), {-opts} takes an array and - * inserts options a la it_html attributes (value, true, false or null) - * @param $cmd Format string with {keywords} replace a la ET() + * {keyword} quotes and inserts value from assoc array like ET() + * {0} .. {n} quotes and inserts positional arguments + * {-opts} takes an array and inserts options a la it_html attributes (value, true, false or null) + * @param $cmd Format string with {keywords} a la ET() * @param $values (zero, one or more arrays can be passed) * @return output of command. shell errors not detectable, see error_log in /www/server/logs */ @@ -517,12 +518,12 @@ static function shell_command(/* $cmd, $values1 = array(), ... */) # Merge values into one array foreach ($args as $arg) - $values += (array)$arg; + $values = array_merge($values, (array)$arg); #for escapeshellarg in it::_exec_quotevalue $oldlocale = setlocale(LC_CTYPE, 0); setlocale(LC_CTYPE, 'de_CH'); - foreach (it::match('({(-?)([a-z]\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(); |