On Fri, Jan 12, 2007 at 02:23:21PM +0100, Roman wrote:
> Patrick, thank you for your help, that's what I was looking for. Just
> a little question regarding URL
>
> URL Before:
> http://server/wiki/?n=CurrentGroup.CurrentPage&action=search&q=test
>
> URL Now:
> http://server/wiki/Site/Search?&action=search&q=test
>
> Notice first ampresand following question mark. Can it cause any problem?
Oops. It's probably not a problem, but we should be more
correct. Try the following instead
if ($action == 'search') {
$pagename = ResolvePageName($pagename);
if ($pagename != 'Site.Search') {
$qs = preg_replace('/\\bn=[^&?]*[&?]?/', '', @$_SERVER['QUERY_STRING']);
Redirect('Site.Search', "\$PageUrl?$qs");
}
}
Pm
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users