Revert "Revert "Removed the "fix_scrollbarbug" div and all references to it.""
[citadel.git] / webcit / smtpqueue.c
index 16ae09ae1e263ba7b8d4cb943639eb37b22159a0..b120ee17ae6e9fa6b8821632864c2088777bc1b8 100644 (file)
@@ -1,6 +1,4 @@
 /* 
- * $Id$
- *
  * Display the outbound SMTP queue
  */
 
@@ -178,12 +176,12 @@ void display_smtpqueue_inner_div(void) {
        Buf = NewStrBufPlain(HKEY("__CitadelSMTPspoolout__"));
        gotoroom(Buf);
        FreeStrBuf(&Buf);
-       if (!strcasecmp(ChrPtr(WCC->wc_roomname), "__CitadelSMTPspoolout__")) {
+       if (!strcasecmp(ChrPtr(WCC->CurRoom.name), "__CitadelSMTPspoolout__")) {
 
                Stat.maxload = 10000;
                Stat.lowest_found = (-1);
                Stat.highest_found = (-1);
-               num_msgs = load_msg_ptrs("MSGS ALL", &Stat);
+               num_msgs = load_msg_ptrs("MSGS ALL", &Stat, NULL);
                if (num_msgs > 0) {
                         wc_printf("<table class=\"mailbox_summary\" rules=rows "
                                "cellpadding=2 style=\"width:100%%;\">"
@@ -201,7 +199,7 @@ void display_smtpqueue_inner_div(void) {
                        wc_printf(_("Recipients"));
                        wc_printf("</i></b></td></tr>\n");
 
-                       for (i=0; i<num_msgs; ++i) {
+                       for (i=0; (i < num_msgs) && (i < Stat.maxload); ++i) {
                                Msg = GetMessagePtrAt(i, WCC->summ);
                                if (Msg != NULL) {
                                        display_queue_msg(Msg->msgnum);
@@ -241,8 +239,7 @@ void display_smtpqueue(void)
 
        wc_printf("<div id=\"content\" class=\"service\">\n");
 
-       wc_printf("<div class=\"fix_scrollbar_bug\">"
-               "<table class=\"smtpqueue_background\">"
+       wc_printf("<table class=\"smtpqueue_background\">"
                "<tr><td valign=top>\n");
 
        wc_printf("<div id=\"smtpqueue_inner_div\">"
@@ -251,7 +248,7 @@ void display_smtpqueue(void)
                "<div align=\"center\">"
                "<a href=\"javascript:RefreshSMTPqueueDisplay();\">%s</a>"
                "</div>"
-               "</td></tr></table></div>\n", _("Refresh this page")
+               "</td></tr></table>\n", _("Refresh this page")
        );
 
        StrBufAppendPrintf(WC->trailing_javascript, "RefreshSMTPqueueDisplay();\n");