From: Art Cancro Date: Thu, 7 Jul 2011 22:41:21 +0000 (-0400) Subject: For sites in guest mode, redirect to the landing page after we're logged out. X-Git-Tag: v8.11~599 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=38180bcd40921828c75c66cd8f10235512a326a2 For sites in guest mode, redirect to the landing page after we're logged out. --- diff --git a/webcit/auth.c b/webcit/auth.c index d340ebb8a..dd0156704 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -507,16 +507,19 @@ void do_logout(void) serv_getln(buf, sizeof buf); WCC->logged_in = 0; - 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); + /* For sites in guest mode, redirect to the landing page after we're logged out */ + if (WC->serv_info->serv_supports_guest) { + wc_printf(" " + ); + } + wc_printf("
"); wc_printf("
"); wc_printf("
"); @@ -547,6 +550,11 @@ void do_logout(void) wc_printf(_("Log in again")); wc_printf(""); wc_printf("
\n"); + if (WC->serv_info->serv_supports_guest) { + display_default_landing_page(); + return; + } + wDumpContent(2); end_webcit_session(); } diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 8b9f83bf1..4c1d01e87 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -860,6 +860,7 @@ function ConfirmLogoff() { 'do_template?template=confirmlogoff', { method: 'get', + evalScripts: true, onSuccess: function(cl_success) { toggleModal(1); }