]> code.citadel.org Git - citadel.git/blobdiff - webcit/listsub.c
New global variable 'site_prefix' which replaces the often-repeated code which constr...
[citadel.git] / webcit / listsub.c
index 01a567bd6466fc3aa29387667126234a1affff37..c59cae348e29eec6582ae59a964b256ef76c3ec2 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: listsub.c 8232 2010-01-14 21:46:39Z dothebart $
- *
  * Web forms for handling mailing list subscribe/unsubscribe requests.
  */
 
@@ -48,20 +46,20 @@ void do_listsub(void)
        wc_printf("<div align=center>");
        wc_printf("<table border=0 width=75%%><tr><td>");
 
-       svput("BOXTITLE", WCS_STRING, _("List subscribe/unsubscribe"));
-       do_template("beginboxx", NULL);
+       do_template("beginbox_1", NULL);
+       StrBufAppendBufPlain(WC->WBuf, _("List subscribe/unsubscribe"), -1, 0);
+       do_template("beginbox_2", NULL);
        wc_printf("<div align=center><br>");
 
        /*
         * Subscribe command
         */
        if (!strcasecmp(cmd, "subscribe")) {
-               serv_printf("SUBS subscribe|%s|%s|%s|%s://%s/listsub",
+               serv_printf("SUBS subscribe|%s|%s|%s|%s/listsub",
                        room,
                        email,
                        subtype,
-                       (is_https ? "https" : "http"),
-                           ChrPtr(WC->Hdr->HR.http_host)
+                       ChrPtr(site_prefix)
                );
                serv_getln(buf, sizeof buf);
                if (buf[0] == '2') {
@@ -98,11 +96,10 @@ void do_listsub(void)
         * Unsubscribe command
         */
        else if (!strcasecmp(cmd, "unsubscribe")) {
-               serv_printf("SUBS unsubscribe|%s|%s|%s://%s/listsub",
-                           room,
-                           email,
-                           (is_https ? "https" : "http"),
-                           ChrPtr(WC->Hdr->HR.http_host)
+               serv_printf("SUBS unsubscribe|%s|%s|%s/listsub",
+                       room,
+                       email,
+                       ChrPtr(site_prefix)
                );
                serv_getln(buf, sizeof buf);
                if (buf[0] == '2') {