]> 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 1a6b992e451566a309ebb34c754a8c5084afd86b..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.
  */
 
@@ -57,12 +55,11 @@ void do_listsub(void)
         * 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') {
@@ -99,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') {