+/*
+ * Copyright (c) 1996-2012 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, version 3.
+ *
+ * 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.
+ */
#include "webcit.h"
#include "webserver.h"
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) {
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=");
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);
}
* Detach an OpenID from the currently logged-in account
*/
void openid_detach(void) {
- char buf[1024];
+ StrBuf *Line;
if (havebstr("id_to_detach")) {
serv_printf("OIDD %s", bstr("id_to_detach"));
- serv_getln(buf, sizeof buf);
- if (buf[0] != '2') {
- strcpy(WC->ImportantMessage, &buf[4]);
- }
+ Line = NewStrBuf();
+ StrBuf_ServGetln(Line);
+ GetServerStatusMsg(Line, NULL, 1, 2);
+ FreeStrBuf(&Line);
}
display_openids();