]> granicus.if.org Git - php/commitdiff
* use switch/case for what it's worth :-)
authorStig Bakken <ssb@php.net>
Sat, 23 Mar 2002 10:20:41 +0000 (10:20 +0000)
committerStig Bakken <ssb@php.net>
Sat, 23 Mar 2002 10:20:41 +0000 (10:20 +0000)
pear/PEAR/Command/Install.php

index 3a8702bd929cf4b8c7139db05686e14d1d753397..40fa0a91da04935e9fe7fd11b8e28d0fdfe094f6 100644 (file)
@@ -62,7 +62,7 @@ class PEAR_Command_Install extends PEAR_Command_Common
 
     function run($command, $options, $params)
     {
-        $installer =new PEAR_Installer($this->config->get('php_dir'),
+        $installer = &new PEAR_Installer($this->config->get('php_dir'),
                                          $this->config->get('ext_dir'),
                                          $this->config->get('doc_dir'));
         $installer->debug = $this->config->get('verbose');
@@ -70,11 +70,10 @@ class PEAR_Command_Install extends PEAR_Command_Common
         $failmsg = '';
         $opts = array();
         switch ($command) {
-            case 'install':
             case 'upgrade': {
-                if ($command == 'upgrade') {
-                    $opts['upgrade'] = true;
-                }
+                $opts['upgrade'] = true;
+                // fall through
+            case 'install':
                 if (isset($options['f'])) {
                     $opts['force'] = true;
                 }