return 1;
}
+ /* 2010jun03: every now and then the connection to Citadel dies before this point. why? */
+
/*
* From what host is our user connecting? Go with
* the host at the other end of the HTTP socket,
}
locate_host(WCC->Hdr->HR.browser_host, WCC->Hdr->http_sock);
}
- if (WCC->serv_info == NULL)
+ if (WCC->serv_info == NULL) {
WCC->serv_info = get_serv_info(WCC->Hdr->HR.browser_host, WCC->Hdr->HR.user_agent);
+ }
if (WCC->serv_info == NULL){
begin_burst();
wc_printf(_("Received unexpected answer from Citadel server; bailing out."));
return WCC->serv_info->serv_fulltext_enabled != 0;
}
+int conditional_serv_ldap_enabled(StrBuf *Target, WCTemplputParams *TP)
+{
+ wcsession *WCC = WC;
+ if (WCC->serv_info == NULL)
+ return 0;
+ return WCC->serv_info->serv_supports_ldap != 0;
+}
+
void tmplput_serv_bbs_city(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
RegisterConditional(HKEY("COND:SERV:OPENID"), 2, conditional_serv_supports_openid, CTX_NONE);
RegisterConditional(HKEY("COND:SERV:NEWU"), 2, conditional_serv_newuser_disabled, CTX_NONE);
- RegisterConditional(HKEY("COND:SERV:HAVEFULLTEXT"), 2, conditional_serv_fulltext_enabled, CTX_NONE);
+ RegisterConditional(HKEY("COND:SERV:FULLTEXT_ENABLED"), 2, conditional_serv_fulltext_enabled, CTX_NONE);
+ RegisterConditional(HKEY("COND:SERV:LDAP_ENABLED"), 2, conditional_serv_ldap_enabled, CTX_NONE);
RegisterNamespace("SERV:PID", 0, 0, tmplput_serv_ip, NULL, CTX_NONE);
RegisterNamespace("SERV:NODENAME", 0, 1, tmplput_serv_nodename, NULL, CTX_NONE);
RegisterNamespace("SERV:HUMANNODE", 0, 1, tmplput_serv_humannode, NULL, CTX_NONE);