]> code.citadel.org Git - citadel.git/blobdiff - webcit/summary.c
* move some more vars from the session context to strbuf (the use of StrBufAppendTemp...
[citadel.git] / webcit / summary.c
index c18b57b81b05a08a2ef590dbded5a9680e7ee25a..cb9ef3b5c24ca1538f08bc10c5dda456b9f464b0 100644 (file)
@@ -82,9 +82,12 @@ void tasks_section(void) {
        long HKLen;
        void *vMsg;
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
+       StrBuf *Buf;
 
-       gotoroom("_TASKS_");
+       Buf = NewStrBufPlain(HKEY("_TASKS_"));
+       gotoroom(Buf);
+       FreeStrBuf(&Buf);
        if (WCC->wc_view != VIEW_TASKS) {
                num_msgs = 0;
        }
@@ -98,7 +101,7 @@ void tasks_section(void) {
                wprintf("</i><br />\n");
        }
        else {
-               at = GetNewHashPos();
+               at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
                        display_task(Msg, 0);
@@ -119,10 +122,13 @@ void calendar_section(void) {
        long HKLen;
        void *vMsg;
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        struct calview c;
+       StrBuf *Buf;
 
-       gotoroom("_CALENDAR_");
+       Buf = NewStrBufPlain(HKEY("_CALENDAR_"));
+       gotoroom(Buf);
+       FreeStrBuf(&Buf);
        if ( (WC->wc_view != VIEW_CALENDAR) && (WC->wc_view != VIEW_CALBRIEF) ) {
                num_msgs = 0;
        }
@@ -138,7 +144,7 @@ void calendar_section(void) {
                wprintf("</i><br />\n");
        }
        else {
-               at = GetNewHashPos();
+               at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
                        load_calendar_item(Msg, 0, &c);
@@ -155,12 +161,12 @@ void server_info_section(void) {
 
        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."),
-               serv_info.serv_humannode,
-               serv_info.serv_software,
-               PACKAGE_STRING,
-               serv_info.serv_svn_revision,
-               serv_info.serv_bbs_city,
-               serv_info.serv_sysadm);
+                ChrPtr(serv_info.serv_humannode),
+                ChrPtr(serv_info.serv_software),
+                PACKAGE_STRING,
+                ChrPtr(serv_info.serv_svn_revision),
+                ChrPtr(serv_info.serv_bbs_city),
+                ChrPtr(serv_info.serv_sysadm));
        escputs(message);
 }
 
@@ -262,14 +268,14 @@ void summary(void) {
        wprintf("<div class=\"room_banner\">");
         wprintf("<img src=\"static/summscreen_48x.gif\">");
         wprintf("<h1>");
-        snprintf(title, sizeof title, _("Summary page for %s"), WC->wc_fullname);
+        snprintf(title, sizeof title, _("Summary page for %s"), ChrPtr(WC->wc_fullname));
         escputs(title);
         wprintf("</h1><h2>");
         output_date();
         wprintf("</h2></div>");
        wprintf("<ul class=\"room_actions\">\n");
        wprintf("<li class=\"start_page\">");
-       offer_start_page(NULL, 0, NULL, NULL, CTX_NONE);
+       offer_start_page(NULL, &NoCtx);
         wprintf("</li></ul>");
         wprintf("</div>");