cvs: pear-core /PEAR Config.php
| From: | Greg Beaver | Date: | Mon, 21 Feb 2005 01:32:51 +0000 |
| Subject: | cvs: pear-core /PEAR Config.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-29589@lists.php.net to get a copy of this message | ||
cellog Sun Feb 20 20:32:51 2005 EDT
Modified files:
/pear-core/PEAR Config.php
Log:
don't try to initialize the default registry unless neither
system nor user config files exist
http://cvs.php.net/diff.php/pear-core/PEAR/Config.php?r1=1.96&r2=1.97&ty=u
Index: pear-core/PEAR/Config.php
diff -u pear-core/PEAR/Config.php:1.96 pear-core/PEAR/Config.php:1.97
--- pear-core/PEAR/Config.php:1.96 Sun Feb 20 20:15:37 2005
+++ pear-core/PEAR/Config.php Sun Feb 20 20:32:51 2005
@@ -17,7 +17,7 @@
// | Greg Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Config.php,v 1.96 2005/02/21 01:15:37 cellog Exp $
+// $Id: Config.php,v 1.97 2005/02/21 01:32:51 cellog Exp $
require_once 'PEAR.php';
require_once 'PEAR/Registry.php';
@@ -1300,6 +1300,11 @@
continue;
}
if (!$this->_regInitialized[$layer]) {
+ if ($layer == 'default' &&
isset($this->_registry['user']) ||
+ isset($this->_registry['system'])) {
+ // only use the default registry if there are no alternatives
+ continue;
+ }
if (!is_object($this->_registry[$layer])) {
if ($phpdir = $this->get('php_dir', $layer,
'pear.php.net')) {
$this->_registry[$layer] = &new PEAR_Registry($phpdir);