From 76e83f576c59e173418d6eb3c34ac4c613ff0718 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sun, 30 Nov 2003 22:00:59 +0000 Subject: [PATCH] ...and with these changes, 100% BC is maintained. --- pear/PEAR/Installer-minus-download.php | 34 +++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Installer-minus-download.php b/pear/PEAR/Installer-minus-download.php index b966b51d7f..0d35691896 100644 --- a/pear/PEAR/Installer-minus-download.php +++ b/pear/PEAR/Installer-minus-download.php @@ -23,6 +23,7 @@ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; require_once 'PEAR/Dependency.php'; +require_once 'PEAR/Downloader.php'; require_once 'System.php'; define('PEAR_INSTALLER_OK', 1); @@ -43,8 +44,9 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2); * @since PHP 4.0.2 * @author Stig Bakken * @author Martin Jansen + * @author Greg Beaver */ -class PEAR_Installer extends PEAR_Common +class PEAR_Installer extends PEAR_Downloader { // {{{ properties @@ -552,6 +554,36 @@ class PEAR_Installer extends PEAR_Common return $path; } + // }}} + // {{{ download() + + /** + * Download any files and their dependencies, if necessary + * + * @param array a mixed list of package names, local files, or package.xml + * @param PEAR_Config + * @param array options from the command line + * @param array this is the array that will be populated with packages to + * install. Format of each entry: + * + * + * array('pkg' => 'package_name', 'file' => '/path/to/local/file', + * 'info' => array() // parsed package.xml + * ); + * + * @param array this will be populated with any error messages + * @param false private recursion variable + * @param false private recursion variable + * @param false private recursion variable + */ + function download($packages, $options, &$config, &$installpackages, + &$errors, $installed = false, $willinstall = false, $state = false) + { + // trickiness: initialize here + parent::PEAR_Downloader($this->ui, $options, $config); + return parent::download($packages); + } + // }}} // {{{ install() -- 2.40.0