]> granicus.if.org Git - php/commitdiff
MFH
authorStig Bakken <ssb@php.net>
Mon, 25 Nov 2002 23:52:56 +0000 (23:52 +0000)
committerStig Bakken <ssb@php.net>
Mon, 25 Nov 2002 23:52:56 +0000 (23:52 +0000)
pear/PEAR/Command/Common.php
pear/PEAR/Command/Config.php
pear/PEAR/Command/Package.php
pear/PEAR/Command/Remote.php
pear/PEAR/Frontend/CLI.php
pear/PEAR/Remote.php

index 16953d06b466704e4d9176a7877bf011ee9045d8..51305e233a053555e6c86e93f96891855b91b45a 100644 (file)
@@ -208,9 +208,9 @@ class PEAR_Command_Common extends PEAR
                 }
                 if (isset($v['shortopt'])) {
                     $s = $v['shortopt'];
-                    $help .= "  -$s$sapp, --$k$lapp\n";
+                    @$help .= "  -$s$sapp, --$k$lapp\n";
                 } else {
-                    $help .= "  --$k$lapp\n";
+                    @$help .= "  --$k$lapp\n";
                 }
                 $p = "        ";
                 $doc = rtrim(str_replace("\n", "\n$p", $v['doc']));
index 85304fdcaefcfcbcee37cabc125e4da617b473ed..f204d415b02e9ef4004ebd201b24a22e2758baeb 100644 (file)
@@ -46,7 +46,8 @@ configuration layers are "user", "system" and "default".
             'function' => 'doConfigGet',
             'shortcut' => 'cg',
             'options' => array(),
-            'doc' => 'Displays the value of one configuration parameter.  The
+            'doc' => '<parameter> [layer]
+Displays the value of one configuration parameter.  The
 first argument is the name of the parameter, an optional second argument
 may be used to tell which configuration layer to look in.  Valid configuration
 layers are "user", "system" and "default".  If no layer is specified, a value
@@ -59,12 +60,13 @@ just specified.
             'function' => 'doConfigSet',
             'shortcut' => 'cs',
             'options' => array(),
-            'doc' => 'Sets the value of one configuration parameter.  The first
-argument is the name of the parameter, the second argument is the new value.
-Some parameters are be subject to validation, and the command will fail with
-an error message if the new value does not make sense.  An optional third
-argument may be used to specify which layer to set the configuration parameter
-in.  The default layer is "user".
+            'doc' => '<parameter> <value> [layer]
+Sets the value of one configuration parameter.  The first argument is
+the name of the parameter, the second argument is the new value.  Some
+parameters are subject to validation, and the command will fail with
+an error message if the new value does not make sense.  An optional
+third argument may be used to specify in which layer to set the
+configuration parameter.  The default layer is "user".
 ',
             ),
         'config-help' => array(
@@ -198,4 +200,4 @@ displays help for all configuration parameters.
 
 }
 
-?>
\ No newline at end of file
+?>
index 49b0d92328a0c823020cb834bb5f90200cacc3f1..f82bff2c34b1ff5e5fe43485f345c4f9bdc12dc4 100644 (file)
@@ -107,7 +107,7 @@ List all depencies the package has.'
 Signs a package distribution (.tar or .tgz) file with GnuPG.',
             ),
         'makerpm' => array(
-            'summary' => 'Builds an RPM package from a PEAR package',
+            'summary' => 'Builds an RPM spec file from a PEAR package',
             'function' => 'doMakeRPM',
             'shortcut' => 'rpm',
             'options' => array(
index 0e6e94d11d776dcd911d8cfd18cbacf7962666aa..1af8902cf211ee6476e3fe35e8f9608f896caeea 100644 (file)
@@ -170,6 +170,9 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
         if (PEAR::isError($available)) {
             return $this->raiseError($available);
         }
+        if (!is_array($available)) {
+            return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "'.$available.'")');
+        }
         $data = array(
             'caption' => 'All packages:',
             'border' => true,
index 80a47507ca5d6fe1b90de24b6139506b503472da..f9a28b99dc2c49b948a284282ad689eab456a5f4 100644 (file)
@@ -397,7 +397,7 @@ class PEAR_Frontend_CLI extends PEAR
                 break;
             case 'config-show':
                 $data['border'] = true;
-                $opts = array(0 => array('wrap' => 20),
+                $opts = array(0 => array('wrap' => 30),
                               1 => array('wrap' => 20),
                               2 => array('wrap' => 35));
                 $this->_startTable($data);
index 0d1a11556c33b0e59a8b5a599160a88382add52f..d7b6e70e5260ef39c16f93b984afec486650990a 100644 (file)
@@ -114,7 +114,9 @@ class PEAR_Remote extends PEAR
         
         if (extension_loaded("xmlrpc")) {
             $result = call_user_func_array(array(&$this, 'call_epi'), $args);
-            $this->saveCache($_args, $result);
+            if (!PEAR::isError($result)) {
+                $this->saveCache($_args, $result);
+            };
             return $result;
         }
         if (!@include_once("XML/RPC.php")) {