]> code.citadel.org Git - citadel.git/blobdiff - webcit/serv_func.c
* LDAP wasn't exposed that way for a long time; TODO: does this way still represent...
[citadel.git] / webcit / serv_func.c
index 1069858e5cba8790404ea69bfd02a5167547f24c..ae13798a65198dc9dfc5442b3a8be0214d3e3dbd 100644 (file)
@@ -182,7 +182,6 @@ int GetConnected (void)
                WCC->connected = 1;
                StrBuf_ServGetln(Buf);  /* get the server greeting */
                short_status = GetServerStatus(Buf, &Status);
-               lprintf(9, "\033[32mGREETING: %s\033[0m\n", ChrPtr(Buf));
                FreeStrBuf(&Buf);
 
                /* Server isn't ready for us? */
@@ -201,6 +200,8 @@ int GetConnected (void)
                        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,
@@ -661,6 +662,14 @@ int conditional_serv_fulltext_enabled(StrBuf *Target, WCTemplputParams *TP)
        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;
@@ -757,7 +766,8 @@ InitModule_SERVFUNC
 
        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);