wc_printf("<table border=0><tr>");
wc_printf("<td><img src=\"static/summscreen_48x.gif\"></td>");
wc_printf("<td><h1>");
- snprintf(title, sizeof title, _("Summary page for %s"), ChrPtr(WC->wc_fullname));
+ snprintf(title, sizeof title, _("Summary page for %s"),
+ ( (WC->logged_in) ? ChrPtr(WC->wc_fullname) : ChrPtr(WC->serv_info->serv_humannode))
+ );
escputs(title);
wc_printf("</h1><h2>");
output_date();
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
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();
}
}
/*
}
+
+/*
+ * 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
*/
void openid_manual_create(void);
void display_login(void);
void display_openids(void);
+void display_default_landing_page(void);
void do_welcome(void);
void do_logout(void);
void display_main_menu(void);