]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
fix permalink to comments
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index d20a759235267b8ffd086c8d04c9df5aff01b0df..2c5b4a84d13ea5e36673f242ed30e51b7f441eab 100644 (file)
@@ -91,7 +91,7 @@ sub redirect ($$) {
        my $q=shift;
        eval q{use URI};
 
-       my $topurl;
+       my $topurl = $config{cgiurl};
        if (defined $q && ! $config{w3mmode} && ! $config{reverse_proxy}) {
                $topurl = $q->url;
        }
@@ -217,7 +217,7 @@ sub cgi_postsignin ($$) {
                        error(gettext("probable misconfiguration: sslcookie is set, but you are attempting to login via http, not https"));
                }
                else {
-                       error(gettext("login failed, perhaps you need to turn on cookies?"));
+                       error(gettext("Login succeeded, but I don't remember why you were logging in, so you'll have to navigate back to whatever you were doing. (This should not normally happen. Perhaps you need to enable cookies?)"));
                }
        }
 }
@@ -490,7 +490,8 @@ sub cgierror ($) {
        print "Content-type: text/html\n\n";
        print cgitemplate(undef, gettext("Error"),
                "<p class=\"error\">".gettext("Error").": $message</p>");
-       die $@;
+
+       die $message;
 }
 
 1