From d26e1e4e8aeb4fa52a431257394b522ba2d7ada0 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Fri, 23 Nov 2007 04:47:38 +0000 Subject: fully fix phar.phar so that - 'No Metadata' is displayed on meta-get if there ain't none - '|-' is displayed for tree command if no sub-directories are present --- ext/phar/package.xml | 47 ++++++++++++++++++++++++++++++------------ ext/phar/phar.phar | Bin 14106 -> 14155 bytes ext/phar/phar/pharcommand.inc | 14 +++++++++---- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/ext/phar/package.xml b/ext/phar/package.xml index c1d2e5a869..6b9f3a9036 100644 --- a/ext/phar/package.xml +++ b/ext/phar/package.xml @@ -29,10 +29,10 @@ avaiable then SHA-256 and SHA-512 signatures are supported as well.helly@php.net yes - 2007-10-03 - + 2007-11-22 + - 1.2.2 + 1.2.3 1.1.0 @@ -42,10 +42,12 @@ avaiable then SHA-256 and SHA-512 signatures are supported as well.PHP License - * fix to work with PHP 5.3 - * fix Bug #12124: Phar object cannot be iterated over - * remove unused variables - * fix jit file open sprintf calls + * fix creation of Phar object with relative path: + $a = new Phar('blah.phar'); + * fix creation and read of Phar objects on Windows, manage + windows path separators (on windows only) + * fix Bug #12492: filenew incorrectly creates file path [urkle] + * fix Bug #12493: extract throws an error and won't open the file [urkle] @@ -162,6 +164,7 @@ avaiable then SHA-256 and SHA-512 signatures are supported as well. + @@ -214,24 +217,42 @@ avaiable then SHA-256 and SHA-512 signatures are supported as well. - 1.2.2 + 1.2.3 1.1.0 stable stable - 2007-10-03 + 2007-11-22 PHP License - * fix to work with PHP 5.3 - * fix Bug #12124: Phar object cannot be iterated over - * remove unused variables - * fix jit file open sprintf calls + * fix creation of Phar object with relative path: + $a = new Phar('blah.phar'); + * fix creation and read of Phar objects on Windows, manage + windows path separators (on windows only) + * fix Bug #12492: filenew incorrectly creates file path [urkle] + * fix Bug #12493: extract throws an error and won't open the file [urkle] + + + 1.2.2 + 1.1.0 + + + stable + stable + + 2007-10-03 + PHP License + * fix to work with PHP 5.3 +* fix Bug #12124: Phar object cannot be iterated over +* remove unused variables +* fix jit file open sprintf calls + 1.2.1 diff --git a/ext/phar/phar.phar b/ext/phar/phar.phar index c47709eb18..6a60d65d86 100755 Binary files a/ext/phar/phar.phar and b/ext/phar/phar.phar differ diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index 26dbc33853..7c9bcf5e17 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -612,9 +612,12 @@ class PharCommand extends CLICommand $dir = new InvertedRegexIterator($dir, $invregex); } + $any = false; foreach($dir as $pn => $f) { + $any = true; call_user_func($func, $pn, $f, $args); } + return $any; } // {{{ static function cli_cmd_inf_list /** @@ -687,11 +690,14 @@ class PharCommand extends CLICommand */ public function cli_cmd_run_tree() { - $this->phar_dir_operation( + $a = $this->phar_dir_operation( new DirectoryGraphIterator( $this->args['f']['val']), array($this, 'phar_dir_echo') ); + if (!$a) { + echo "|-\n"; + } } // }}} // {{{ cli_cmd_inf_extract @@ -1192,13 +1198,13 @@ class PharCommand extends CLICommand if (isset($entry)) { if (!$phar[$entry]->hasMetadata()) { - echo 'No Metadata'; + echo "No Metadata\n"; exit(1); } echo serialize($phar[$entry]->getMetadata()); } else { if (!$phar->hasMetadata()) { - echo 'No Metadata'; + echo "No Metadata\n"; exit(1); } $meta = $phar->getMetadata(); @@ -1210,7 +1216,7 @@ class PharCommand extends CLICommand echo $meta[$index]; exit(0); } else { - echo 'No Metadata'; + echo "No Metadata\n"; exit(1); } } else { -- cgit v1.2.1