cvs: pear-core /PEAR/PackageFile/Parser v1.php v2.php
| From: | Greg Beaver | Date: | Thu, 28 Oct 2004 23:53:29 +0000 |
| Subject: | cvs: pear-core /PEAR/PackageFile/Parser v1.php v2.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-1188@lists.php.net to get a copy of this message | ||
cellog Thu Oct 28 19:53:29 2004 EDT
Modified files:
/pear-core/PEAR/PackageFile/Parser v1.php v2.php
Log:
remove unnecessary PEAR_Dependency dependency
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Parser/v1.php?r1=1.8&r2=1.9&ty=u
Index: pear-core/PEAR/PackageFile/Parser/v1.php
diff -u pear-core/PEAR/PackageFile/Parser/v1.php:1.8 pear-core/PEAR/PackageFile/Parser/v1.php:1.9
--- pear-core/PEAR/PackageFile/Parser/v1.php:1.8 Tue Oct 12 15:41:06 2004
+++ pear-core/PEAR/PackageFile/Parser/v1.php Thu Oct 28 19:53:29 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: v1.php,v 1.8 2004/10/12 19:41:06 cellog Exp $
+// $Id: v1.php,v 1.9 2004/10/28 23:53:29 cellog Exp $
require_once 'PEAR/PackageFile/v1.php';
/**
@@ -59,8 +59,7 @@
*/
function parse($data, $file, $archive = false)
{
- require_once('PEAR/Dependency.php');
- if (PEAR_Dependency::checkExtension($error, 'xml')) {
+ if (!extension_loaded('xml')) {
$this->_stack->push(PEAR_PACKAGEFILE_ERROR_NO_XML_EXT, 'exception',
array('error' => $error));
return $this->_isValid = false;
}
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Parser/v2.php?r1=1.7&r2=1.8&ty=u
Index: pear-core/PEAR/PackageFile/Parser/v2.php
diff -u pear-core/PEAR/PackageFile/Parser/v2.php:1.7 pear-core/PEAR/PackageFile/Parser/v2.php:1.8
--- pear-core/PEAR/PackageFile/Parser/v2.php:1.7 Tue Oct 26 15:49:20 2004
+++ pear-core/PEAR/PackageFile/Parser/v2.php Thu Oct 28 19:53:29 2004
@@ -18,7 +18,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: v2.php,v 1.7 2004/10/26 19:49:20 cellog Exp $
+// $Id: v2.php,v 1.8 2004/10/28 23:53:29 cellog Exp $
/**
* Parser for package.xml version 2.0
@@ -74,6 +74,9 @@
function parse($data, $file, $archive = false)
{
+ if (!extension_loaded('xml')) {
+ return PEAR::raiseError("XML Extension not found");
+ }
$this->_valStack = array();
$this->_dataStack = array();
$this->_depth = 0;