cvs: php4 /pear/PEAR Common.php
| From: | Tomas V.V.Cox | Date: | Fri, 07 Jun 2002 10:19:00 +0000 |
| Subject: | cvs: php4 /pear/PEAR Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4476@lists.php.net to get a copy of this message | ||
cox Fri Jun 7 06:19:00 2002 EDT
Modified files:
/php4/pear/PEAR Common.php
Log:
Fix some minor issues with the parsing
Index: php4/pear/PEAR/Common.php
diff -u php4/pear/PEAR/Common.php:1.69 php4/pear/PEAR/Common.php:1.70
--- php4/pear/PEAR/Common.php:1.69 Thu Jun 6 06:16:42 2002
+++ php4/pear/PEAR/Common.php Fri Jun 7 06:18:59 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.69 2002/06/06 10:16:42 ssb Exp $
+// $Id: Common.php,v 1.70 2002/06/07 10:18:59 cox Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -445,7 +445,7 @@
case 'dep':
// dependencies array index
if (!$this->in_changelog) {
- $this->d_i = (isset($this->d_i)) ? $this->d_i + 1 : 0;
+ $this->d_i++;
$this->pkginfo['release_deps'][$this->d_i] = $attribs;
}
break;
@@ -546,7 +546,8 @@
$this->lib_sources[] = $data;
break;
case 'dep':
- if ($data = trim($data)) {
+ if ($data && !$this->in_changelog) {
+ echo "D:: $data\n";
$this->pkginfo['release_deps'][$this->d_i]['name'] =
$data;
}
break;
@@ -633,6 +634,7 @@
array_pop($this->element_stack);
$spos = sizeof($this->element_stack) - 1;
$this->current_element = ($spos > 0) ? $this->element_stack[$spos] : '';
+ $this->cdata = '';
}
// }}}
@@ -759,6 +761,8 @@
$this->filelist =& $this->pkginfo['filelist'];
$this->dir_names = array();
$this->in_changelog = false;
+ $this->d_i = 0;
+ $this->cdata = '';
if (!xml_parse($xp, $data, 1)) {
$code = xml_get_error_code($xp);