*
* 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"
#include "calendar.h"
-
+CtxType CTX_VCARD = CTX_NONE;
ConstStr VCStr [] = {
{HKEY("n")}, /* N is name, but only if there's no FN already there */
void tmplput_VCARD_ITEM(StrBuf *Target, WCTemplputParams *TP)
{
- HashList *VC = CTX;
+ HashList *VC = CTX(CTX_VCARD);
eVC evc;
void *vStr;
wc_mime_attachment *VCAtt,
const char *return_to,
const char *force_room) {
+ wcsession *WCC = WC;
message_summary *Msg = NULL;
wc_mime_attachment *VCMime = NULL;
struct vCard *v;
escputs(force_room);
wc_printf("\">\n");
}
+ else
+ {
+ wc_printf("<input type=\"hidden\" name=\"go\" value=\"");
+ StrEscAppend(WCC->WBuf, WCC->CurRoom.name, NULL, 0, 0);
+ wc_printf("\">\n");
+ }
wc_printf("<table class=\"vcard_edit_background\"><tr><td>\n");
}
Buf = NewStrBuf();
- serv_write(HKEY("ENT0 1|||4||||||1\n"));
+ serv_write(HKEY("ENT0 1|||4\n"));
if (!StrBuf_ServGetln(Buf) && (GetServerStatus(Buf, NULL) != 4))
{
edit_vcard();
serv_write(HKEY("000\n"));
free(serialized_vcard);
- StrBuf_ServGetln(Buf);
-
if (!strcmp(bstr("return_to"), "select_user_to_edit")) {
select_user_to_edit(NULL);
}
InitModule_VCARD
(void)
{
+ RegisterCTX(CTX_VCARD);
RegisterReadLoopHandlerset(
VIEW_ADDRESSBOOK,
vcard_GetParamsGetServerCall,