]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
* fix COND:PREFS
[citadel.git] / webcit / context_loop.c
index 45113cbc52fc48ff291c6f572d6764a3e0d456f8..4cf0b5bfee7ee265d8444d283bec75d3e1ec5b79 100644 (file)
@@ -390,6 +390,7 @@ void context_loop(int *sock)
        /** Begin parsing the request. */
 #ifdef TECH_PREVIEW
        if ((strncmp(req->line+4, "/sslg", 5) != 0) &&
+           (strncmp(req->line+4, "/static/", 8) != 0) &&
            (strncmp(req->line+4, "/wholist_section", 16) != 0)) {
 #endif
                lprintf(5, "HTTP: %s\n", buf);
@@ -552,3 +553,17 @@ void context_loop(int *sock)
        
        
 }
+
+void tmpl_nonce(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context)
+{
+       struct wcsession *WCC = WC;
+       StrBufAppendPrintf(Target, "%ld",
+                          (WCC != NULL)? WCC->nonce:0);                   
+}
+
+void 
+InitModule_CONTEXT
+(void)
+{
+       RegisterNamespace("NONCE", 0, 0, tmpl_nonce);
+}