cvs: pear-core /PEAR ChannelFile.php

From: Date: Mon, 23 May 2005 02:06:46 +0000
Subject: cvs: pear-core /PEAR ChannelFile.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-32019@lists.php.net to get a copy of this message
cellog Sun May 22 22:06:46 2005 EDT Modified files: /pear-core/PEAR ChannelFile.php Log: fix problems found in unit testing http://cvs.php.net/diff.php/pear-core/PEAR/ChannelFile.php?r1=1.63&r2=1.64&ty=u Index: pear-core/PEAR/ChannelFile.php diff -u pear-core/PEAR/ChannelFile.php:1.63 pear-core/PEAR/ChannelFile.php:1.64 --- pear-core/PEAR/ChannelFile.php:1.63 Sat May 14 22:29:59 2005 +++ pear-core/PEAR/ChannelFile.php Sun May 22 22:06:46 2005 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ChannelFile.php,v 1.63 2005/05/15 02:29:59 cellog Exp $ + * @version CVS: $Id: ChannelFile.php,v 1.64 2005/05/23 02:06:46 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -666,14 +666,15 @@ } } if (isset($info['servers']['primary']['attribs']['port']) && - !is_int($info['servers']['primary']['attribs']['host'])) { + !is_numeric($info['servers']['primary']['attribs']['port'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_PORT, - array('port' => $info['port'])); + array('port' => $info['servers']['primary']['attribs']['port'])); } if (isset($info['servers']['primary']['attribs']['ssl']) && $info['servers']['primary']['attribs']['ssl'] != 'yes') { $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL, - array('ssl' => $info['ssl'], 'server' => $info['name'])); + array('ssl' => $info['servers']['primary']['attribs']['ssl'], + 'server' => $info['name'])); } if (isset($info['servers']['primary']['xmlrpc']) && @@ -881,6 +882,8 @@ } else { return $protocol . '.php'; } + } elseif (isset($this->_channelInfo['servers']['primary'][$protocol]['attribs']['path'])) { + return $this->_channelInfo['servers']['primary'][$protocol]['attribs']['path']; } return $protocol . '.php'; } @@ -1085,9 +1088,6 @@ $this->addFunction('xmlrpc', '1.1', 'package.getDepDownloadURL', $mirror); $this->addFunction('xmlrpc', '1.0', 'package.search', $mirror); $this->addFunction('xmlrpc', '1.0', 'channel.listAll', $mirror); -// $this->setBaseURL('package', 'rest/1.0/package'); -// $this->setBaseURL('category', 'rest/1.0/category'); -// $this->setBaseURL('maintainer', 'rest/1.0/maintainer'); return true; break; default : @@ -1496,6 +1496,12 @@ return false; // the __uri channel cannot have mirrors by definition } $set = array('attribs' => array('host' => $server)); + if (is_numeric($port)) { + $set['attribs']['port'] = $port; + } + if ($path) { + $set['attribs']['path'] = $path; + } if (!isset($this->_channelInfo['servers']['mirror'])) { $this->_channelInfo['servers']['mirror'] = $set; return true;

« previous php.pear.cvs (#32019) next »