New global variable 'site_prefix' which replaces the often-repeated code which constr...
[citadel.git] / webcit / openid.c
index e58382d42d238c049e59c0599bb91cc38ef6d16d..8842e88102549f3f214d7d480a58a05a2417c917 100644 (file)
@@ -66,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);