Got rid of all of the .m.html templates and is_mobile cruft
[citadel.git] / webcit / webcit.c
index b26c77a3fa590ade4e346068b96c7a55f731e31b..5fbe26169cece7456d4f68bf2657476525dccb21 100644 (file)
@@ -2,7 +2,24 @@
  * This is the main transaction loop of the web service.  It maintains a
  * 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
+ *
+ * This program is open source software.  You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
+
 #define SHOW_ME_VAPPEND_PRINTF
 #include <stdio.h>
 #include <stdarg.h>
@@ -10,7 +27,6 @@
 #include "groupdav.h"
 #include "webserver.h"
 
-
 StrBuf *csslocal = NULL;
 HashList *HandlerHash = NULL;
 
@@ -495,7 +511,7 @@ void push_destination(void) {
 void pop_destination(void) {
        wcsession *WCC = WC;
 
-       if (!WCC) {
+       if ( (!WCC) || (WCC->PushedDestination == NULL) || (StrLength(WCC->PushedDestination) == 0) ) {
                do_welcome();
                return;
        }
@@ -638,7 +654,6 @@ void session_loop(void)
        WCC= WC;
        WCC->upload_length = 0;
        WCC->upload = NULL;
-       WCC->is_mobile = 0;
        WCC->Hdr->nWildfireHeaders = 0;
        if (WCC->Hdr->HR.Handler != NULL)
                Flags = WCC->Hdr->HR.Handler->Flags; /* so we can temporarily add our own... */
@@ -740,6 +755,7 @@ void session_loop(void)
         */
        if (havebstr("go")) {
                int ret;
+               lprintf(9, "Explicit room selection: %s\n", bstr("go"));
                ret = gotoroom(sbstr("go"));    /* do quietly to avoid session output! */
                if ((ret/100) != 2) {
                        lprintf(1, "GOTOFIRST: Unable to change to [%s]; Reason: %d\n",