]> granicus.if.org Git - php/commitdiff
MFH
authorGreg Beaver <cellog@php.net>
Fri, 27 Feb 2004 02:27:12 +0000 (02:27 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 27 Feb 2004 02:27:12 +0000 (02:27 +0000)
pear/PEAR.php
pear/PEAR/Autoloader.php
pear/PEAR/Command.php

index 017b88b5441702d86b7f2deb04b0cc9203396538..17b4df51f50ce017bb0ae3e1185f9c287e874823 100644 (file)
@@ -40,6 +40,15 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
     define('PEAR_OS',    'Unix'); // blatant assumption
 }
 
+// instant backwards compatibility
+if (!defined('PATH_SEPARATOR')) {
+    if (OS_WINDOWS) {
+        define('PATH_SEPARATOR', ';');
+    } else {
+        define('PATH_SEPARATOR', ':');
+    }
+}
+
 $GLOBALS['_PEAR_default_error_mode']     = PEAR_ERROR_RETURN;
 $GLOBALS['_PEAR_default_error_options']  = E_USER_NOTICE;
 $GLOBALS['_PEAR_destructor_object_list'] = array();
@@ -184,7 +193,7 @@ class PEAR
     /**
     * If you have a class that's mostly/entirely static, and you need static
     * properties, you can use this method to simulate them. Eg. in your method(s)
-    * do this: $myVar = &PEAR::getStaticProperty('myVar');
+    * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
     * You MUST use a reference, or they will not persist!
     *
     * @access public
index bde2a66053ae0deacd97208de77170285314160c..e5f924ceb55fcb52daf651f609eb4c8946385cc7 100644 (file)
@@ -162,7 +162,7 @@ class PEAR_Autoloader extends PEAR
         $classname = strtolower($classname);
         reset($this->_method_map);
         while (list($method, $obj) = each($this->_method_map)) {
-            if (get_class($obj) == $classname) {
+            if (is_a($obj, $classname)) {
                 unset($this->_method_map[$method]);
                 $ok = true;
             }
index 2ed5f3ce4382ac5f51e8424cd96823ab0666f265..c9738cc5ff93fba7e6e5a2085ad09ec4ac6684cf 100644 (file)
@@ -160,7 +160,7 @@ class PEAR_Command
     function &setFrontendClass($uiclass)
     {
         if (is_object($GLOBALS['_PEAR_Command_uiobject']) &&
-            strtolower($uiclass) == get_class($GLOBALS['_PEAR_Command_uiobject'])) {
+              is_a($GLOBALS['_PEAR_Command_uiobject'], $uiclass)) {
             return $GLOBALS['_PEAR_Command_uiobject'];
         }
         if (!class_exists($uiclass)) {