]> code.citadel.org Git - citadel.git/blobdiff - webcit/notes.c
* copy daves great handler script and modify it to fit the simpler needs of webcit.
[citadel.git] / webcit / notes.c
index 1945ae72a915f2e075cd48bd73afe7d3399b0b67..497251d3997c81e25e910e207b0e8c2aa9b42075 100644 (file)
@@ -272,7 +272,7 @@ void ajax_update_note(void) {
        // Was this request a delete operation?  If so, nuke it...
        if (havebstr("deletenote")) {
                if (!strcasecmp(bstr("deletenote"), "yes")) {
-                       serv_printf("DELE %ld", msgnum);
+                       serv_printf("DELE %d", msgnum);
                        serv_getln(buf, sizeof buf);
                        begin_ajax_response();
                        wprintf("%s", buf);
@@ -379,3 +379,11 @@ void add_new_note(void) {
        
        readloop("readfwd");
 }
+
+void 
+InitModule_NOTES
+(void)
+{
+       WebcitAddUrlHandler(HKEY("add_new_note"), add_new_note, 0);
+       WebcitAddUrlHandler(HKEY("ajax_update_note"), ajax_update_note, 0);
+}