X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fopenid.c;h=ca71d6793c51ab72ebae517599022a92d599e618;hb=HEAD;hp=987ab0cf51449c87b8d237bafb6e595a5f183a7b;hpb=64ef1d438d5ee853b598c4e762498e4bc7f1e22f;p=citadel.git diff --git a/webcit/openid.c b/webcit/openid.c index 987ab0cf5..b56c01c24 100644 --- a/webcit/openid.c +++ b/webcit/openid.c @@ -1,23 +1,17 @@ /* - * Copyright (c) 1996-2011 by the citadel.org team + * 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 as - * published by the Free Software Foundation; either version 3 of the - * License, or (at your option) any later version. + * 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. - * - * 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" + /* * Display the OpenIDs associated with an account @@ -30,9 +24,9 @@ void display_openids(void) output_headers(1, 1, 1, 0, 0, 0); - do_template("beginbox_1"); + do_template("box_begin_1"); StrBufAppendBufPlain(WCC->WBuf, _("Manage Account/OpenID Associations"), -1, 0); - do_template("beginbox_2"); + do_template("box_begin_2"); if (WCC->serv_info->serv_supports_openid) { @@ -68,7 +62,7 @@ void display_openids(void) wc_printf(_("%s does not permit authentication via OpenID."), ChrPtr(WCC->serv_info->serv_humannode)); } - do_template("endbox"); + do_template("box_end"); wDumpContent(2); } @@ -111,14 +105,14 @@ void openid_attach(void) { * 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();