* move stuff from Hdr into substruct that may be easily wiped by memset 0'ing them
[citadel.git] / webcit / roomops.c
index 936defa9bbaba468eb880df8a6c8b4d19b275ef7..e85c3c60029b17f5846527648c389792a2f0d92c 100644 (file)
@@ -472,6 +472,7 @@ void embed_search_o_matic(StrBuf *Target, WCTemplputParams *TP)
  */
 
 void embed_room_banner(char *got, int navbar_style) {
+       wcsession *WCC = WC;
        char buf[256];
        char buf2[1024];
        char with_files[256];
@@ -501,9 +502,9 @@ void embed_room_banner(char *got, int navbar_style) {
         * we want it to remember the URL as a "/dotskip" one instead of
         * a "skip" or "gotonext" or something like that.
         */
-       if (WC->this_page == NULL)
-               WC->this_page = NewStrBuf();
-       StrBufPrintf(WC->this_page, 
+       if (WCC->Hdr->this_page == NULL)
+               WCC->Hdr->this_page = NewStrBuf();
+       StrBufPrintf(WCC->Hdr->this_page, 
                     "dotskip&room=%s",
                     ChrPtr(WC->wc_roomname));
 
@@ -653,7 +654,7 @@ void embed_room_banner(char *got, int navbar_style) {
                        default:
                                wprintf(
                                        "<li class=\"readallmess\">"
-                                       "<a href=\"readfwd\">"
+                                       "<a href=\"readfwd?startmsg=20&maxmsgs=20&is_summary=0&SortBy=date&SortOrder=2\">"
                                        "<img src=\"static/readallmess3_24x.gif\" "
                                        "alt=\"\">"
                                        "<span class=\"navbar_link\">"
@@ -1818,7 +1819,7 @@ void display_editroom(void)
                wprintf(_("The URL for subscribe/unsubscribe is: "));
                wprintf("<TT>%s://%s/listsub</TT></td></tr>\n",
                        (is_https ? "https" : "http"),
-                       ChrPtr(WC->http_host));
+                       ChrPtr(WC->Hdr->HR.http_host));
                /* Public posting? */
                wprintf("<tr><td>");
                wprintf(_("Allow non-subscribers to mail to this room."));
@@ -3312,7 +3313,7 @@ void set_floordiv_expanded(void) {
        StrBuf *FloorDiv;
        
        FloorDiv = NewStrBuf();
-       StrBufAppendBuf(FloorDiv, WCC->UrlFragment2, 0);
+       StrBufExtract_token(FloorDiv, WCC->Hdr->HR.ReqLine, 0, '/');
        set_preference("floordiv_expanded", FloorDiv, 1);
        WCC->floordiv_expanded = FloorDiv;
 }
@@ -4126,4 +4127,16 @@ InitModule_ROOMOPS
        RegisterNamespace("ROOM:INFO", 1, 2, tmplput_ROOM_Value, CTX_ROOMS);
 }
 
+
+
+void 
+SessionDestroyModule_ROOMOPS
+(wcsession *sess)
+{
+       if (sess->cache_fold != NULL) {
+               free(sess->cache_fold);
+       }
+       
+       free_march_list(sess);
+}
 /*@}*/