]> code.citadel.org Git - citadel.git/commitdiff
Fixed stuff
authorArt Cancro <ajc@citadel.org>
Sun, 7 Mar 1999 03:25:31 +0000 (03:25 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 7 Mar 1999 03:25:31 +0000 (03:25 +0000)
webcit/auth.c
webcit/webcit.c

index 624844a4c6ae548e22da011b224fe81f70540df5..184c04cf84b5477d69d442f610f794a1b79cca1d 100644 (file)
@@ -68,9 +68,14 @@ void display_login(char *mesg)
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"New User\">\n");
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Exit\">\n");
 
-       wprintf("<BR><INPUT TYPE=\"checkbox\" NAME=\"noframes\">");
-       wprintf("<FONT SIZE=-1>&nbsp;Check here to disable frames</FONT>\n");
-       wprintf("</FORM></CENTER>\n");
+       /* Only offer the "check to disable frames" selection if frames haven't
+        * already been disabled by the browser braindamage check.
+        */
+       if (noframes == 0) {
+               wprintf("<BR><INPUT TYPE=\"checkbox\" NAME=\"noframes\">");
+               wprintf("<FONT SIZE=-1>&nbsp;Check here to disable frames</FONT>\n");
+               wprintf("</FORM></CENTER>\n");
+       }
 
        /* Da instructions */
        wprintf("<LI><EM>If you already have an account on %s,",
@@ -110,10 +115,11 @@ void do_login(void)
        int need_regi = 0;
 
 
+       /* Note that the initial value of noframes is set by the browser braindamage
+        * check, so don't add an "else" clause here.
+        */
        if (!strcasecmp(bstr("noframes"), "on"))
                noframes = 1;
-       else
-               noframes = 0;
 
        if (!strcasecmp(bstr("action"), "Exit")) {
                do_logout();
index 03bc0a053b5c2ccfad52d5cdf04521b40d4b9265..f9e29991b7bc6672a4d55ee362e5925a6bc83b48 100644 (file)
@@ -557,7 +557,7 @@ void upload_handler(char *name, char *filename, char *encoding,
 }
 
 
-void session_loop(char *browser_host, int bd_use_frames)
+void session_loop(char *browser_host)
 {
        char cmd[256];
        char action[256];
@@ -874,7 +874,7 @@ int main(int argc, char *argv[])
 {
 
        char browser[256];
-       int bd_use_frames;
+       int bd;
 
        if (argc != 6) {
                fprintf(stderr,
@@ -891,9 +891,13 @@ int main(int argc, char *argv[])
        strcpy(wc_roomname, "");
 
        strcpy(browser, argv[5]);
-       bd_use_frames = browser_braindamage_check(browser);
+       bd = browser_braindamage_check(browser);
+       if (bd == B_NO)
+               noframes = 1;
+       else
+               noframes = 0;
 
        while (1) {
-               session_loop(argv[4], bd_use_frames);
+               session_loop(argv[4]);
        }
 }