Re: cvs: php4 /pear System.php

From: Date: Sat, 10 Aug 2002 16:47:38 +0000
Subject: Re: cvs: php4 /pear System.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5658@lists.php.net to get a copy of this message
On Sat, Aug 10, 2002 at 04:33:08PM -0000, Tomas V.V.Cox wrote: > 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>) that seems like adding overhead to it with no good reason. i don't think we should add workarounds like this.. my .2$ tc > > > 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"); > } > } > > > > -- > PEAR CVS Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Thies C. Arnzten - Looking for all sorts of freelance work - just ask.. Whishlist: http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ/ref=wl_em_to

« previous php.pear.cvs (#5658) next »