[Pmwiki-users] Re: Re: Re: Organization of pages (was: Hierarchical groups)
chr@home.se
chr
Thu Jun 17 13:10:30 CDT 2004
On Thu, 17 Jun 2004, Patrick R. Michaud wrote:
> > What's the resoultion of $Now? If it's one second I'm not sure it's
> > enough.
>
> It's one second, and that's *plenty* enough. Essentially the code is
>
> if (!isset($page['ID'])) {
> $page['ID']=time(); sleep(1);
> }
>
> and the "sleep" ensures that no other page can possibly get the
> same ID. Keep in mind that by this point PmWiki has already blocked
> other processes from being able to edit/create pages so that two
> pages cannot be edited/created at the same time, thus the next creation
> has to occur at least one second later.
I knew access was locked as soon as you were editing/creating a page.
Adding a delay seems like an elegant solution, unless you expect people to
be create pages *very* frequently. Actually.. having a limit on how fast
pages can be created might be useful in itself (imagine an evil script
that creates lots of dummy pages).
/Christian
--
Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list