* LDAP wasn't exposed that way for a long time; TODO: does this way still represent...
authorWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 16:57:04 +0000 (16:57 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 16:57:04 +0000 (16:57 +0000)
webcit/serv_func.c
webcit/static/t/aide/siteconfig/tab_directory.html

index 83f841555770bd72c810a1693777642bd823fd78..ae13798a65198dc9dfc5442b3a8be0214d3e3dbd 100644 (file)
@@ -662,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;
@@ -759,6 +767,7 @@ 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: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);
index eb3857270e4bbae0421048c505cc0db9564a1f68..b3b10e10b56b9231d19ddc2a3476ec1a72cd26d4 100644 (file)
@@ -1,7 +1,7 @@
 <div class="conftitle"><?_("Configure the LDAP connector for Citadel")></div>
 
-<??("COND:SUBST", 1, "SERV:LDAP_SUPP", "1")><div class="confdescr"><?_("Changes made on this screen will not take effect until you restart the Citadel server.")></div><??("X", 1)>
-<?!("COND:SUBST", 2, "SERV:LDAP_SUPP", "1")><div class="confdescr"><?_("NOTE: This Citadel server has been built without LDAP support.  These options will have no effect.")></div><??("X", 2)>
+<??("COND:SERV:LDAP_ENABLED", 1)><div class="confdescr"><?_("Changes made on this screen will not take effect until you restart the Citadel server.")></div><??("X", 1)>
+<?!("COND:SERV:LDAP_ENABLED", 2)><div class="confdescr"><?_("NOTE: This Citadel server has been built without LDAP support.  These options will have no effect.")></div><??("X", 2)>
 
 <hr>
 <table border="0">