cvs: pecl /phar phar.c
| From: | Greg Beaver | Date: | Sun, 23 Mar 2008 06:59:58 +0000 |
| Subject: | cvs: pecl /phar phar.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10027@lists.php.net to get a copy of this message | ||
cellog Sun Mar 23 06:59:58 2008 UTC
Modified files:
/pecl/phar phar.c
Log:
don't disallow opening .tar/.zip files as Phar object if readonly is disabled, the whole idea
is to be able to
add crap including an automatic stub or explicit stub
http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.320&r2=1.321&diff_format=u
Index: pecl/phar/phar.c
diff -u pecl/phar/phar.c:1.320 pecl/phar/phar.c:1.321
--- pecl/phar/phar.c:1.320 Sun Mar 23 05:39:57 2008
+++ pecl/phar/phar.c Sun Mar 23 06:59:58 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar.c,v 1.320 2008/03/23 05:39:57 cellog Exp $ */
+/* $Id: phar.c,v 1.321 2008/03/23 06:59:58 cellog Exp $ */
#define PHAR_MAIN 1
#include "phar_internal.h"
@@ -423,7 +423,7 @@
if (!is_data) {
/* prevent any ".phar" without a stub getting through */
if (!phar->halt_offset && !phar->is_brandnew) {
- if (FAILURE == zend_hash_find(&(phar->manifest), ".phar/stub.php",
sizeof(".phar/stub.php")-1, (void **)&stub)) {
+ if (PHAR_G(readonly) && FAILURE == zend_hash_find(&(phar->manifest),
".phar/stub.php", sizeof(".phar/stub.php")-1, (void **)&stub)) {
spprintf(error, 0, "'%s' is not a phar archive. Use PharData::__construct() for
a standard zip or tar archive", fname);
return FAILURE;
}
@@ -2827,7 +2827,7 @@
php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
- php_info_print_table_row(2, "CVS revision", "$Revision: 1.320 $");
+ php_info_print_table_row(2, "CVS revision", "$Revision: 1.321 $");
php_info_print_table_row(2, "Phar-based phar archives", "enabled");
php_info_print_table_row(2, "Tar-based phar archives", "enabled");
php_info_print_table_row(2, "ZIP-based phar archives", "enabled");