]> granicus.if.org Git - php/commitdiff
remote list and remote listall, can now list non-stable packages if you set prefered_...
authorAlan Knowles <alan_k@php.net>
Fri, 14 Jun 2002 15:03:29 +0000 (15:03 +0000)
committerAlan Knowles <alan_k@php.net>
Fri, 14 Jun 2002 15:03:29 +0000 (15:03 +0000)
pear/PEAR/Command/Remote.php

index 3ae167a25534b6ce82ac72962348c3a9ac26ca19..c92d6e36ccbcdeb88f401f43a3ab72e03ed73790 100644 (file)
@@ -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
+?>