[pmwiki-devel] MatchPageNames

Patrick R. Michaud pmichaud at pobox.com
Tue May 22 20:36:36 CDT 2007


On Tue, May 22, 2007 at 11:39:51PM +0100, Hans wrote:
> Tuesday, May 22, 2007, 11:22:30 PM, Patrick wrote:
> > Put another way, given your interpretation, when would
> >     echo (boolean)MatchPageNames($something, '-PmWiki.*,-Site.*');
> > ever return someting other than false?
> 
> Never. And that was my intention.

Then why do it?  Why not just do  echo false ?

> > And why would having a pattern that always returns false be useful?

> It is just the opposite from what one wants from pagelist behaviour.
> Or to paraphrase your last question:
> Why would a pagelist which always returns every page be useful?

...but the above pattern *isn't* always returning every page,
it's returning only those page names that aren't in the PmWiki
or Site groups.  In particular:

    echo (boolean)MatchPageNames('Forum.Page1', '-PmWiki.*,-Site.*');  # true
    echo (boolean)MatchPageNames('Site.Site',   '-PmWiki.*,-Site.*');  # false

> Just that the initial default condition should be "No posting
> permissions", in the same way as (:pagelist:) is "All pages"

I think I need to see a much larger example of what you're trying
to do.  The MatchPageNames() function says "return a list of all
of the pagenames in the first argument that match the pattern given
by the second".  If you want to restrict that to a certain inclusive
set, then just put the inclusive set there.

Pm



More information about the pmwiki-devel mailing list