From 4c125afc74a62173c36a43fb72d79f0ddb56e62c Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Tue, 9 Apr 2002 14:12:12 +0000 Subject: [PATCH] Make the dependencies check look for the correct registry file --- pear/PEAR/Dependency.php | 8 ++++---- pear/PEAR/Installer.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pear/PEAR/Dependency.php b/pear/PEAR/Dependency.php index c6af633f66..76327df0ef 100644 --- a/pear/PEAR/Dependency.php +++ b/pear/PEAR/Dependency.php @@ -29,7 +29,10 @@ require_once "PEAR.php"; class PEAR_Dependency { - + function PEAR_Dependency(&$registry) + { + $this->registry = &$registry; + } /** * This method maps the xml dependency definition to the * PEAR_dependecy one @@ -87,9 +90,6 @@ class PEAR_Dependency */ function checkPackage($name, $req = null, $relation = 'has') { - if (empty($this->registry)) { - $this->registry = new PEAR_Registry; - } if (!$this->registry->packageExists($name)) { return "'$name' PEAR package is not installed"; } diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 6f536c31e1..95e679c689 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -238,7 +238,7 @@ class PEAR_Installer extends PEAR_Common // - soft : fail silently // if (empty($this->registry)) { - $this->registry = new PEAR_Registry($this->config->get('php_dir')); + $this->registry = &new PEAR_Registry($this->config->get('php_dir')); } $oldcwd = getcwd(); $need_download = false; @@ -453,7 +453,7 @@ class PEAR_Installer extends PEAR_Common function checkDeps(&$pkginfo) { - $deps = new PEAR_Dependency; + $deps = &new PEAR_Dependency($this->registry); $errors = null; if (is_array($pkginfo['release_deps'])) { foreach($pkginfo['release_deps'] as $dep) { -- 2.50.1