X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fpear%2FPEAR%2FPackageFile%2Fv2.php;h=ae0a1fa891ccdca97486b7b2c365faad1e15ba68;hb=817c14c6c2098d85ef912fb95898c857bf533b4f;hp=1ca412dc8cdb74781d7575e67fe00480864a57f1;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/v2.php b/WEB-INF/lib/pear/PEAR/PackageFile/v2.php index 1ca412dc..ae0a1fa8 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/v2.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/v2.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -23,7 +22,7 @@ require_once 'PEAR/ErrorStack.php'; * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -129,12 +128,21 @@ class PEAR_PackageFile_v2 /** * The constructor merely sets up the private error stack */ - function PEAR_PackageFile_v2() + function __construct() { $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null); $this->_isValid = false; } + /** + * PHP 4 style constructor for backwards compatibility. + * Used by PEAR_PackageFileManager2 + */ + public function PEAR_PackageFile_v2() + { + $this->__construct(); + } + /** * To make unit-testing easier * @param PEAR_Frontend_* @@ -145,7 +153,7 @@ class PEAR_PackageFile_v2 */ function &getPEARDownloader(&$i, $o, &$c) { - $z = &new PEAR_Downloader($i, $o, $c); + $z = new PEAR_Downloader($i, $o, $c); return $z; } @@ -163,7 +171,7 @@ class PEAR_PackageFile_v2 if (!class_exists('PEAR_Dependency2')) { require_once 'PEAR/Dependency2.php'; } - $z = &new PEAR_Dependency2($c, $o, $p, $s); + $z = new PEAR_Dependency2($c, $o, $p, $s); return $z; } @@ -564,7 +572,7 @@ class PEAR_PackageFile_v2 $atts = $filelist[$name]; foreach ($tasks as $tag => $raw) { $task = $this->getTask($tag); - $task = &new $task($this->_config, $common, PEAR_TASK_INSTALL); + $task = new $task($this->_config, $common, PEAR_TASK_INSTALL); if ($task->isScript()) { $ret[] = $filelist[$name]['installed_as']; } @@ -610,7 +618,7 @@ class PEAR_PackageFile_v2 $atts = $filelist[$name]; foreach ($tasks as $tag => $raw) { $taskname = $this->getTask($tag); - $task = &new $taskname($this->_config, $common, PEAR_TASK_INSTALL); + $task = new $taskname($this->_config, $common, PEAR_TASK_INSTALL); if (!$task->isScript()) { continue; // scripts are only handled after installation } @@ -1177,6 +1185,9 @@ class PEAR_PackageFile_v2 $contents['dir']['file'] = array($contents['dir']['file']); } foreach ($contents['dir']['file'] as $file) { + if (!isset($file['attribs']['name'])) { + continue; + } $name = $file['attribs']['name']; if (!$preserve) { $file = $file['attribs']; @@ -1854,7 +1865,7 @@ class PEAR_PackageFile_v2 return implode('', file($file)); } } else { // tgz - $tar = &new Archive_Tar($this->_archiveFile); + $tar = new Archive_Tar($this->_archiveFile); $tar->pushErrorHandling(PEAR_ERROR_RETURN); if ($file != 'package.xml' && $file != 'package2.xml') { $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; @@ -1893,7 +1904,7 @@ class PEAR_PackageFile_v2 if (!class_exists('PEAR_PackageFile_Generator_v2')) { require_once 'PEAR/PackageFile/Generator/v2.php'; } - $a = &new PEAR_PackageFile_Generator_v2($this); + $a = new PEAR_PackageFile_Generator_v2($this); return $a; }