]> code.citadel.org Git - citadel.git/blobdiff - webcit/summary.c
* Modified load_msg_pointers(), gave it the ability to return the lowest and highest...
[citadel.git] / webcit / summary.c
index cb9ef3b5c24ca1538f08bc10c5dda456b9f464b0..ae2588da2651a541f7dd5523afe3757bc4c2a874 100644 (file)
@@ -92,23 +92,23 @@ void tasks_section(void) {
                num_msgs = 0;
        }
        else {
-               num_msgs = load_msg_ptrs("MSGS ALL", 0);
+               num_msgs = load_msg_ptrs("MSGS ALL", 0, NULL, NULL);
        }
 
-       if (num_msgs < 1) {
-               wprintf("<i>");
-               wprintf(_("(None)"));
-               wprintf("</i><br />\n");
-       }
-       else {
+       if (num_msgs > 0) {
                at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
                        display_task(Msg, 0);
                }
+               DeleteHashPos(&at);
        }
 
-       calendar_summary_view();
+       if (calendar_summary_view() < 1) {
+               wprintf("<i>");
+               wprintf(_("(None)"));
+               wprintf("</i><br />\n");
+       }
 }
 
 
@@ -133,23 +133,23 @@ void calendar_section(void) {
                num_msgs = 0;
        }
        else {
-               num_msgs = load_msg_ptrs("MSGS ALL", 0);
+               num_msgs = load_msg_ptrs("MSGS ALL", 0, NULL, NULL);
        }
 
        parse_calendar_view_request(&c);
 
-       if (num_msgs < 1) {
-               wprintf("<i>");
-               wprintf(_("(Nothing)"));
-               wprintf("</i><br />\n");
-       }
-       else {
+       if (num_msgs > 0) {
                at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
                        load_calendar_item(Msg, 0, &c);
                }
-               calendar_summary_view();
+               DeleteHashPos(&at);
+       }
+       if (calendar_summary_view() < 1) {
+               wprintf("<i>");
+               wprintf(_("(Nothing)"));
+               wprintf("</i><br />\n");
        }
 }
 
@@ -158,15 +158,16 @@ void calendar_section(void) {
  */
 void server_info_section(void) {
        char message[512];
+       wcsession *WCC = WC;
 
        snprintf(message, sizeof message,
                _("You are connected to %s, running %s with %s, server build %s and located in %s.  Your system administrator is %s."),
-                ChrPtr(serv_info.serv_humannode),
-                ChrPtr(serv_info.serv_software),
+                ChrPtr(WCC->serv_info->serv_humannode),
+                ChrPtr(WCC->serv_info->serv_software),
                 PACKAGE_STRING,
-                ChrPtr(serv_info.serv_svn_revision),
-                ChrPtr(serv_info.serv_bbs_city),
-                ChrPtr(serv_info.serv_sysadm));
+                ChrPtr(WCC->serv_info->serv_svn_revision),
+                ChrPtr(WCC->serv_info->serv_bbs_city),
+                ChrPtr(WCC->serv_info->serv_sysadm));
        escputs(message);
 }
 
@@ -273,11 +274,13 @@ void summary(void) {
         wprintf("</h1><h2>");
         output_date();
         wprintf("</h2></div>");
+       wprintf("<div id=\"actiondiv\">");
        wprintf("<ul class=\"room_actions\">\n");
        wprintf("<li class=\"start_page\">");
        offer_start_page(NULL, &NoCtx);
         wprintf("</li></ul>");
         wprintf("</div>");
+        wprintf("</div>");
 
        /*
         * You guessed it ... we're going to refresh using ajax.