cvs: pear-core /PEAR Config.php
| From: | Greg Beaver | Date: | Sun, 15 May 2005 02:36:21 +0000 |
| Subject: | cvs: pear-core /PEAR Config.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-31865@lists.php.net to get a copy of this message | ||
cellog Sat May 14 22:36:21 2005 EDT
Modified files:
/pear-core/PEAR Config.php
Log:
try again - if a channel has a mirror and preferred_mirror
is set to that mirror, but it is no longer valid, return the
parent channel instead
http://cvs.php.net/diff.php/pear-core/PEAR/Config.php?r1=1.107&r2=1.108&ty=u
Index: pear-core/PEAR/Config.php
diff -u pear-core/PEAR/Config.php:1.107 pear-core/PEAR/Config.php:1.108
--- pear-core/PEAR/Config.php:1.107 Sat May 14 22:19:17 2005
+++ pear-core/PEAR/Config.php Sat May 14 22:36:20 2005
@@ -16,7 +16,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: Config.php,v 1.107 2005/05/15 02:19:17 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.108 2005/05/15 02:36:20 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -1147,6 +1147,15 @@
return $this->_prependPath($test, $this->_installRoot);
}
}
+ if ($key == 'preferred_mirror') {
+ $reg = &$this->getRegistry();
+ if (is_object($reg)) {
+ $chan = &$reg->getChannel($channel);
+ if (!$chan->getMirror($test) && $chan->getName() !=
$test) {
+ return $channel; // mirror does not exist
+ }
+ }
+ }
return $test;
}
}
@@ -1159,6 +1168,15 @@
return $this->_prependPath($test, $this->_installRoot);
}
}
+ if ($key == 'preferred_mirror') {
+ $reg = &$this->getRegistry();
+ if (is_object($reg)) {
+ $chan = &$reg->getChannel($channel);
+ if (!$chan->getMirror($test) && $chan->getName() != $test) {
+ return $channel; // mirror does not exist
+ }
+ }
+ }
return $test;
}
return null;
@@ -1196,7 +1214,7 @@
$reg = &$this->getRegistry($layer);
if (is_object($reg)) {
$chan = &$reg->getChannel($channel);
- if (!$chan->getMirror($value) && $chan->getName() != $value) {
+ if (!$chan->getMirror($ret) && $chan->getName() != $ret) {
return $channel; // mirror does not exist
}
}