From: Alan Knowles Date: Fri, 14 Jun 2002 15:03:29 +0000 (+0000) Subject: remote list and remote listall, can now list non-stable packages if you set prefered_... X-Git-Tag: php5_5_0~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f1531b1632ba3408ade5400ec46843cb312c0fb;p=php remote list and remote listall, can now list non-stable packages if you set prefered_state to something else --- diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index 3ae167a255..c92d6e36cc 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -135,7 +135,10 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.', function doRemoteList($command, $options, $params) { $r = new PEAR_Remote($this->config); - $available = $r->call('package.listAll', true); + $list_options = false; + if ($this->config->get('preferred_state') == 'stable') + $list_options = true; + $available = $r->call('package.listAll', $list_options); if (PEAR::isError($available)) { return $this->raiseError($available); } @@ -162,7 +165,10 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.', { $r = new PEAR_Remote($this->config); $reg = new PEAR_Registry($this->config->get('php_dir')); - $available = $r->call('package.listAll', true); + $list_options = false; + if ($this->config->get('preferred_state') == 'stable') + $list_options = true; + $available = $r->call('package.listAll', $list_options); if (PEAR::isError($available)) { return $this->raiseError($available); } @@ -345,4 +351,4 @@ version of DB is 1.2, the downloaded file will be DB-1.2.tgz.', // }}} } -?> \ No newline at end of file +?>