final touches on dkim test harness
[citadel.git] / webcit / openid.c
index 987ab0cf51449c87b8d237bafb6e595a5f183a7b..b56c01c2418b82e8ba2812dde0467062598a54b7 100644 (file)
@@ -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();