[pmwiki-users] Odd behavior of Category

Martin Fick fick at fgm.com
Tue Jan 3 12:11:26 CST 2006


On Tue, Jan 03, 2006 at 12:02:21PM -0600, Patrick R. Michaud wrote:
> On Tue, Jan 03, 2006 at 12:38:19PM -0500, Martin Fick wrote:
> > > >>> "Patrick R. Michaud" <pmichaud at pobox.com> 01/03/06 12:12 PM >>>
> > > 
> > > At the moment there's not a way to exclude specific pages by name
> > > except through custom list= options.  (I'm still planning to allow
> > > wildcard name inclusion/exclusion -- e.g., "name=-*.Template", but
> > > it's not done yet.)
> > 
> >   Hmm, I just discovered the php function fnmatch() which
> > seems like it would be very usefull to add "multilevel"
> > globbing to the pagestore ls() function.  There is also a
> > glob() function, but this could potentially return a large
> > array which I know Patrick is trying to avoid.  If this is
> > old news, ignore it, :)
> 
> Yes, I noticed fnmatch() and glob() as well.  Unfortunately, they're 
> only available in PHP 4.3.0 and later (so far PmWiki still targets 
> anything after PHP 4.1.0).
> 
> They're also not available under Windows systems.  So, we'll still
> have to have the other code around, and I'm not sure it will give 
> us any real performance improvements anyway.  So, I think I'll
> stick with regular expressions, and just have a function that
> will convert a wildcard pattern into a regular expression pattern.

  Oh, I was thinking of convenience, not performance in this
case. :)  Maybe creating an fnmatch() of your own for older
php / windows installations would make sense?

  -Martin




More information about the pmwiki-users mailing list