Re: listing non-stable releases..

From: Date: Fri, 14 Jun 2002 13:20:37 +0000
Subject: Re: listing non-stable releases..
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7022@lists.php.net to get a copy of this message
FFF (Feel Free to Fix) :-) - Stig On Fri, 2002-06-14 at 04:50, Alan Knowles wrote: > ok, always better looking at this in the morning: - > this fixes sending args via xmlrpc in the installer.. > > > you also need to apply something similar to the bottom patch -just dont > use '$options' as it's already defined in that method... - so that you > can view 'all' packages.. > > Index: Remote.php > =================================================================== > RCS file: /repository/php4/pear/PEAR/Remote.php,v > retrieving revision 1.24 > diff -u -r1.24 Remote.php > --- Remote.php 26 May 2002 12:52:16 -0000 1.24 > +++ Remote.php 14 Jun 2002 02:49:02 -0000 > @@ -63,7 +63,9 @@ > $server_host = $this->config->get('master_server'); > $username = $this->config->get('username'); > $password = $this->config->get('password'); > - $f = new XML_RPC_Message($method, $this->_encode($args)); > + $eargs = array(); > + foreach($args as $arg) $eargs[] = $this->_encode($arg); > + $f = new XML_RPC_Message($method, $eargs); > $c = new XML_RPC_Client('/xmlrpc.php', $server_host, 80); > if ($username && $password) { > $c->setCredentials($username, $password); > > > > > > Alan Knowles wrote: > > > the patch doesnt help: the problem appears to be this. in > > PEAR/Remote.php call() > > > > $f = new XML_RPC_Message($method, $this->_encode($args)); > > $this->_encode() returns a Object :Type XML_RPC_value > > > > XML_RPC_Message() expects an array as it's second argument... > > > > just changing it to array($this->_encode($args))); doesnt help > > however.. - > > > > it sends this, and barfs due to XML error: junk after document element > > <?xml version="1.0"?> > > <methodCall> > > <methodName>package.listAll</methodName> > > <params> > > <param> > > <value><array> > > <data> > > <value><boolean>0</boolean></value> > > </data> > > </array></value> > > </param> > > </params> > > </methodCall> > > > > anyway this stuffs behond me for tonight :) > > > > regards > > alan > > > > > > > > Alan Knowles wrote: > > > >> slight change required to list non-stable releases. > >> > >> Index: Remote.php > >> =================================================================== > >> RCS file: /repository/php4/pear/PEAR/Command/Remote.php,v > >> retrieving revision 1.12.2.3 > >> diff -u -r1.12.2.3 Remote.php > >> --- Remote.php 1 Jun 2002 18:39:36 -0000 1.12.2.3 > >> +++ Remote.php 13 Jun 2002 10:19:58 -0000 > >> @@ -171,7 +171,10 @@ > >> { > >> $r = new PEAR_Remote($this->config); > >> $reg = new PEAR_Registry($this->config->get('php_dir')); > >> - $available = $r->call('package.listAll', true); > >> + $options = false; > >> + if ($this->config->get('preferred_state') == > >> 'stable') > >> + $options = true; > >> + $available = $r->call('package.listAll', $options); > >> if (PEAR::isError($available)) { > >> return $this->raiseError($available); > >> } > >> alan@alan:~/Pro > >> > >> > > > > > > > > > > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb

« previous php.pear.dev (#7022) next »