cvs: php4 /pear/PEAR Dependency.php
| From: | Tomas V.V.Cox | Date: | Mon, 17 Jun 2002 13:50:33 +0000 |
| Subject: | cvs: php4 /pear/PEAR Dependency.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4662@lists.php.net to get a copy of this message | ||
cox Mon Jun 17 09:50:33 2002 EDT
Modified files:
/php4/pear/PEAR Dependency.php
Log:
Use the new PEAR::loadExtension() in checkExtension() instead
of the "hack"
Index: php4/pear/PEAR/Dependency.php
diff -u php4/pear/PEAR/Dependency.php:1.11 php4/pear/PEAR/Dependency.php:1.12
--- php4/pear/PEAR/Dependency.php:1.11 Thu May 23 16:37:58 2002
+++ php4/pear/PEAR/Dependency.php Mon Jun 17 09:50:33 2002
@@ -17,7 +17,7 @@
// | Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Dependency.php,v 1.11 2002/05/23 20:37:58 cox Exp $
+// $Id: Dependency.php,v 1.12 2002/06/17 13:50:33 cox Exp $
/**
* Methods for dependencies check. Based on Stig's dependencies RFC
@@ -134,11 +134,8 @@
function checkExtension($name, $req = null, $relation = 'has')
{
// XXX (ssb): could we avoid loading the extension here?
- if (!extension_loaded($name)) {
- $dlext = OS_WINDOWS ? '.dll' : '.so';
- if (!@dl($name . $dlext)) {
- return "'$name' PHP extension is not installed";
- }
+ if (!PEAR::loadExtension($name)) {
+ return "'$name' PHP extension is not installed";
}
if ($relation == 'has') {
return false;