From: Art Cancro Date: Wed, 16 May 2012 16:26:50 +0000 (-0400) Subject: Call LoadExpirePolicy() unconditionally, this fixes the apparent snap back to old... X-Git-Tag: v8.11~16 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=329fae6737e16938ee440d79bc89a03e4eb5268c Call LoadExpirePolicy() unconditionally, this fixes the apparent snap back to old config when room/floor policy is changed --- diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 915097814..7a93d44af 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -74,7 +74,7 @@ int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP) which = GetTemplateTokenNumber(Target, TP, 2, 0); CompareWith = GetTemplateTokenNumber(Target, TP, 3, 0); - if (WCC->Policy[which].loaded == 0) LoadExpirePolicy(which); + LoadExpirePolicy(which); return WCC->Policy[which].expire_mode == CompareWith; } @@ -85,7 +85,7 @@ void tmplput_ExpireValue(StrBuf *Target, WCTemplputParams *TP) wcsession *WCC = WC; which = GetTemplateTokenNumber(Target, TP, 0, 0); - if (WCC->Policy[which].loaded == 0) LoadExpirePolicy(which); + LoadExpirePolicy(which); StrBufAppendPrintf(Target, "%d", WCC->Policy[which].expire_value); } @@ -96,7 +96,7 @@ void tmplput_ExpireMode(StrBuf *Target, WCTemplputParams *TP) wcsession *WCC = WC; which = GetTemplateTokenNumber(Target, TP, 2, 0); - if (WCC->Policy[which].loaded == 0) LoadExpirePolicy(which); + LoadExpirePolicy(which); StrBufAppendPrintf(Target, "%d", WCC->Policy[which].expire_mode); } @@ -259,8 +259,10 @@ void load_siteconfig(void) } FreeStrBuf(&Buf); - LoadExpirePolicy(sitepolicy); + LoadExpirePolicy(roompolicy); + LoadExpirePolicy(floorpolicy); LoadExpirePolicy(mailboxespolicy); + LoadExpirePolicy(sitepolicy); }