X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwebcit.c;h=f067d446bf6581549aae5356578e2d7b9ee224a4;hb=dca4414169da8ea7161d5b95fc9ccbefe5d39651;hp=94dda267c0ea78c2106726050f2099c09a7d72e1;hpb=91238fd122152d8127d2b6974ecec24b08fe26c5;p=citadel.git
diff --git a/webcit/webcit.c b/webcit/webcit.c
index 94dda267c..f067d446b 100644
--- a/webcit/webcit.c
+++ b/webcit/webcit.c
@@ -3,15 +3,10 @@
* persistent session to the Citadel server, handling HTTP WebCit requests as
* they arrive and presenting a user interface.
*
- * Copyright (c) 1996-2011 by the citadel.org team
+ * Copyright (c) 1996-2012 by the citadel.org team
*
* This program is open source software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#define SHOW_ME_VAPPEND_PRINTF
@@ -138,12 +133,7 @@ void wDumpContent(int print_standard_html_footer)
*/
void output_headers( int do_httpheaders, /* 1 = output HTTP headers */
int do_htmlhead, /* 1 = output HTML
section and opener */
-
- int do_room_banner, /* 0=no, 1=yes,
- * 2 = I'm going to embed my own, so don't open the
- * either.
- */
-
+ int do_room_banner, /* 1 = include the room banner and
*/
int unset_cookies, /* 1 = session is terminating, so unset the cookies */
int suppress_check, /* 1 = suppress check for instant messages */
int cache /* 1 = allow browser to cache this page */
@@ -194,40 +184,24 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers */
if (do_htmlhead) {
begin_burst();
do_template("head");
-
- /* check for ImportantMessages (these display in a div overlaying the main screen) */
- if (StrLength(WCC->ImportantMsg) > 0) {
- wc_printf("
\n"
- "");
- StrEscAppend(WCC->WBuf, WCC->ImportantMsg, NULL, 0, 0);
- wc_printf("
\n"
- "
\n"
- );
- StrBufAppendBufPlain(WCC->trailing_javascript,
- HKEY("setTimeout('hide_imsg_popup()', 5000); \n"),
- 0
- );
- FlushStrBuf(WCC->ImportantMsg);
- }
if ( (WCC->logged_in) && (!unset_cookies) ) {
DoTemplate(HKEY("paging"), NULL, &NoCtx);
}
-
- if (do_room_banner == 1) {
+ if (do_room_banner) {
tmplput_roombanner(NULL, NULL);
}
}
- if (do_room_banner == 1) {
+ if (do_room_banner) {
wc_printf("
\n");
}
}
void output_custom_content_header(const char *ctype) {
- hprintf("HTTP/1.1 200 OK\r\n");
- hprintf("Content-type: %s; charset=utf-8\r\n",ctype);
- hprintf("Server: %s / %s\r\n", PACKAGE_STRING, ChrPtr(WC->serv_info->serv_software));
- hprintf("Connection: close\r\n");
+ hprintf("HTTP/1.1 200 OK\r\n");
+ hprintf("Content-type: %s; charset=utf-8\r\n",ctype);
+ hprintf("Server: %s / %s\r\n", PACKAGE_STRING, ChrPtr(WC->serv_info->serv_software));
+ hprintf("Connection: close\r\n");
}
@@ -278,14 +252,13 @@ void http_transmit_thing(const char *content_type, int is_static)
void convenience_page(const char *titlebarcolor, const char *titlebarmsg, const char *messagetext)
{
hprintf("HTTP/1.1 200 OK\n");
- output_headers(1, 1, 2, 0, 0, 0);
- wc_printf("
\n");
+ output_headers(1, 1, 1, 0, 0, 0);
+ wc_printf("
\n");
wc_printf("
", titlebarcolor);
wc_printf("%s\n", titlebarmsg);
wc_printf(" |
\n");
wc_printf("
\n
\n");
escputs(messagetext);
-
wc_printf("
\n");
wDumpContent(1);
}
@@ -821,7 +794,13 @@ void display_default_landing_page(void) {
if (WCC && WCC->serv_info && WCC->serv_info->serv_supports_guest) {
/* default action */
- if (default_landing_page) {
+ if (havebstr("go")) {
+ syslog(9, "Explicit room selection: %s", bstr("go"));
+ StrBuf *teh_room = NewStrBufPlain(bstr("go"), strlen(bstr("go")));
+ smart_goto(teh_room);
+ FreeStrBuf(&teh_room);
+ }
+ else if (default_landing_page) {
http_redirect(default_landing_page);
}
else {