From 38180bcd40921828c75c66cd8f10235512a326a2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 7 Jul 2011 18:41:21 -0400 Subject: [PATCH] For sites in guest mode, redirect to the landing page after we're logged out. --- webcit/auth.c | 18 +++++++++++++----- webcit/static/wclib.js | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) 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); } -- 2.30.2