cvs: php4 /pear System.php
| From: | Tomas V.V.Cox | Date: | Sat, 10 Aug 2002 16:33:08 +0000 |
| Subject: | cvs: php4 /pear System.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5657@lists.php.net to get a copy of this message | ||
cox Sat Aug 10 12:33:08 2002 EDT
Modified files:
/php4/pear System.php
Log:
ZE2 fix on calls to mkdir() (thanks Brad Bulger <tater@potatoe.com>)
Index: php4/pear/System.php
diff -u php4/pear/System.php:1.16 php4/pear/System.php:1.17
--- php4/pear/System.php:1.16 Fri Jul 26 06:18:28 2002
+++ php4/pear/System.php Sat Aug 10 12:33:08 2002
@@ -16,7 +16,7 @@
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.16 2002/07/26 10:18:28 cox Exp $
+// $Id: System.php,v 1.17 2002/08/10 16:33:08 cox Exp $
//
require_once 'PEAR.php';
@@ -43,7 +43,7 @@
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
-* @version $Revision: 1.16 $
+* @version $Revision: 1.17 $
* @access public
* @see http://pear.php.net/manual/
*/
@@ -203,7 +203,8 @@
}
/**
- * Make directories
+ * Make directories. Note that we use call_user_func('mkdir') to avoid
+ * a problem with ZE2 calling System::mkDir instead of the native PHP func.
*
* @param string $args the name of the director(y|ies) to create
* @return bool True for success
@@ -232,14 +233,14 @@
$dir = dirname($dir);
}
while ($newdir = array_shift($dirstack)) {
- if (!mkdir($newdir, $mode)) {
+ if (!call_user_func('mkdir', $newdir, $mode)) {
$ret = false;
}
}
}
} else {
foreach($opts[1] as $dir) {
- if (!@is_dir($dir) && !mkdir($dir, $mode)) {
+ if (!@is_dir($dir) && !call_user_func('mkdir', $dir, $mode)) {
$ret = false;
}
}
@@ -354,7 +355,7 @@
$tmp = tempnam($tmpdir, $prefix);
if (isset($tmp_is_dir)) {
unlink($tmp); // be careful possible race condition here
- if (!mkdir($tmp, 0700)) {
+ if (!call_user_func('mkdir', $tmp, 0700)) {
return System::raiseError("Unable to create temporary directory
$tmpdir");
}
}