authpopup now returns the parent to the pushed_destination
authorArt Cancro <ajc@citadel.org>
Mon, 24 Jan 2011 21:02:39 +0000 (16:02 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 14:04:04 +0000 (14:04 +0000)
webcit/auth.c
webcit/static/t/authpopup_finished.html

index ff9bd7b975f96c7f292a9ce08b57b74e7b0d59e3..2d2e90be2b90dd387a73e49481289985f7cf7e23 100644 (file)
@@ -328,7 +328,12 @@ void do_openid_login(void)
                return;
        }
 
-       convenience_page("770000", _("Error"), &buf[4]);
+       begin_burst();
+       output_headers(1, 0, 0, 0, 1, 0);
+       wc_printf("<html><body>");
+       escputs(&buf[4]);
+       wc_printf("</body></html>");
+       end_burst();
 }
 
 
@@ -442,7 +447,6 @@ void finalize_openid_login(void)
 
        /* Did we manage to log in?  If so, continue with the normal flow... */
        if (WC->logged_in) {
-
                begin_burst();
                output_headers(1, 0, 0, 0, 1, 0);
                do_template("authpopup_finished", NULL);
@@ -457,8 +461,13 @@ void finalize_openid_login(void)
                */
 
        } else {
-               /* maybe do something prettier here? */
-               convenience_page("770000", _("Error"), _("Error") );
+               /* FIXME do something prettier here? */
+               begin_burst();
+               output_headers(1, 0, 0, 0, 1, 0);
+               wc_printf("<html><body>");
+               wc_printf("error");
+               wc_printf("</body></html>");
+               end_burst();
        }
 
        FreeStrBuf(&result);
index ad9db1eff0ec55b3b45ca8ccd493f6b6efd86c49..1e55fd9f5fc20e2110616d4e1e2dbd40fe832629 100644 (file)
@@ -1,6 +1,6 @@
 <script type="text/javascript">
 window.close();
 if (window.opener && !window.opener.closed) {
-       window.opener.location.reload();
+       window.opener.location = "pop";
 } 
 </script>