]> code.citadel.org Git - citadel.git/blobdiff - webcit/addressbook_popup.c
* follow api-change in several places
[citadel.git] / webcit / addressbook_popup.c
index 9ad632ecaa9104e7e9375016f85b7f61a8e539b3..3cb23ebddbd3366b2b4c947cf73fd5f4f5dc16f2 100644 (file)
@@ -28,6 +28,7 @@ void display_address_book_middle_div(void) {
        char buf[256];
        long len;
        char *Name;
+       const char *VCName;
        void *Namee;
        StrBuf *DefAddrBook;
        HashList *List;
@@ -66,8 +67,8 @@ void display_address_book_middle_div(void) {
        }
 
        SortByHashKey(List, 1);
-       it = GetNewHashPos();
-       while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
+       it = GetNewHashPos(List, 0);
+       while (GetNextHashPos(List, it, &len, &VCName, &Namee)) {
                wprintf("<option value=\"");
                urlescputs((char*)Namee);
                if (strcmp(ChrPtr(DefAddrBook), Namee) == 0)
@@ -87,9 +88,8 @@ void display_address_book_middle_div(void) {
                "><img src=\"static/closewindow.gif\">");
        wprintf("</td></tr></table>");
 
-       wprintf("<script type=\"text/javascript\">"
-               "PopulateAddressBookInnerDiv($('which_addr_book').value,'%s');"
-               "</script>\n",
+       StrBufAppendPrintf(WC->trailing_javascript,
+               "PopulateAddressBookInnerDiv($('which_addr_book').value,'%s');",
                bstr("target_input")
        );
 
@@ -108,6 +108,7 @@ void display_address_book_inner_div() {
        char target_label[64];
        long len;
        char *Name;
+       const char *VCName;
        void *Namee;
        HashList *List;
        HashPos  *it;
@@ -134,8 +135,8 @@ void display_address_book_inner_div() {
 
                }
                SortByHashKey(List, 1);
-               it = GetNewHashPos();
-               while (GetNextHashPos(List, it, &len, &Name, &Namee)) {
+               it = GetNewHashPos(List, 0);
+               while (GetNextHashPos(List, it, &len, &VCName, &Namee)) {
                        wprintf("<option value=\"");
                        escputs((char*)Namee);
                        wprintf("\">");
@@ -159,8 +160,8 @@ void display_address_book_inner_div() {
 
                }
                SortByHashKey(List, 1);
-               it = GetNewHashPos();
-               while (GetNextHashPos(List, it, &len, &Name, (void**)&Namee)) {
+               it = GetNewHashPos(List, 0);
+               while (GetNextHashPos(List, it, &len, &VCName, (void**)&Namee)) {
                        wprintf("<option value=\"");
                        escputs((char*)Namee);
                        wprintf("\">");