]> granicus.if.org Git - php/commitdiff
- Make compatible with PEAR/PHP_Archive CVS
authorMarcus Boerger <helly@php.net>
Mon, 28 May 2007 18:07:49 +0000 (18:07 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 28 May 2007 18:07:49 +0000 (18:07 +0000)
ext/phar/phar/phar.php
ext/phar/phar_object.c

index 3e384b217904560afb73e03be0982938074717c2..f19c9b7fee90aa26cd96c50b39e8987c2892cc27 100755 (executable)
@@ -41,7 +41,7 @@ function command_autoload($classname)
     command_include(strtolower($classname) . '.inc');
 }
 
-Phar::loadPhar(__FILE__);
+Phar::mapPhar();
 
 spl_autoload_register('command_autoload');
 
index 135b4549b0a2705dfcdbf6d9c18a68840d5723f2..1cf3793949ec147ab37e6f53f300ba8efa0ce282 100755 (executable)
@@ -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;
        }