]> code.citadel.org Git - citadel.git/blobdiff - webcit/inetconf.c
* add transitional beginboxx template and move some places to the new syntax
[citadel.git] / webcit / inetconf.c
index f865e7607fd9311df66604310591850584dbed34..191f90e76787a6b3525f6893654446c411d90869 100644 (file)
@@ -103,14 +103,14 @@ void display_inetconf(void)
        wprintf("<div id=\"content\" class=\"service\">\n");
 
        wprintf("<div class=\"fix_scrollbar_bug\">"
-               "<table border=0 width=100%% cellspacing=\"10px\" cellpadding=\"10px\"> "
+               "<table border=0 width=100%% cellspacing=\"10\" cellpadding=\"10\"> "
                "<tr><td valign=top width=50%%>\n");
        for (which=0; which<ic_max; ++which) {
                if (which == (ic_max / 2)) {
                        wprintf("</td><td valign=top>");
                }
                svput("BOXTITLE", WCS_STRING, ic_boxtitle[which]);
-               do_template("beginbox", NULL);
+               do_template("beginboxx", NULL);
                wprintf("<span class=\"menudesc\">");
                escputs(ic_desc[which]);
                wprintf("</span><br />");
@@ -386,17 +386,17 @@ void InetCfgSubst(StrBuf *TemplBuffer, void *vContext, WCTemplateToken *Token)
        SVPutBuf("SERVCFG:INET:HOSTNAME", vContext, 1);
 }
 
-void DeleteInectConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType)
+void DeleteInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType)
 {
        struct wcsession *WCC = WC;
-       if (WCC->InetCfg == NULL)
-               load_inetconf();
-       DeleteHash(&WCC->InetCfg);
+
+       if (WCC->InetCfg != NULL)
+               DeleteHash(&WCC->InetCfg);
 
 }
 
 
-HashList *GetInetConfHash(WCTemplateToken *Token)
+HashList *GetInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
        struct wcsession *WCC = WC;
        void *vHash;
@@ -404,10 +404,10 @@ HashList *GetInetConfHash(WCTemplateToken *Token)
        if (WCC->InetCfg == NULL)
                load_inetconf();
        GetHash(WCC->InetCfg, 
-               Token->Params[2]->Start, 
-               Token->Params[2]->len,
+               Tokens->Params[2]->Start, 
+               Tokens->Params[2]->len,
                &vHash);
-       svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, Token->Params[2]->Start);
+       svprintf(HKEY("SERVCFG:INET:TYPE"), WCS_STRING, Tokens->Params[2]->Start);
        return vHash;
 }
 
@@ -417,6 +417,6 @@ InitModule_INETCONF
 {
        WebcitAddUrlHandler(HKEY("display_inetconf"), display_inetconf, 0);
        WebcitAddUrlHandler(HKEY("save_inetconf"), new_save_inetconf, AJAX);
-       RegisterIterator("SERVCFG:INET", 1, NULL, GetInetConfHash, InetCfgSubst, NULL, CTX_INETCFG);
-       RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInectConfHash, CTX_INETCFG);
+       RegisterIterator("SERVCFG:INET", 1, NULL, GetInetConfHash, InetCfgSubst, NULL, CTX_INETCFG, CTX_NONE);
+       RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInetConfHash, CTX_NONE);
 }