cvs: php4 /pear/PEAR Common.php
| From: | Thomas V.V.Cox | Date: | Mon, 17 Dec 2001 21:10:11 +0000 |
| Subject: | cvs: php4 /pear/PEAR Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1597@lists.php.net to get a copy of this message | ||
cox Mon Dec 17 16:10:11 2001 EDT
Modified files:
/php4/pear/PEAR Common.php
Log:
ensure correct package names and versions in the xml parser
Index: php4/pear/PEAR/Common.php
diff -u php4/pear/PEAR/Common.php:1.25 php4/pear/PEAR/Common.php:1.26
--- php4/pear/PEAR/Common.php:1.25 Sun Dec 16 11:21:35 2001
+++ php4/pear/PEAR/Common.php Mon Dec 17 16:10:11 2001
@@ -18,7 +18,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.25 2001/12/16 16:21:35 cox Exp $
+// $Id: Common.php,v 1.26 2001/12/17 21:10:11 cox Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -262,7 +262,7 @@
case 'name':
switch ($this->prev_element) {
case 'package':
- $this->pkginfo['package'] = $data;
+ $this->pkginfo['package'] =
ereg_replace('[^a-zA-Z0-9._]', '_', trim($data));
break;
case 'maintainer':
$this->current_maintainer['name'] = $data;
@@ -286,6 +286,7 @@
}
break;
case 'version':
+ $data = ereg_replace ('[^a-zA-Z0-9._\-]', '_', trim($data));
if ($this->in_changelog) {
$this->current_release['version'] = $data;
} else {