* add a Display name to our handlers; this will be used by DAV handlers.
[citadel.git] / webcit / useredit.c
index 1396fdebcccc8dae409b69d712a3e8b59e875d8a..09d10898743c82e5840e893d558252b5662868aa 100644 (file)
@@ -419,12 +419,18 @@ long locate_user_vcard_in_this_room(message_summary **VCMsg, wc_mime_attachment
        int already_tried_creating_one = 0;
        StrBuf *FoundCharset = NewStrBuf();
        StrBuf *Error = NULL;
+       SharedMessageStatus Stat;
+
 
        Buf = NewStrBuf();
 TRYAGAIN:
+       memset(&Stat, 0, sizeof(SharedMessageStatus));
+       Stat.maxload = 10000;
+       Stat.lowest_found = (-1);
+       Stat.highest_found = (-1);
        Done = 0;
        /* Search for the user's vCard */
-       if (load_msg_ptrs("MSGS ALL||||1", 1, NULL, NULL) > 0) {
+       if (load_msg_ptrs("MSGS ALL||||1", &Stat) > 0) {
                at = GetNewHashPos(WCC->summ, 0);
                while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
                        Msg = (message_summary*) vMsg;          
@@ -719,23 +725,23 @@ void
 InitModule_USEREDIT
 (void)
 {
-       WebcitAddUrlHandler(HKEY("select_user_to_edit"), _select_user_to_edit, 0);
-       WebcitAddUrlHandler(HKEY("display_edituser"), _display_edituser, 0);
-       WebcitAddUrlHandler(HKEY("edituser"), edituser, 0);
-       WebcitAddUrlHandler(HKEY("create_user"), create_user, 0);
-
-       RegisterNamespace("USERLIST:USERNAME",      0, 1, tmplput_USERLIST_UserName, CTX_USERLIST);
-       RegisterNamespace("USERLIST:PASSWD",        0, 1, tmplput_USERLIST_Password, CTX_USERLIST);
-       RegisterNamespace("USERLIST:ACCLVLNO",      0, 0, tmplput_USERLIST_AccessLevelNo, CTX_USERLIST);
-       RegisterNamespace("USERLIST:ACCLVLSTR",     0, 0, tmplput_USERLIST_AccessLevelStr, CTX_USERLIST);
-       RegisterNamespace("USERLIST:UID",           0, 0, tmplput_USERLIST_UID, CTX_USERLIST);
-       RegisterNamespace("USERLIST:LASTLOGON:STR", 0, 0, tmplput_USERLIST_LastLogonStr, CTX_USERLIST);
-       RegisterNamespace("USERLIST:LASTLOGON:NO",  0, 0, tmplput_USERLIST_LastLogonNo, CTX_USERLIST);
-       RegisterNamespace("USERLIST:NLOGONS",       0, 0, tmplput_USERLIST_nLogons, CTX_USERLIST);
-       RegisterNamespace("USERLIST:NPOSTS",        0, 0, tmplput_USERLIST_nPosts, CTX_USERLIST);
+       WebcitAddUrlHandler(HKEY("select_user_to_edit"), "", 0, _select_user_to_edit, 0);
+       WebcitAddUrlHandler(HKEY("display_edituser"), "", 0, _display_edituser, 0);
+       WebcitAddUrlHandler(HKEY("edituser"), "", 0, edituser, 0);
+       WebcitAddUrlHandler(HKEY("create_user"), "", 0, create_user, 0);
+
+       RegisterNamespace("USERLIST:USERNAME",      0, 1, tmplput_USERLIST_UserName, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:PASSWD",        0, 1, tmplput_USERLIST_Password, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:ACCLVLNO",      0, 0, tmplput_USERLIST_AccessLevelNo, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:ACCLVLSTR",     0, 0, tmplput_USERLIST_AccessLevelStr, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:UID",           0, 0, tmplput_USERLIST_UID, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:LASTLOGON:STR", 0, 0, tmplput_USERLIST_LastLogonStr, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:LASTLOGON:NO",  0, 0, tmplput_USERLIST_LastLogonNo, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:NLOGONS",       0, 0, tmplput_USERLIST_nLogons, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:NPOSTS",        0, 0, tmplput_USERLIST_nPosts, NULL, CTX_USERLIST);
                                                    
-       RegisterNamespace("USERLIST:FLAGS",         0, 0, tmplput_USERLIST_Flags, CTX_USERLIST);
-       RegisterNamespace("USERLIST:DAYSTILLPURGE", 0, 0, tmplput_USERLIST_DaysTillPurge, CTX_USERLIST);
+       RegisterNamespace("USERLIST:FLAGS",         0, 0, tmplput_USERLIST_Flags, NULL, CTX_USERLIST);
+       RegisterNamespace("USERLIST:DAYSTILLPURGE", 0, 0, tmplput_USERLIST_DaysTillPurge, NULL, CTX_USERLIST);
 
        RegisterConditional(HKEY("COND:USERNAME"),  0,    ConditionalUser, CTX_USERLIST);
        RegisterConditional(HKEY("COND:USERACCESS"), 0,   ConditionalUserAccess, CTX_USERLIST);