[pmwiki-users] Re: SourceForge.net Read-Only Policy - PmWiki-Compatible!
Patrick R. Michaud
pmichaud at pobox.com
Sat May 14 09:25:08 CDT 2005
On Sat, May 14, 2005 at 04:17:32PM +0200, chr at home.se wrote:
> On Sat, 14 May 2005, Patrick R. Michaud wrote:
>
> > I agree. I'm even thinking it might be worth a special script in the
> > cookbook (or perhaps the distribution) so that one can simply do:
> >
> > $SFProject = 'qdig';
> > include_once('cookbook/sourceforge.php');
> >
> > and have it configure paths from there.
>
> I even think it should be easy in standard pmwiki to have it store files
> in a separate directory structure, i.e. that you introduce e.g. $PmWikiD
> and pmwiki uses that to decide the default locations of wiki.d/, uploads/
> and sessions/. Maybe there are other situations where you want the data
> stored separately?
I think in this case I'd prefer a different variable name from $PmWikiD --
too many people are likely to think that's the directory that holds
the scripts rather than the directory that holds data.
> > if (! file_exists("$PmWikiD/sessions")) mkdirp("$PmWikiD/uploads");
> > if (! file_exists("$PmWikiD/uploads")) mkdirp("$PmWikiD/uploads");
>
> I assume file_exists() works for directories as well? (Btw, what about
> the really cases where 'sessions' happens to be a file or a soft link?
Yes, file_exists() just checks to make sure that something exists
in the file system. If 'sessions' is a file then mkdirp() will generate
errors (as it should). If it's a symbolic link, then mkdirp() will create
the directory at the target of the symbolic link (or generate an error
if it already exists and is not a directory).
> Oh, and was there a particular reason you didn't comment on using
> '?action=setup' to trigger the creation of directories?
I'm still thinking about it.
Pm
More information about the pmwiki-users
mailing list