cvs: pear-core /PEAR/PackageFile/Generator v2.php

From: Date: Sun, 02 Oct 2005 05:32:58 +0000
Subject: cvs: pear-core /PEAR/PackageFile/Generator v2.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-35209@lists.php.net to get a copy of this message
cellog Sun Oct 2 01:32:58 2005 EDT Modified files: /pear-core/PEAR/PackageFile/Generator v2.php Log: fix serious issue with non-packaging xml generation: all tasks but replace are deleted http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Generator/v2.php?r1=1.30&r2=1.31&ty=u Index: pear-core/PEAR/PackageFile/Generator/v2.php diff -u pear-core/PEAR/PackageFile/Generator/v2.php:1.30 pear-core/PEAR/PackageFile/Generator/v2.php:1.31 --- pear-core/PEAR/PackageFile/Generator/v2.php:1.30 Sat Sep 24 23:48:59 2005 +++ pear-core/PEAR/PackageFile/Generator/v2.php Sun Oct 2 01:32:56 2005 @@ -16,7 +16,7 @@ * @author Stephan Schmidt (original XML_Serializer code) * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: v2.php,v 1.30 2005/09/25 03:48:59 cellog Exp $ + * @version CVS: $Id: v2.php,v 1.31 2005/10/02 05:32:56 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -377,14 +377,9 @@ } else { foreach ($list as $a) { $file = $a['attribs']['name']; - unset($a['attribs']['name']); $attributes = $a['attribs']; - if (isset($a[$this->_packagefile->getTasksNs() . ':replace'])) { - $repl = $a[$this->_packagefile->getTasksNs() . ':replace']; - } else { - $repl = null; - } - $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $repl); + unset($a['attribs']); + $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $a); } } $this->_formatDir($dirs); @@ -392,22 +387,22 @@ return $dirs; } - function _addDir(&$dirs, $dir, $file = null, $attributes = null, $replacements = null) + function _addDir(&$dirs, $dir, $file = null, $attributes = null, $tasks = null) { + if (!$tasks) { + $tasks = null; + } if ($dir == array() || $dir == array('.')) { + $dirs['file'][basename($file)] = $tasks; $attributes['name'] = basename($file); $dirs['file'][basename($file)]['attribs'] = $attributes; - if (isset($replacements)) { - $dirs['file'][basename($file)][$this->_packagefile->getTasksNs() . ':replace'] - = $replacements; - } return; } $curdir = array_shift($dir); if (!isset($dirs['dir'][$curdir])) { $dirs['dir'][$curdir] = array(); } - $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $replacements); + $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $tasks); } function _formatDir(&$dirs) @@ -890,7 +885,7 @@ // | Authors: Stephan Schmidt <schst@php-tools.net> | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.30 2005/09/25 03:48:59 cellog Exp $ +// $Id: v2.php,v 1.31 2005/10/02 05:32:56 cellog Exp $ /** * error code for invalid chars in XML name

« previous php.pear.cvs (#35209) next »