From: Marcus Boerger Date: Mon, 28 May 2007 18:07:49 +0000 (+0000) Subject: - Make compatible with PEAR/PHP_Archive CVS X-Git-Tag: RELEASE_1_4~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=511bd55758adfa1437e7e69268bf73c874feb744;p=php - Make compatible with PEAR/PHP_Archive CVS --- diff --git a/ext/phar/phar/phar.php b/ext/phar/phar/phar.php index 3e384b2179..f19c9b7fee 100755 --- a/ext/phar/phar/phar.php +++ b/ext/phar/phar/phar.php @@ -41,7 +41,7 @@ function command_autoload($classname) command_include(strtolower($classname) . '.inc'); } -Phar::loadPhar(__FILE__); +Phar::mapPhar(); spl_autoload_register('command_autoload'); diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 135b4549b0..1cf3793949 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -50,13 +50,14 @@ PHP_METHOD(Phar, getExtractList) } /* }}} */ -/* {{{ proto mixed Phar::mapPhar([string alias]) +/* {{{ proto mixed Phar::mapPhar([string alias, [int dataoffset]]) * Reads the currently executed file (a phar) and registers its manifest */ PHP_METHOD(Phar, mapPhar) { char *fname, *alias = NULL, *error, *plain_map; int fname_len, alias_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!", &alias, &alias_len) == FAILURE) { + long dataoffset; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!l", &alias, &alias_len, &dataoffset) == FAILURE) { return; }