]> granicus.if.org Git - php/commitdiff
- Make alias optioal and return it in info command
authorMarcus Boerger <helly@php.net>
Fri, 18 May 2007 17:49:16 +0000 (17:49 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 18 May 2007 17:49:16 +0000 (17:49 +0000)
ext/phar/phar/pharcommand.inc

index f8ab8eebf9532288634c52138e682c79332f18e6..325e23d0dd6cfdf2cf9fdbf3005f459a49bbc06e 100755 (executable)
@@ -31,7 +31,7 @@ class PharCommand extends CLICommand
                $phar_args = array(
                        'a' => array(
                 'typ' => 'alias',  
-                'val' => 'newphar'
+                'val' => NULL
                 'inf' => '<alias>  Provide an alias name for the phar file.'
             ),
                        'c' => array(
@@ -218,7 +218,7 @@ class PharCommand extends CLICommand
 
        static function cli_cmd_arg_pack()
        {
-               $args = self::phar_args('AcFhipsx', 'pharnew');
+               $args = self::phar_args('acFhipsx', 'pharnew');
                $args[''] = array('typ'=>'any',     'val'=>NULL,      'required'=>1, 'inf'=>'         Any number of input files and directories. If -i is in use then ONLY files and matching thegiven regular expression are being packed. If -x is given then files matching that regular expression are NOT being packed.');
                return $args;
        }
@@ -784,6 +784,11 @@ class PharCommand extends CLICommand
                $hash  = $phar->getsignature();
                $infos = array();
 
+               if ($phar->getAlias())
+               {
+                       $infos['Alias'] = $phar->getAlias();
+               }
+
                if (!$hash)
                {
                        $infos['Hash-type'] = 'NONE';