[pmwiki-devel] Search forms and FmtPageList()

Hans design5 at softflow.co.uk
Sat Sep 26 03:41:44 CDT 2009


Friday, September 25, 2009, 5:43:01 PM, Hans wrote:

> But i think i discovered a bug in FmtPageList, or maybe a feature?
> the code reads:

>  # Handle "group/" at the beginning of the form-submitted request
>  if (preg_match("!^($GroupPattern(\\|$GroupPattern)*)?/!i", $rq, $match)) {
>    ......
> .....
> Can we do without the 'i' modifier, or serves it a good purpose?

I like to propose to remove the 'i' modifier in this
preg_match. This will allow input of 'Group/term'
to use group 'Group', and input of 'group/term' to look for
'group/term'. The general search of arguments is case insensitive,
so doing a case-sensitive match for a 'Group/' prefix is feasable and
will act as a switch for this special searchbox feature.

And it would mean that for a search extension recipe like TextExtract
the special input feature of 'Group/term' can remain.
I would prefer that over a disabling, since one can use TextExtract
from within the standard searchbox by adding fmt=extract,
so user may expect standard behaviour when entering 'Group/term'.


Hans




More information about the pmwiki-devel mailing list