}
-HashList *iterate_load_userlist(WCTemplateToken *Token)
+HashList *iterate_load_userlist(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
{
HashList *Hash;
char buf[SIZ];
}
/** If there's no vcard, create one */
- if (vcard_msgnum < 0) if (already_tried_creating_one == 0) {
+ if ((vcard_msgnum < 0) && (already_tried_creating_one == 0)) {
already_tried_creating_one = 1;
serv_puts("ENT0 1|||4");
serv_getln(buf, sizeof buf);
}
else {
UL = NewUserListOneEntry(Buf);
- output_headers(1, 0, 0, 0, 1, 0);
- DoTemplate(HKEY("userlist_detailview"), NULL, (void*) UL, CTX_USERLIST);
- end_burst();
+ if (havebstr("edit_abe_button")) {
+ display_edit_address_book_entry(username, UL->UID);
+ }
+ else if (havebstr("delete_button")) {
+ delete_user(username);
+ }
+ else {
+ output_headers(1, 0, 0, 0, 1, 0);
+ DoTemplate(HKEY("userlist_detailview"), NULL, (void*) UL, CTX_USERLIST);
+ end_burst();
+ }
+ DeleteUserListEntry(UL);
}
FreeStrBuf(&Buf);
RegisterConditional(HKEY("COND:USERACCESS"), 0, ConditionalUserAccess, CTX_USERLIST);
RegisterConditional(HKEY("COND:USERLIST:FLAG:USE_INTERNET"), 0, ConditionalFlagINetEmail, CTX_USERLIST);
- RegisterIterator("USERLIST", 0, NULL, iterate_load_userlist, NULL, DeleteHash, CTX_USERLIST);
+ RegisterIterator("USERLIST", 0, NULL, iterate_load_userlist, NULL, DeleteHash, CTX_USERLIST, CTX_NONE);
}