From: Tomas V.V.Cox Date: Fri, 26 Jul 2002 11:48:55 +0000 (+0000) Subject: download package if force is set X-Git-Tag: dev~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fedba5422c76600726af07388969e1cf061a4b94;p=php download package if force is set --- diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index c37eddf40c..590c11f122 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -304,6 +304,7 @@ class PEAR_Installer extends PEAR_Common function install($pkgfile, $options = array()) { // recognized options: + // - force : force installation // - register-only : update registry but don't install files // - upgrade : upgrade existing install // - soft : fail silently @@ -315,7 +316,9 @@ class PEAR_Installer extends PEAR_Common $need_download = true; } elseif (!@is_file($pkgfile)) { if ($this->validPackageName($pkgfile)) { - if ($this->registry->packageExists($pkgfile) && empty($options['upgrade'])) { + if ($this->registry->packageExists($pkgfile) && + empty($options['upgrade']) && empty($options['force'])) + { return $this->raiseError("$pkgfile already installed"); } $pkgfile = $this->getPackageDownloadUrl($pkgfile);