]> code.citadel.org Git - citadel.git/blobdiff - webcit/openid.c
New global variable 'site_prefix' which replaces the often-repeated code which constr...
[citadel.git] / webcit / openid.c
index b489a55c484af1ba6124e4aefb31bb6e7b244e68..8842e88102549f3f214d7d480a58a05a2417c917 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * $Id$
- */
 
 #include "webcit.h"
 #include "webserver.h"
@@ -18,8 +15,9 @@ void display_openids(void)
 
        wc_printf("<div class=\"fix_scrollbar_bug\">");
 
-       svput("BOXTITLE", WCS_STRING, _("Manage Account/OpenID Associations"));
-       do_template("beginboxx", NULL);
+       do_template("beginbox_1", NULL);
+       StrBufAppendBufPlain(WCC->WBuf, _("Manage Account/OpenID Associations"), -1, 0);
+       do_template("beginbox_2", NULL);
 
        if (WCC->serv_info->serv_supports_openid) {
 
@@ -68,15 +66,14 @@ void openid_attach(void) {
        char buf[4096];
 
        if (havebstr("attach_button")) {
-               wcsession *WCC = WC;
 
                lprintf(CTDL_DEBUG, "Attempting to attach %s\n", bstr("openid_url"));
 
                snprintf(buf, sizeof buf,
-                        "OIDS %s|%s://%s/finalize_openid_login|%s://%s",
-                        bstr("openid_url"),
-                        (is_https ? "https" : "http"), ChrPtr(WCC->Hdr->HR.http_host),
-                        (is_https ? "https" : "http"), ChrPtr(WCC->Hdr->HR.http_host)
+                       "OIDS %s|%s/finalize_openid_login|%s",
+                       bstr("openid_url"),
+                       ChrPtr(site_prefix),
+                       ChrPtr(site_prefix)
                );
 
                serv_puts(buf);