diff options
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r-- | ext/ftp/php_ftp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 2b91ed94cd..7a8b665b18 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -342,7 +342,7 @@ PHP_FUNCTION(ftp_nlist) } /* }}} */ -/* {{{ proto array ftp_rawlist(resource stream, string directory) +/* {{{ proto array ftp_rawlist(resource stream, string directory [, bool recursive]) Returns a detailed listing of a directory as an array of output lines */ PHP_FUNCTION(ftp_rawlist) { @@ -350,15 +350,16 @@ PHP_FUNCTION(ftp_rawlist) ftpbuf_t *ftp; char **llist, **ptr, *dir; int dir_len; + zend_bool recursive; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &z_ftp, &dir, &dir_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|b", &z_ftp, &dir, &dir_len, &recursive) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); /* get raw directory listing */ - if (NULL == (llist = ftp_list(ftp, dir))) { + if (NULL == (llist = ftp_list(ftp, dir, recursive))) { RETURN_FALSE; } |