cvs: pear-core /PEAR/Downloader Package.php

From: Date: Mon, 27 Mar 2006 05:05:42 +0000
Subject: cvs: pear-core /PEAR/Downloader Package.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4676@lists.php.net to get a copy of this message
cellog Mon Mar 27 05:05:42 2006 UTC Modified files: /pear-core/PEAR/Downloader Package.php Log: remove as many @ as possible from PEAR/Downloader/Package.php http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Downloader/Package.php?r1=1.92&r2=1.93&diff_format=u Index: pear-core/PEAR/Downloader/Package.php diff -u pear-core/PEAR/Downloader/Package.php:1.92 pear-core/PEAR/Downloader/Package.php:1.93 --- pear-core/PEAR/Downloader/Package.php:1.92 Sun Mar 26 22:07:56 2006 +++ pear-core/PEAR/Downloader/Package.php Mon Mar 27 05:05:42 2006 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Package.php,v 1.92 2006/03/26 22:07:56 cellog Exp $ + * @version CVS: $Id: Package.php,v 1.93 2006/03/27 05:05:42 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -453,7 +453,9 @@ } if (!($ret = $this->_detect2Dep($dep, $pname, 'optional', $params))) { $dep['package'] = $dep['name']; - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -682,7 +684,9 @@ $this->_registry->parsedPackageNameToString($dep, true) . '", already installed as version ' . $obj->getVersion()); } - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -759,7 +763,9 @@ $this->_registry->parsedPackageNameToString($dep, true) . '", already installed as version ' . $version); } - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -1332,37 +1338,39 @@ */ function _fromFile(&$param) { - if (is_string($param) && !@is_file($param)) { - $test = explode('#', $param); - $group = array_pop($test); - if (@is_file(implode('#', $test))) { - $this->setGroup($group); - $param = implode('#', $test); - $this->_explicitGroup = true; - } - } - if (@is_file($param)) { - $this->_type = 'local'; - $options = $this->_downloader->getOptions(); - if (isset($options['downloadonly'])) { - $pkg = &$this->getPackagefileObject($this->_config, - $this->_downloader->_debug); - } else { - $pkg = &$this->getPackagefileObject($this->_config, - $this->_downloader->_debug, $this->_downloader->getDownloadDir()); - } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); - PEAR::popErrorHandling(); - if (PEAR::isError($pf)) { - $this->_valid = false; - return $pf; + if (is_string($param)) { + if (!file_exists($param)) { + $test = explode('#', $param); + $group = array_pop($test); + if (file_exists(implode('#', $test))) { + $this->setGroup($group); + $param = implode('#', $test); + $this->_explicitGroup = true; + } } - $this->_packagefile = &$pf; - if (!$this->getGroup()) { - $this->setGroup('default'); // install the default dependency group + if (is_file($param)) { + $this->_type = 'local'; + $options = $this->_downloader->getOptions(); + if (isset($options['downloadonly'])) { + $pkg = &$this->getPackagefileObject($this->_config, + $this->_downloader->_debug); + } else { + $pkg = &$this->getPackagefileObject($this->_config, + $this->_downloader->_debug, $this->_downloader->getDownloadDir()); + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); + PEAR::popErrorHandling(); + if (PEAR::isError($pf)) { + $this->_valid = false; + return $pf; + } + $this->_packagefile = &$pf; + if (!$this->getGroup()) { + $this->setGroup('default'); // install the default dependency group + } + return $this->_valid = true; } - return $this->_valid = true; } return $this->_valid = false; }

« previous php.pear.core (#4676) next »