X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsieve.c;h=6b7279365e5285ec1f675cfc092567ae2b7ca4a1;hb=6776b151a7d7932247dad4c1395ba7ca8c4c1d53;hp=15412e0f8d5a760e78ed2a6e5f5afd4f05ba0c48;hpb=f8deef0ab66aa9961243f3e4d3eb7df4ece2f316;p=citadel.git diff --git a/webcit/sieve.c b/webcit/sieve.c index 15412e0f8..6b7279365 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -564,8 +564,10 @@ HashList *GetSieveScriptListing(StrBuf *Target, WCTemplputParams *TP) ++num_scripts; } } - if ((num_scripts > 0) && (rules_script_active == 0)) + + if ((num_scripts > 0) && (rules_script_active == 0)) { PutBstr(HKEY("__SIEVE:EXTERNAL_SCRIPT"), NewStrBufPlain(HKEY("1"))); + } if (num_scripts > have_rules_script) { @@ -585,18 +587,14 @@ HashList *GetSieveScriptListing(StrBuf *Target, WCTemplputParams *TP) { Ruleset = (SieveListing *) vRuleset; - /* - * its the webcit rule? we don't need to load that here. - */ - if (Ruleset->IsRulesScript) - continue; + // FIXME add logic to skip if it's the webcit generated script - if (!serv_printf("MSIV getscript|%s", ChrPtr(Ruleset->Name))) - break; + serv_printf("MSIV getscript|%s", ChrPtr(Ruleset->Name)); StrBuf_ServGetln(Line); if (GetServerStatus(Line, NULL) == 1) { Ruleset->Content = NewStrBuf(); + Done = 0; while(!Done && (rc = StrBuf_ServGetln(Line), rc >= 0) ) if ( (StrLength(Line)==3) && !strcmp(ChrPtr(Line), "000"))