CGI: if the "do" parameter is goto, recentchanges_link or commenter, redirect to...
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sat, 31 Jan 2009 14:48:44 +0000 (14:48 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sat, 31 Jan 2009 14:48:44 +0000 (14:48 +0000)
This can replace equivalent functionality in comments and recentchanges.

IkiWiki/CGI.pm

index a6b485edbb71a37679f71b70b428f10ffe88e685..949390e681d18a784b6bd6652b6265078b2ffc4f 100644 (file)
@@ -358,7 +358,12 @@ sub cgi (;$$) {
                        error("\"do\" parameter missing");
                }
        }
-       
+
+       if ($do eq 'goto' || $do eq 'recentchanges_link' ||
+           $do eq 'commenter') {
+               cgi_goto($q);
+       }
+
        # Need to lock the wiki before getting a session.
        lockwiki();
        loadindex();