[pmwiki-users] Re: SourceForge.net Read-Only Policy - PmWiki-Compatible!

Patrick R. Michaud pmichaud at pobox.com
Sat May 14 09:32:50 CDT 2005


On Sat, May 14, 2005 at 09:19:12AM -0500, Patrick R. Michaud wrote:
> On Sat, May 14, 2005 at 09:04:07AM -0500, Patrick R. Michaud wrote:
> > If one is worried about the extra calls to mkdirp, it can also be done:
> > 
> >     if (! file_exists("$PmWikiD/sessions")) mkdirp("$PmWikiD/uploads");
> >     if (! file_exists("$PmWikiD/uploads")) mkdirp("$PmWikiD/uploads");
> 
> Correction:
> 
>      if (! file_exists("$PmWikiD/sessions")) mkdirp("$PmWikiD/sessions");
>      if (! file_exists("$PmWikiD/uploads")) mkdirp("$PmWikiD/uploads");

Actually, upon thinking about it further -- the first thing
that mkdirp() does is check to see if the directory exists,
so having the extra "if" there doesn't really save much (just a
function call).  So I'd go back to the original

     mkdirp("$PmWikiD/sessions");
     mkdirp("$PmWikiD/uploads");

and leave it at that.

Pm



More information about the pmwiki-users mailing list