[pmwiki-users] Re: Pagelists, trails and categories: bug and fix.

Martin Fick fick at fgm.com
Fri Nov 18 11:10:59 CST 2005


> FIX:
> 
>    I'm not sure if MakePageName() should be able to handle
>    this correctly, but one way to intercept it before it
>    even gets there is to add this line:
> 
>        $match[3] = preg_replace("|^\!|", "Category.", $match[3]);
> 
> 
>    right before the line:
> 
>        if (@$match[6]) {
> 
> 
>    With this patch, $match[3] will end up like
>    'Category.Silly',  MakePageName() handles that properly.


  An improved fix to deal with alternate category group
names is to add $CategoryGroup to the gloabls for the
ReadTrail() function and modify the added line mentioned
above to:

    $match[3] = preg_replace("|^\!|", "$CategoryGroup.", $match[3]);


  -Martin




More information about the pmwiki-users mailing list