]> code.citadel.org Git - citadel.git/blobdiff - webcit/netconf.c
* put filename reference into token, so we can put in errormessages where we wouldn...
[citadel.git] / webcit / netconf.c
index e152800f5bd7091315d465f3700e999126c0fa30..67195404683dba3a0b5226ddfd1ebd1bd201395f 100644 (file)
@@ -81,7 +81,7 @@ void SerializeNode(NodeConf *Node, StrBuf *Buf)
 }
 
 
-HashList *load_netconf(WCTemplateToken *Token)
+HashList *load_netconf(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
        StrBuf *Buf;
        HashList *Hash;
@@ -183,7 +183,7 @@ void edit_node(void) {
                        return;
                }
                        
-               NodeConfig = load_netconf(NULL);
+               NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
                Put(NodeConfig, ChrPtr(Index), StrLength(Index), NewNode, DeleteNodeConf);
                save_net_conf(NodeConfig);
                DeleteHash(&NodeConfig);
@@ -282,7 +282,7 @@ void display_edit_node(void)
                return;
        }
 
-       NodeConfig = load_netconf(NULL);
+       NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
        if (!GetHash(NodeConfig, ChrPtr(Index), StrLength(Index), &vNode) || 
            (vNode == NULL)) {
                sprintf(WC->ImportantMessage, _("Invalid Parameter"));
@@ -477,7 +477,7 @@ void delete_node(void)
                return;
        }
 
-       NodeConfig = load_netconf(NULL);
+       NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
        if (!GetHash(NodeConfig, ChrPtr(Index), StrLength(Index), &vNode) || 
            (vNode == NULL)) {
                sprintf(WC->ImportantMessage, _("Invalid Parameter"));
@@ -540,6 +540,6 @@ InitModule_NETCONF
        WebcitAddUrlHandler(HKEY("display_confirm_delete_node"), display_confirm_delete_node, 0);
        WebcitAddUrlHandler(HKEY("delete_node"), delete_node, 0);
        WebcitAddUrlHandler(HKEY("display_add_node"), display_add_node, 0);
-       RegisterIterator("NODECONFIG", 0, NULL, load_netconf, NodeCfgSubst, DeleteHash);
+       RegisterIterator("NODECONFIG", 0, NULL, load_netconf, NodeCfgSubst, DeleteHash, CTX_NODECONF, CTX_NONE);
 }
 /*@}*/