[dokuwiki] Re: Configuration plugin problem

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 30 Jan 2006 23:34:55 +0100

On Mon, 30 Jan 2006 22:15:05 +0000
Chris Smith <chris@xxxxxxxxxxxxx> wrote:

> Can you try this for the header line?
> 
> header("Location: 
> ".str_replace('&amp;','&',wl($ID,'do=admin&page=config')));

Hmm... some remarks...

1)

wl() accepts either a commaseparated list of params like this:

  wl($ID,'foo=bar,baz=foo')

or an accociative array:

  wl($ID,array('foo'=>'bar','baz'=>'foo')

but a single string like this should work as well:

  wl($ID,'foo=bar&amp;baz=foo')

2)

Location redirects should always use an absolute URL (required by RFC)
so you should call wl with it's thir parameter set to true.

3)

As far as I can see the problem is caused by the XML encoded ampersand -
an encoding not needed (even invalid?) in the Location header. Am I
right? Your new patch will probably work, but I suggest to add another
optional parameter $sep='&amp;' to wl(), ml() and buildURLparams().

Andi

Other related posts: