cellog Thu May 19 21:52:09 2005 EDT
Modified files:
/pear-core/PEAR/PackageFile v2.php
Log:
fix flattened filelist with global baseinstalldir
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2.php?r1=1.99&r2=1.100&ty=u
Index: pear-core/PEAR/PackageFile/v2.php
diff -u pear-core/PEAR/PackageFile/v2.php:1.99
pear-core/PEAR/PackageFile/v2.php:1.100
--- pear-core/PEAR/PackageFile/v2.php:1.99 Thu May 19 19:52:01 2005
+++ pear-core/PEAR/PackageFile/v2.php Thu May 19 21:52:07 2005
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@xxxxxxx>
* @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.99 2005/05/19 23:52:01 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.100 2005/05/20 01:52:07 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -514,7 +514,20 @@
}
$this->_packageInfo['contents']['dir']['file'] = $filelist;
unset($this->_packageInfo['contents']['dir']['dir']);
- } // else already flattened
+ } else {
+ // else already flattened but check for baseinstalldir propagation
+ if
(isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) {
+ if (isset($this->_packageInfo['contents']['dir']['file'][0])) {
+ foreach ($this->_packageInfo['contents']['dir']['file'] as
$i => $file) {
+
$this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir']
+ =
$this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
+ }
+ } else {
+
$this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir']
+ =
$this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
+ }
+ }
+ }
}
/**
|