summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian A. Weber2014-01-14 19:32:29 +0100
committerChristian A. Weber2014-01-14 19:32:29 +0100
commit9b8e46bbd41563bdf6e0f6585f65b49dc6fd2ecc (patch)
treea06a26c6fb7258907bc4203e97056ae4cfa52552 /it.class
parentc0deca74b45a7f75f73b11e61fe5c236f0ed2d4c (diff)
downloaditools-9b8e46bbd41563bdf6e0f6585f65b49dc6fd2ecc.tar.gz
itools-9b8e46bbd41563bdf6e0f6585f65b49dc6fd2ecc.tar.bz2
itools-9b8e46bbd41563bdf6e0f6585f65b49dc6fd2ecc.zip
support varargs and arrays in it::cdist()
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 4 insertions, 1 deletions
diff --git a/it.class b/it.class
index c09a235..bd024a2 100644
--- a/it.class
+++ b/it.class
@@ -633,7 +633,10 @@ static function cexec(/* $cmd, $values1 = array(), ... */)
*/
static function cdist(/* $file1, ... */)
{
- return it::exec('cdist {FILES}', 'FILES' => func_get_args());
+ foreach (func_get_args() as $arg)
+ $files = array_merge((array)$files, (array)$arg);
+
+ return it::exec('cdist {FILES}', 'FILES' => $files);
}