From: Art Cancro Date: Thu, 15 Mar 2012 21:55:47 +0000 (-0400) Subject: Remove the old queue view and migrate the new one to the override_room_banner logic X-Git-Tag: v8.11~127^2~17 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d1c9cc5e3f2f2bd20c6a3a9e047e6ee6051b9d2c Remove the old queue view and migrate the new one to the override_room_banner logic --- diff --git a/webcit/smtpqueue.c b/webcit/smtpqueue.c index b03c4e0dc..b059ff905 100644 --- a/webcit/smtpqueue.c +++ b/webcit/smtpqueue.c @@ -162,112 +162,6 @@ void display_queue_msg(long msgnum) } -void display_smtpqueue_inner_div(void) { - message_summary *Msg = NULL; - wcsession *WCC = WC; - int i; - int num_msgs; - StrBuf *Buf; - SharedMessageStatus Stat; - - memset(&Stat, 0, sizeof(SharedMessageStatus)); - /* Check to see if we can go to the __CitadelSMTPspoolout__ room. - * If not, we don't have access to the queue. - */ - Buf = NewStrBufPlain(HKEY("__CitadelSMTPspoolout__")); - gotoroom(Buf); - FreeStrBuf(&Buf); - 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|0|1", "SUBJ|;QMSG", &Stat, NULL); - num_msgs = load_msg_ptrs("MSGS ", NULL, &Stat, NULL); - if (num_msgs > 0) { - wc_printf("" - ); - - wc_printf("\n"); - - for (i=0; (i < num_msgs) && (i < Stat.maxload); ++i) { - Msg = GetMessagePtrAt(i, WCC->summ); - if (Msg != NULL) { - display_queue_msg(Msg->msgnum); - } - } - - wc_printf("
"); - wc_printf(_("Message ID")); - wc_printf(""); - wc_printf(_("Date/time submitted")); - wc_printf(""); - wc_printf(_("Last attempt")); - wc_printf(""); - wc_printf(_("Sender")); - wc_printf(""); - wc_printf(_("Recipients")); - wc_printf("
"); - - } - else { - wc_printf("

"); - wc_printf(_("The queue is empty.")); - wc_printf("


"); - } - } - else { - wc_printf("

"); - wc_printf(_("You do not have permission to view this resource.")); - wc_printf("


"); - } - output_headers(0, 0, 0, 0, 0, 0); - end_burst(); -} - -/* - * display the outbound SMTP queue - */ -void display_smtpqueue(void) -{ - output_headers(1, 1, 2, 0, 0, 0); - - wc_printf("
\n"); - wc_printf("

"); - wc_printf(_("View the outbound SMTP queue")); - wc_printf("

\n"); - wc_printf("
\n"); - - wc_printf("
\n"); - - wc_printf("" - "
\n"); - - wc_printf("
" - "
" - "
" - "
" - "%s" - "
" - "
\n", _("Refresh this page") - ); - - StrBufAppendPrintf(WC->trailing_javascript, "RefreshSMTPqueueDisplay();\n"); - - wDumpContent(1); - -} - - - - - - - - - - typedef struct _mailq_entry { StrBuf *Recipient; StrBuf *StatusMessage; @@ -572,14 +466,7 @@ ServerStartModule_SMTP_QUEUE int qview_PrintPageHeader(SharedMessageStatus *Stat, void **ViewSpecific) { - if (!WC->is_aide) - { - output_headers(1, 1, 1, 0, 0, 0); - } - else - { - output_headers(1, 1, 2, 0, 0, 0); - } + output_headers(1, 1, 1, 0, 0, 0); return 0; } @@ -658,12 +545,7 @@ InitModule_SMTP_QUEUE RegisterQItemHandler(HKEY("bounceto"), QItem_Handle_BounceTo); RegisterQItemHandler(HKEY("source_room"), QItem_Handle_SenderRoom); RegisterQItemHandler(HKEY("submitted"), QItem_Handle_Submitted); - - WebcitAddUrlHandler(HKEY("display_smtpqueue"), "", 0, display_smtpqueue, 0); - WebcitAddUrlHandler(HKEY("display_smtpqueue_inner_div"), "", 0, display_smtpqueue_inner_div, 0); RegisterMimeRenderer(HKEY("application/x-citadel-delivery-list"), render_QUEUE, 1, 9000); - - RegisterNamespace("MAILQ:ID", 0, 0, tmplput_MailQID, NULL, CTX_MAILQITEM); RegisterNamespace("MAILQ:PAYLOAD:ID", 0, 0, tmplput_MailQPayloadID, NULL, CTX_MAILQITEM); RegisterNamespace("MAILQ:BOUNCETO", 0, 1, tmplput_MailQBounceTo, NULL, CTX_MAILQITEM); diff --git a/webcit/static/t/aide/global_config.html b/webcit/static/t/aide/global_config.html index 891c7ec2d..fe06f7c4d 100644 --- a/webcit/static/t/aide/global_config.html +++ b/webcit/static/t/aide/global_config.html @@ -2,5 +2,5 @@
  • -
  • +
  • diff --git a/webcit/static/t/view_mailq/header.html b/webcit/static/t/view_mailq/header.html index 9a57e9a9f..d028db9dd 100644 --- a/webcit/static/t/view_mailq/header.html +++ b/webcit/static/t/view_mailq/header.html @@ -1,4 +1,4 @@ -