00713: bug using category subjects in search terms
Description: This bug was introduced in pmwiki-2.1.beta27 and is still present in pmwiki-2.1.3
BUG DESCRIPTION:
In Pmwiki syntax Category subject terms start with exclamation sign "!" e.g. "!Calendar". When one enters search query that consists of two terms one (or both) of which are category subject, pmwiki treats both terms as mere words dropping special meaning of "!".
To reproduce the bug perform the following steps:
- Open http://www.pmwiki.org
- In a search box enter "!Calendar" (without quotes). The results, as it should be, will match 4 wiki pages that contain Category subject "Calendar"
- Now, in a search box enter (without quotes) "new !Calendar" (remove the quotes). Surprisingly, the search result matches 40 pages. Their analysis shows that these 40 pages simply contain words "new" and "calendar". Special meaning of "!Calendar" as a category subject has been lost. Another way of looking at this: adding new term "new" to the old query "!calendar" (logical AND) should not result in finding more matches.
As a matter of fact, pmwiki-2.1.beta26 performs category subject searches correctly.
BUG FIX:
As a simple (and temporary) way of fixing the bug I replaced pmwiki-2.1.3 functin MakePageList (file scripts/pagelist.php) with the corresponding one from pmwiki-2.1.beta26. Now category searches operate as expected.
I Hope that this bug in core Pmwiki functionality will be given proper attention.
Thanks,
--Leo--