helly Mon Dec 8 00:16:05 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/phar pharcommand.inc Log: - MFH Only show switch -y if available http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar/pharcommand.inc?r1=1.49.2.13&r2=1.49.2.14&diff_format=u Index: php-src/ext/phar/phar/pharcommand.inc diff -u php-src/ext/phar/phar/pharcommand.inc:1.49.2.13 php-src/ext/phar/phar/pharcommand.inc:1.49.2.14 --- php-src/ext/phar/phar/pharcommand.inc:1.49.2.13 Fri Oct 17 01:58:20 2008 +++ php-src/ext/phar/phar/pharcommand.inc Mon Dec 8 00:16:05 2008 @@ -139,7 +139,7 @@ 'y' => array( 'typ' => 'privkey', 'val' => NULL, - 'inf' => 'Private key for OpenSSL signing.', + 'inf' => '<key> Private key for OpenSSL signing.', ), ); @@ -157,6 +157,9 @@ $hash_optional = array('SHA-256' => 'SHA256', 'SHA-512' => 'SHA512', 'OpenSSL' => 'OpenSSL'); + if (!in_array('OpenSSL', $hash_avail)) { + unset($phar_args['y']); + } foreach($hash_optional as $key => $name) { if (in_array($key, $hash_avail)) { @@ -378,7 +381,7 @@ * @param string $arg The phar selection * @param string $cfg The config option. * @param string $key The key information. - * @return string $arg The selected algorithm + * @return string $arg The private key. */ static function cli_arg_typ_privkey($arg, $cfg, $key) { @@ -1552,7 +1555,7 @@ $use_ext = extension_loaded('phar'); $version = array( 'PHP Version' => phpversion(), - 'phar.phar version' => '$Revision: 1.49.2.13 $', + 'phar.phar version' => '$Revision: 1.49.2.14 $', 'Phar EXT version' => $use_ext ? phpversion('phar') : 'Not available', 'Phar API version' => Phar::apiVersion(), 'Phar-based phar archives' => true,
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php