/*
* Administrative screen for site-wide configuration
*
- * Copyright (c) 1996-2021 by the citadel.org team
+ * Copyright (c) 1996-2024 by the citadel.org team
*
- * This program is open source software. You can redistribute it and/or
- * modify it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is open source software. Use, duplication, or disclosure
+ * are subject to the terms of the GNU General Public License version 3.
*/
#include "webcit.h"
-#include "webserver.h"
+
/*
* Expiry policy for the autopurger
{ { CStrOf(mailboxespolicy)} , { strof(mailboxespolicy)"_value", sizeof(strof(mailboxespolicy)"_value") - 1 } }
};
-void LoadExpirePolicy(GPEXWhichPolicy which)
-{
+
+void LoadExpirePolicy(GPEXWhichPolicy which) {
StrBuf *Buf;
long State;
const char *Pos = NULL;
FreeStrBuf(&Buf);
}
-void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which)
-{
+
+void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which) {
StrBuf *Buf;
long State;
FreeStrBuf(&Buf);
}
-int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP)
-{
+
+int ConditionalExpire(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
int CompareWith;
return WC->Policy[which].expire_mode == CompareWith;
}
-void tmplput_ExpireValue(StrBuf *Target, WCTemplputParams *TP)
-{
+
+void tmplput_ExpireValue(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
which = GetTemplateTokenNumber(Target, TP, 0, 0);
}
-void tmplput_ExpireMode(StrBuf *Target, WCTemplputParams *TP)
-{
+void tmplput_ExpireMode(StrBuf *Target, WCTemplputParams *TP) {
GPEXWhichPolicy which;
which = GetTemplateTokenNumber(Target, TP, 2, 0);
}
-void LoadZoneFiles(void)
-{
+void LoadZoneFiles(void) {
icalarray *zones;
int z;
long len;
{CFG_STR, 0, 0, "", HKEY("c_port_number")},
{CFG_STR, 0, 0, "", HKEY("c_ctdluid")},
{CFG_STR, 0, 0, "", HKEY("c_nntp_port")},
- {CFG_STR, 0, 0, "", HKEY("c_nntps_port")}
+ {CFG_STR, 0, 0, "", HKEY("c_nntps_port")},
+ {CFG_YES, 0, 0, "", HKEY("smtp_advertise_starttls")}
};
-
/*
* display all configuration items
*/
-void load_siteconfig(void)
-{
+void load_siteconfig(void) {
StrBuf *Buf;
HashList *Cfg;
long len;
}
-
/*
* parse siteconfig changes
*/
-void siteconfig(void)
-{
+void siteconfig(void) {
int i, value;
StrBuf *Line;
// if WebCit Classic wasn't obsolete we would replace this with a "CONF GETVAL" type of thing
-void tmplput_servcfg(StrBuf *Target, WCTemplputParams *TP)
-{
+void tmplput_servcfg(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
}
}
-int ConditionalServCfg(StrBuf *Target, WCTemplputParams *TP)
-{
+
+int ConditionalServCfg(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
else return 0;
}
-int ConditionalServCfgCTXStrBuf(StrBuf *Target, WCTemplputParams *TP)
-{
+int ConditionalServCfgCTXStrBuf(StrBuf *Target, WCTemplputParams *TP) {
void *vBuf;
StrBuf *Buf;
StrBuf *ZoneToCheck = (StrBuf*) CTX(CTX_STRBUF);
StrBufAppendTemplate(Target, TP, Stat->Name, 1);
}
+
+
int ConditionalServCfgThisLogEnabled(StrBuf *Target, WCTemplputParams *TP)
{
LogStatusStruct *Stat = (LogStatusStruct*) CTX(CTX_SRVLOG);
RegisterConditional("COND:EXPIRE:MODE", 2, ConditionalExpire, CTX_NONE);
RegisterNamespace("EXPIRE:VALUE", 1, 2, tmplput_ExpireValue, NULL, CTX_NONE);
RegisterNamespace("EXPIRE:MODE", 1, 2, tmplput_ExpireMode, NULL, CTX_NONE);
-
RegisterConditional("COND:SERVCFG:THISLOGENABLE", 4, ConditionalServCfgThisLogEnabled, CTX_SRVLOG);
RegisterIterator("SERVCFG:LOGENABLE", 0, NULL, iterate_GetSrvLogEnable, NULL, DeleteHash, CTX_SRVLOG, CTX_NONE, IT_NOFLAG);
RegisterNamespace("SERVCFG:LOGNAME", 0, 1, tmplput_servcfg_LogName, NULL, CTX_SRVLOG);