Oops, forgot newline
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 25 Mar 2012 13:27:47 +0000 (15:27 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 25 Mar 2012 13:27:47 +0000 (15:27 +0200)
webcit/serv_func.c

index a6c41f711e858a9ec61cc87c88570d2d3cba6450..0158ca1fbc2b6f93a19779c29cd3333f5ce277f4 100644 (file)
@@ -624,6 +624,14 @@ int conditional_serv_newuser_disabled(StrBuf *Target, WCTemplputParams *TP)
        return WCC->serv_info->serv_newuser_disabled != 0;
 }
 
+int conditional_serv_supports_guest(StrBuf *Target, WCTemplputParams *TP)                                                                                                                                       
+{
+       wcsession *WCC = WC;
+        if (WCC->serv_info == NULL)
+               return 0;
+        return WCC->serv_info->serv_supports_guest != 0;
+}
+
 int conditional_serv_supports_openid(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
@@ -746,6 +754,7 @@ InitModule_SERVFUNC
        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);
+        RegisterConditional(HKEY("COND:SERV:SUPPORTS_GUEST"), 2, conditional_serv_supports_guest, 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);