[pmwiki-users] quiet= option to (:redirect:) (PITS.00919)

marc gmane at auxbuss.com
Fri Nov 16 12:45:26 CST 2007


Patrick R. Michaud said...
> On Wed, Nov 14, 2007 at 03:27:40PM -0600, JB wrote:
> > > http://www.pmwiki.org/wiki/PITS/00919 describes the desire for
> > > having a quiet= option with the (:redirect PageName:) directive.
> > > 
> > > I'm considering adding this to 2.2, and I'm simply calling the
> > > issue to the list's attention for any discussion or feedback.
> > 
> > 
> > There is this recipe:
> > 
> >      http://www.pmwiki.org/wiki/Cookbook/RedirectSilent
> 
> This recipe causes *all* Redirects to be silent -- one
> advantage of the quiet= option is that it allows an author
> to choose whether a redirect is to be silent or not.
> 
> Indeed, the current approach I'm thinking of combines PITS 00919,
> RedirectSilent, and CustomRedirects so that
> 
>   $EnableRedirectQuiet = 0;    # current behavior, always include ?from=
>   $EnableRedirectQuiet = 1;    # include ?from= unless quiet=1 supplied
>   $EnableRedirectQuiet = 2;    # include ?from= only if quiet=0 supplied
> 
> We may also have a $RedirectStatus[] array where the admin
> can choose whether or not a given redirect is quiet based on
> the status= parameter:
> 
>   $RedirectQuietStatus['301'] = 2;   # 301 redirects are quiet unless quiet=0

Nice :-)

-- 
Cheers,
Marc




More information about the pmwiki-users mailing list