Begin removing the decimal point from our version number (901 instead of 9.01)
[citadel.git] / webcit / summary.c
index acdf2cdc44b723404a6f25641e3f7dfa59184615..faa4f45b2d82b02e59316919d1d2e7247ce4dc88 100644 (file)
@@ -111,7 +111,7 @@ void tasks_section(void) {
                num_msgs = 0;
        }
        else {
-               num_msgs = load_msg_ptrs("MSGS ALL", NULL, &Stat, NULL);
+               num_msgs = load_msg_ptrs("MSGS ALL", NULL, NULL, &Stat, NULL, NULL, NULL, NULL, 0);
        }
 
        if (num_msgs > 0) {
@@ -160,7 +160,7 @@ void calendar_section(void) {
                num_msgs = 0;
        }
        else {
-               num_msgs = load_msg_ptrs("MSGS ALL", NULL, &Stat, NULL);
+               num_msgs = load_msg_ptrs("MSGS ALL", NULL, NULL, &Stat, NULL, NULL, NULL, NULL, 0);
        }
        calendar_GetParamsGetServerCall(&Stat, 
                                        &v,
@@ -197,18 +197,26 @@ void tmplput_calendar_section(StrBuf *Target, WCTemplputParams *TP) {
        calendar_section();
 }
 
+
+/*
+ * summary page
+ */
+void display_summary_page(void)
+{
+       output_headers(1, 1, 1, 0, 0, 0); 
+       do_template("summary_page");
+       wDumpContent(1);
+}
+
+
 void 
 InitModule_SUMMARY
 (void)
 {
        RegisterNamespace("TIME:NOW", 0, 0, tmplput_output_date, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:NEWMESSAGES_SELECTION", 0, 0, tmplput_new_messages_section, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:TASKSSECTION", 0, 0, tmplput_tasks_section, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:CALENDAR_SECTION", 0, 0, tmplput_calendar_section, NULL, CTX_NONE);
-
+       WebcitAddUrlHandler(HKEY("summary"), "", 0, display_summary_page, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("new_messages_html"), "", 0, new_messages_section, AJAX);
        WebcitAddUrlHandler(HKEY("tasks_inner_html"), "", 0, tasks_section, AJAX);
        WebcitAddUrlHandler(HKEY("calendar_inner_html"), "", 0, calendar_section, AJAX);
-
 }