]> code.citadel.org Git - citadel.git/commitdiff
* Cleanup of new message range view-o-matic
authorArt Cancro <ajc@citadel.org>
Sat, 5 Feb 2005 04:16:01 +0000 (04:16 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 5 Feb 2005 04:16:01 +0000 (04:16 +0000)
* GroupDAV GET operations now only send the Content-type: and Date:
  headers.  All the others are irrelevant.

webcit/ChangeLog
webcit/calendar_view.c
webcit/event.c
webcit/groupdav_get.c
webcit/groupdav_put.c
webcit/messages.c
webcit/static/head.html
webcit/webcit.c

index 88d92fd43ca8e6debb1ec795c26723d7ee50f3a3..4e85922e29653e0df772d6f22c38f6d3d041758a 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 528.42  2005/02/05 04:16:01  ajc
+* Cleanup of new message range view-o-matic
+* GroupDAV GET operations now only send the Content-type: and Date:
+  headers.  All the others are irrelevant.
+
 Revision 528.41  2005/02/04 19:19:23  ajc
 * Message reading range selection is now a drop-down box.
 
@@ -2312,4 +2317,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 834a4d3b5cdf820266d93919384b8898df656e81..5d074c80e7293a61daeffcfba75786e90dfb5112 100644 (file)
@@ -78,14 +78,6 @@ void calendar_month_view_display_events(time_t thetime) {
                                localtime_r(&event_tt, &event_tm);
                        }
 
-lprintf(9, "Event: %04d-%s-%02d, Now: %04d-%s-%02d\n",
-       event_tm.tm_year + 1900,
-       ascmonths[event_tm.tm_mon],
-       event_tm.tm_mday,
-       today_tm.tm_year + 1900,
-       ascmonths[today_tm.tm_mon],
-       today_tm.tm_mday);
-
                        if ((event_tm.tm_year == today_tm.tm_year)
                           && (event_tm.tm_mon == today_tm.tm_mon)
                           && (event_tm.tm_mday == today_tm.tm_mday)) {
index 0142ac9125eca39a62314581de1db6e1799d84f5..9c4aabd21d3b804ea1d54c9df44d6dae6668e37a 100644 (file)
@@ -666,14 +666,17 @@ STARTOVER:        lprintf(9, "Remove unlisted attendees\n");
                /* If the user clicked 'Save' then save it to the server. */
                lprintf(9, "Serializing it for saving\n");
                if ( (encaps != NULL) && (!strcasecmp(bstr("sc"), "Save")) ) {
-                       serv_puts("ENT0 1|||4");
+                       serv_puts("ENT0 1|||4|||1|");
                        serv_gets(buf);
-                       if (buf[0] == '4') {
+                       if (buf[0] == '8') {
                                serv_puts("Content-type: text/calendar");
                                serv_puts("");
                                serv_puts(icalcomponent_as_ical_string(encaps));
                                serv_puts("000");
                        }
+                       while (serv_gets(buf), strcmp(buf, "000")) {
+                               lprintf(9, "ENT0 REPLY: %s\n", buf);
+                       }
                        icalcomponent_free(encaps);
                }
 
index 9e6edc51445dfa5f85ea70f554082b062e19748d..66bcb16268f588ab22a4111a7446f49dcbd5bf3b 100644 (file)
@@ -34,8 +34,9 @@ void groupdav_get(char *dav_pathname) {
        char dav_uid[SIZ];
        long dav_msgnum = (-1);
        char buf[SIZ];
-       int found_content_type = 0;
        int n = 0;
+       int in_body = 0;
+       int found_content_type = 0;
 
        /* First, break off the "/groupdav/" prefix */
        remove_token(dav_pathname, 0, '/');
@@ -88,12 +89,21 @@ void groupdav_get(char *dav_pathname) {
        groupdav_common_headers();
        wprintf("ETag: \"%ld\"\n", dav_msgnum);
        while (serv_gets(buf), strcmp(buf, "000")) {
+               if (!strncasecmp(buf, "Date: ", 6)) {
+                       wprintf("%s\n", buf);
+               }
                if (!strncasecmp(buf, "Content-type: ", 14)) {
+                       wprintf("%s\n", buf);
                        found_content_type = 1;
                }
-               if ((strlen(buf) == 0) && (found_content_type == 0)) {
-                       wprintf("Content-type: text/plain\n");
+               if ((strlen(buf) == 0) && (in_body == 0)) {
+                       if (!found_content_type) {
+                               wprintf("Content-type: text/plain\n");
+                       }
+                       in_body = 1;
+               }
+               if (in_body) {
+                       wprintf("%s\n", buf);
                }
-               wprintf("%s\n", buf);
        }
 }
index c83be3f615080990de8da5f9c719ad520f8e6e9f..3a92de8207e7e34929bf6abfaace28984bd36b1f 100644 (file)
@@ -134,11 +134,12 @@ void groupdav_put(char *dav_pathname, char *dav_ifmatch,
        strcpy(dav_uid, "");
        while (serv_gets(buf), strcmp(buf, "000")) {
                switch(n++) {
-                       case 0:
-                               new_msgnum = atol(buf);
+                       case 0: new_msgnum = atol(buf);
+                               break;
+                       case 1: lprintf(9, "new_msgnum=%ld (%s)\n", new_msgnum, buf);
+                               break;
+                       case 2: strcpy(dav_uid, buf);
                                break;
-                       case 2:
-                               strcpy(dav_uid, buf);
                        default:
                                break;
                }
index a9327eee52e73426283cc6a2a0a2007376032718..718177f4ed60abb5f84fbecdbb86107d2a5725b6 100644 (file)
@@ -1276,14 +1276,10 @@ void readloop(char *oper)
         * messages, then display the selector bar
         */
        if (num_displayed > 1) {
-          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
-               wprintf("Reading #%d-%d of %d messages.",
-                       lowest_displayed, highest_displayed, nummsgs);
+          if ((!is_tasks) && (!is_calendar) && (!is_addressbook)
+             && (!is_notes) && (!is_singlecard)) {
 
-               if (is_summary) {
-                       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" "
-                               "VALUE=\"Delete selected\">\n");
-               }
+               wprintf("Reading #", lowest_displayed, highest_displayed);
 
                wprintf("<SELECT NAME=\"whichones\" SIZE=\"1\" "
                        "OnChange=\"location.href=msgomatic.whichones.options"
@@ -1320,6 +1316,13 @@ void readloop(char *oper)
                        oper,
                        WC->msgarr[0]);
 
+               wprintf("</SELECT> of %d messages.", nummsgs);
+
+               if (is_summary) {
+                       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" "
+                               "VALUE=\"Delete selected\">\n");
+               }
+
            }
        }
        if (is_summary) wprintf("</FORM>\n");
index 76ce9528142bf1e8fe2c1bdafb96cf83395d353f..9e7a40b5105f2bcf741e1be4e94b4927544a81cd 100644 (file)
@@ -16,7 +16,6 @@
 
 body {
        margin:0;
-       margin-right: 1px;
        padding: 0 0 0 0;
        height: 100%;
        overflow: auto;
@@ -32,7 +31,7 @@ body {
        display:block;
        top:0px;
        left:0px;
-       width: 10%;
+       width: 15%;
        height:100%;
        background: #ffffff;
 }
@@ -42,7 +41,7 @@ body {
        display:block;
        top:0px;
        left:0px;
-       width: 10%;
+       width: 15%;
        height:100%;
        background: #ffffff;
 }
@@ -51,8 +50,8 @@ body {
        position:fixed;
        display:block;
        top:0px;
-       left: 10%;
-       width: 90%;
+       left: 15%;
+       width: 85%;
        height: 15%;
        background: #444455;
 }
@@ -61,8 +60,8 @@ body {
        position:absolute;
        display:block;
        top:0px;
-       left: 10%;
-       width: 90%;
+       left: 15%;
+       width: 85%;
        height: 15%;
        background: #444455;
 }
@@ -79,20 +78,22 @@ body {
        position:fixed;
        display:block;
        top: 15%;
-       left: 10%;
-       width: 90%;
+       left: 15%;
+       width: 85%;
        height: 85%;
        overflow: auto;
+       /* overflow-x: hidden; */
 }
 
 * html #content {
        position:absolute;
        display:block;
        top: 15%;
-       left: 10%;
-       width: 90%;
+       left: 15%;
+       width: 85%;
        height: 85%;
        overflow: auto;
+       /* overflow-x: hidden; */
 }
 
 #button {
index 790c3e18105f0a9464ac9a6792a377392a4d188d..d61817e8031c61e7b451dfffa8673fe73d079140 100644 (file)
@@ -536,7 +536,8 @@ void output_static(char *what)
 
                fstat(fileno(fp), &statbuf);
                bytes = statbuf.st_size;
-               lprintf(3, "Static: %s, (%s; %ld bytes)\n", what, content_type, bytes);
+               /* lprintf(3, "Static: %s, (%s; %ld bytes)\n",
+                       what, content_type, bytes); */
                bigbuffer = malloc(bytes + 2);
                fread(bigbuffer, bytes, 1, fp);
                fclose(fp);