]> code.citadel.org Git - citadel.git/blobdiff - webcit/openid.c
move beginbox & endbox to box_* so we can tidy up our static/t/ directory a little...
[citadel.git] / webcit / openid.c
index 8ab2cb4ced73fe0f28d83569a228c47363e8e530..316859f8bef3e39764986a2c76883cb4e88a10eb 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 1996-2011 by the citadel.org team
+ *
+ * This program is open source software.  You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
 
 #include "webcit.h"
 #include "webserver.h"
@@ -13,9 +30,9 @@ void display_openids(void)
 
        output_headers(1, 1, 1, 0, 0, 0);
 
-       do_template("beginbox_1", NULL);
+       do_template("box_begin_1");
        StrBufAppendBufPlain(WCC->WBuf, _("Manage Account/OpenID Associations"), -1, 0);
-       do_template("beginbox_2", NULL);
+       do_template("box_begin_2");
 
        if (WCC->serv_info->serv_supports_openid) {
 
@@ -26,7 +43,7 @@ void display_openids(void)
                if (buf[0] == '1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                        bg = 1 - bg;
                        wc_printf("<tr class=\"%s\">", (bg ? "even" : "odd"));
-                       wc_printf("<td><img src=\"static/openid-small.gif\"></td><td>");
+                       wc_printf("<td><img src=\"static/webcit_icons/openid-small.gif\"></td><td>");
                        escputs(buf);
                        wc_printf("</td><td>");
                        wc_printf("<a href=\"openid_detach?id_to_detach=");
@@ -51,7 +68,7 @@ void display_openids(void)
                wc_printf(_("%s does not permit authentication via OpenID."), ChrPtr(WCC->serv_info->serv_humannode));
        }
 
-       do_template("endbox", NULL);
+       do_template("box_end");
        wDumpContent(2);
 }
 
@@ -67,7 +84,7 @@ void openid_attach(void) {
                syslog(LOG_DEBUG, "Attempting to attach %s\n", bstr("openid_url"));
 
                snprintf(buf, sizeof buf,
-                       "OIDS %s|%s/finalize_openid_login|%s",
+                       "OIDS %s|%s/finalize_openid_login?attach_existing=1|%s",
                        bstr("openid_url"),
                        ChrPtr(site_prefix),
                        ChrPtr(site_prefix)