Smooth transition between logged-in and not-logged-in states
authorArt Cancro <ajc@citadel.org>
Wed, 29 Dec 2010 22:41:23 +0000 (17:41 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 13:32:11 +0000 (13:32 +0000)
webcit/auth.c
webcit/static/t/get_logged_in.html

index 435850113ff355ac8706c2158662a95c2b6bd1c4..c3a3cac50eb6c11ba5c1efa15ed195e41d628569 100644 (file)
@@ -568,14 +568,20 @@ void do_logout(void)
 
        FlushStrBuf(WCC->wc_username);
        FlushStrBuf(WCC->wc_password);
-       FlushStrBuf(WCC->CurRoom.name);
        FlushStrBuf(WCC->wc_fullname);
 
-       /* FIXME: this is to suppress the iconbar displaying, because we aren't
-          actually logged out yet */
+       serv_puts("LOUT");
+       serv_getln(buf, sizeof buf);
        WCC->logged_in = 0;
 
-       /** Calling output_headers() this way causes the cookies to be un-set */
+       if (WC->serv_info->serv_supports_guest) {
+               display_default_landing_page();
+               return;
+       }
+
+       FlushStrBuf(WCC->CurRoom.name);
+
+       /* Calling output_headers() this way causes the cookies to be un-set */
        output_headers(1, 1, 0, 1, 0, 0);
 
        wc_printf("<div id=\"logout_screen\">");
@@ -607,16 +613,6 @@ void do_logout(void)
                "<span class=\"button_link\"><a href=\".\">");
        wc_printf(_("Log in again"));
        wc_printf("</a></span>");
-
-       /* The "close window" link is commented out because some browsers don't
-        * allow it to work.
-        *
-       wc_printf("&nbsp;&nbsp;&nbsp;<span class=\"button_link\">"
-               "<a href=\"javascript:window.close();\">");
-       wc_printf(_("Close window"));
-       wc_printf("</a></span>");
-        */
-
        wc_printf("</div></div></div>\n");
        wDumpContent(2);
        end_webcit_session();
index 0112971dc13b332badf5b5650175d1828cd9a02b..57be840b524d106e2910398c720047664823a825 100644 (file)
@@ -17,8 +17,8 @@ To complete this action, you must log in.  FIXME localize this string.<br>
 </tr></table>
 </form>
 <hr>
-<a href="javascript:ajax_try_username_and_password('<?BSTR("destination_url")>');">Proceed and be clueless</a><br>
-<a href="javascript:toggleModal(0);"><?_("Cancel")></a>
+<div class="buttons"><a href="javascript:ajax_try_username_and_password('<?BSTR("destination_url")>');"><?_("Log in")></a></div>
+<div class="buttons"><a href="javascript:toggleModal(0);"><?_("Cancel")></a></div>
 </div>
 </body>
 </html>