we need to create the rules hash regardles of the server reply; this fixes the broken...
[citadel.git] / webcit / sieve.c
index f50fc20dc98e9431e1ea220c73922403a4803ce5..8cf76e459a2b6fc85f7f2cd5a080aa9214e31c2e 100644 (file)
@@ -378,8 +378,7 @@ void save_sieve(void) {
        char buf[256];
 
        if (!havebstr("save_button")) {
-               strcpy(WC->ImportantMessage,
-                       _("Cancelled.  Changes were not saved."));
+               AppendImportantMessage(_("Cancelled.  Changes were not saved."), -1);
                display_main_menu();
                return;
        }
@@ -435,7 +434,7 @@ void save_sieve(void) {
                }
        }
 
-       strcpy(WC->ImportantMessage, _("Your changes have been saved."));
+       AppendImportantMessage(_("Your changes have been saved."), -1);
        display_main_menu();
        return;
 }
@@ -1529,14 +1528,13 @@ HashList *GetSieveRules(StrBuf *Target, WCTemplputParams *TP)
        int Done = 0;
        SieveRule *Rule;
 
+       SieveRules = NewHash(1, Flathash);
        serv_printf("MSIV getscript|"RULES_SCRIPT);
        Line = NewStrBuf();
        EncodedRule = NewStrBuf();
        StrBuf_ServGetln(Line);
        if (GetServerStatus(Line, NULL) == 1) 
        {
-               SieveRules = NewHash(1, Flathash);
-
                while(!Done && (StrBuf_ServGetln(Line) >= 0) )
                        if ( (StrLength(Line)==3) && 
                             !strcmp(ChrPtr(Line), "000"))