00001 <?php
00002
00003 class Varien_Pear_Registry extends PEAR_Registry
00004 {
00005 function _initializeDepDB()
00006 {
00007 if (!isset($this->_dependencyDB)) {
00008 static $initializing = false;
00009 if (!$initializing) {
00010 $initializing = true;
00011 if (!$this->_config) {
00012 if (OS_WINDOWS) {
00013 $file = 'pear.ini';
00014 } else {
00015 $file = '.pearrc';
00016 }
00017 $this->_config = &new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR .
00018 $file, '-');
00019 $this->_config->setRegistry($this);
00020 $this->_config->set('php_dir', $this->install_dir);
00021 }
00022 $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
00023 if (PEAR::isError($this->_dependencyDB)) {
00024
00025 if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') .
00026 DIRECTORY_SEPARATOR . '.depdb')) {
00027 @unlink($this->_config->get('php_dir', null, 'pear.php.net') .
00028 DIRECTORY_SEPARATOR . '.depdb');
00029 }
00030 $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
00031 if (PEAR::isError($this->_dependencyDB)) {
00032 echo $this->_dependencyDB->getMessage();
00033 echo 'Unrecoverable error';
00034 exit(1);
00035 }
00036 }
00037 $initializing = false;
00038 }
00039 }
00040 }
00041 }