* put is_https into a COND:IS_HTTPS
authorWilfried Göesgens <willi@citadel.org>
Sat, 27 Feb 2010 23:17:19 +0000 (23:17 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 27 Feb 2010 23:17:19 +0000 (23:17 +0000)
webcit/webcit.c

index faf3d746201816cf0ea64c0e3111f9ee376dd93e..292b12567e61f2deabd16d5128a6263d78e18789 100644 (file)
@@ -764,6 +764,10 @@ void sleeeeeeeeeep(int seconds)
        select(0, NULL, NULL, NULL, &tv);
 }
 
+int Conditional_IS_HTTPS(StrBuf *Target, WCTemplputParams *TP)
+{
+       return is_https != 0;
+}
 
 int ConditionalImportantMesage(StrBuf *Target, WCTemplputParams *TP)
 {
@@ -822,6 +826,7 @@ InitModule_WEBCIT
        WebcitAddUrlHandler(HKEY("401"), "", 0, authorization_required, ANONYMOUS|COOKIEUNNEEDED);
        RegisterConditional(HKEY("COND:IMPMSG"), 0, ConditionalImportantMesage, CTX_NONE);
        RegisterConditional(HKEY("COND:REST:DEPTH"), 0, Conditional_REST_DEPTH, CTX_NONE);
+       RegisterConditional(HKEY("COND:IS_HTTPS"), 0, Conditional_IS_HTTPS, CTX_NONE);
 
        RegisterNamespace("CSSLOCAL", 0, 0, tmplput_csslocal, NULL, CTX_NONE);
        RegisterNamespace("IMPORTANTMESSAGE", 0, 0, tmplput_importantmessage, NULL, CTX_NONE);