X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=b0236838823e0f618e7056a75baa77d1ddebd7a1;hb=7ec6747f12715155e4f61269ae1d0fbba7c42dc5;hp=5a0eec7441eea738b929c802d45a3d70a742e7db;hpb=b5f6cba14c339fc66508fac3423e19c8061290a8;p=citadel.git diff --git a/webcit/webcit.c b/webcit/webcit.c index 5a0eec744..b02368388 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -752,7 +752,7 @@ void session_loop(void) end_ajax_response(); } } - /* When all else fails, display the main menu. */ + /* When all else fails, display the default landing page or a main menu. */ else { /* * ordinary browser users get a nice login screen, DAV etc. requsets @@ -762,14 +762,8 @@ void session_loop(void) if (xhttp) { authorization_required(); } - else if (WCC->serv_info->serv_supports_guest) { - /* default action. probably revisit this. */ - StrBuf *teh_lobby = NewStrBufPlain(HKEY("_BASEROOM_")); - smart_goto(teh_lobby); - FreeStrBuf(&teh_lobby); - } else { - display_login(); + display_default_landing_page(); } } /* @@ -789,6 +783,23 @@ SKIP_ALL_THIS_CRAP: } + +/* + * Display the appropriate landing page for this site. + */ +void display_default_landing_page(void) { + if (WC->serv_info->serv_supports_guest) { + /* default action. probably revisit this. */ + StrBuf *teh_lobby = NewStrBufPlain(HKEY("_BASEROOM_")); + smart_goto(teh_lobby); + FreeStrBuf(&teh_lobby); + } + else { + display_login(); + } +} + + /* * Replacement for sleep() that uses select() in order to avoid SIGALRM */