[pmwiki-users] Redirect after $EditFunctions ?
SteP
step.list+pmwiki at gmail.com
Wed Jan 13 12:21:38 CST 2010
Thank you, Peter, I will experiment with your suggestion.
For the record, my current work-around is to remove 'exit;' from MyRedirect
function, and leave it as the one-to-the-last function in $EditFunctions.
This way my redirection is still in place while PostPageIndex can run
as well. One downside is that when the $EditFunctions chain completes,
pmwiki.php attempts its own Redirect() but headers have already been
started in MyRedirect, so php issues two warnings in the error log.
Perhaps pmwiki.php should use @header() instead of header() but I have
no idea of all the implications...
Peter Bowers wrote:
> You can't change the order in the middle of processing $EditFunctions
> because it is processed in a foreach loop. So you need to get it set
> up ahead of time.
>
> Basically what this means is including pagelist.php within your
> config.php and then adding your MyRedirect *after* you do that.
> (You'll probably want to set $EnablePageList to false as well -- I
> think the include_once() would graciously deal with it, but better
> safe than sorry.)
>
> No guarantees it'll work, but hopefully it'll get you on the right
> road.
More information about the pmwiki-users
mailing list