Readloop remove special cases
[citadel.git] / webcit / bbsview_renderer.c
index 52edd1d343d997cf5ad3f20161f2c2bd526b994c..8bed3af37ddae02e57728da12e16119607de7b82 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "webcit.h"
 #include "webserver.h"
-#include "groupdav.h"
+#include "dav.h"
 
 /*
  * Data which gets passed around between the various functions in this module
@@ -81,7 +81,9 @@ int bbsview_GetParamsGetServerCall(SharedMessageStatus *Stat,
                                   void **ViewSpecific, 
                                   long oper, 
                                   char *cmd, 
-                                  long len)
+                                  long len,
+                                  char *filter,
+                                  long flen)
 {
        struct bbsview *BBS = malloc(sizeof(struct bbsview));
        memset(BBS, 0, sizeof(struct bbsview));
@@ -343,7 +345,12 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
                                                wc_printf("[");
                                        }
                                        else {
-                                               wc_printf("<a href=\"readfwd?page=%d\">", i);
+                                               wc_printf("<a href=\"readfwd?go=");
+                                               urlescputs(ChrPtr(WC->CurRoom.name));
+                                               wc_printf("?start_reading_at=%ld\">",
+                                                       BBS->msgs[i*Stat->maxmsgs]
+                                               );
+                                               /* wc_printf("?page=%d\">", i); */
                                                wc_printf("<span class=\"moreprompt_link\">");
                                        }
                                        if (
@@ -359,7 +366,7 @@ int bbsview_RenderView_or_Tail(SharedMessageStatus *Stat,
                                                wc_printf(_("Last"));
                                        }
                                        else {
-                                               wc_printf("%d", i + 1); // change to one-based for display
+                                               wc_printf("%d", i + 1); /* change to one-based for display */
                                        }
                                        if (i == BBS->requested_page) {
                                                wc_printf("]");
@@ -412,6 +419,7 @@ InitModule_BBSVIEWRENDERERS
                VIEW_BBS,
                bbsview_GetParamsGetServerCall,
                NULL,
+               NULL,
                NULL, 
                bbsview_LoadMsgFromServer,
                bbsview_RenderView_or_Tail,