cvs: pecl /zip php_zip.c
| From: | Pierre-Alain Joye | Date: | Mon, 13 Mar 2006 01:48:21 +0000 |
| Subject: | cvs: pecl /zip php_zip.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5445@lists.php.net to get a copy of this message | ||
pajoye Mon Mar 13 01:48:21 2006 UTC
Modified files:
/pecl/zip php_zip.c
Log:
- return NULL if we found no fragment, no need to go further the URI is
incomplete anyway
http://cvs.php.net/viewcvs.cgi/pecl/zip/php_zip.c?r1=1.28&r2=1.29&diff_format=u
Index: pecl/zip/php_zip.c
diff -u pecl/zip/php_zip.c:1.28 pecl/zip/php_zip.c:1.29
--- pecl/zip/php_zip.c:1.28 Sun Mar 12 19:28:08 2006
+++ pecl/zip/php_zip.c Mon Mar 13 01:48:21 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.28 2006/03/12 19:28:08 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.29 2006/03/13 01:48:21 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -786,7 +786,7 @@
/* }}} */
#ifdef ZEND_ENGINE_2_1
-/* {{{ proto mixed open(string source)
+/* {{{ proto mixed open(string source [, int flags])
Create new zip using source uri for output */
ZIP_METHOD(zip, open)
{
@@ -794,11 +794,12 @@
char *filename;
int filename_len;
int err;
+ long flags = 0;
zval *this = getThis();
ze_zip_object *ze_obj = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename,
&filename_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename,
&filename_len, &flags) == FAILURE) {
WRONG_PARAM_COUNT;
return;
}
@@ -813,11 +814,7 @@
RETURN_FALSE;
}
- intern = zip_open(filename, ZIP_CREATE, &err);
-/*
-(gdb) print intern->cdir->comment
-$7 = 0xa7c690 "Zip archive comment"
-*/
+ intern = zip_open(filename, flags, &err);
if (!intern) {
RETURN_FALSE;
}
@@ -1332,7 +1329,7 @@
php_info_print_table_start();
{
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "$Id: php_zip.c,v 1.28 2006/03/12 19:28:08 pajoye Exp $",
"enabled");
+ php_info_print_table_row(2, "$Id: php_zip.c,v 1.29 2006/03/13 01:48:21 pajoye Exp $",
"enabled");
php_info_print_table_row(2, "Libzip version", "0.6.1");
}
php_info_print_table_end();