Removed an unused parameter from CtdlSubmitMsg(). Why was it even there?
[citadel.git] / citadel / modules / wiki / serv_wiki.c
index c415dd97551dbb268c17316aeb621c4a477f7e68..e5d2f545533de44f133d74e6820757ffe111bf30 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Server-side module for Wiki rooms.  This handles things like version control. 
  * 
- * Copyright (c) 2009-2017 by the citadel.org team
+ * Copyright (c) 2009-2020 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
@@ -140,7 +140,7 @@ int wiki_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) {
        /* See if we can retrieve the previous version. */
        old_msgnum = CtdlLocateMessageByEuid(msg->cm_fields[eExclusiveID], &CCC->room);
        if (old_msgnum > 0L) {
-               old_msg = CtdlFetchMessage(old_msgnum, 1, 1);
+               old_msg = CtdlFetchMessage(old_msgnum, 1);
        }
        else {
                old_msg = NULL;
@@ -221,7 +221,7 @@ int wiki_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) {
        history_msgnum = CtdlLocateMessageByEuid(history_page, &CCC->room);
        history_msg = NULL;
        if (history_msgnum > 0L) {
-               history_msg = CtdlFetchMessage(history_msgnum, 1, 1);
+               history_msg = CtdlFetchMessage(history_msgnum, 1);
        }
 
        /* Create a new history message if necessary */
@@ -352,7 +352,7 @@ int wiki_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) {
 
                CM_SetFieldLONG(history_msg, eTimestamp, Now);
        
-               CtdlSubmitMsg(history_msg, NULL, "", 0);
+               CtdlSubmitMsg(history_msg, NULL, "");
        }
        else {
                syslog(LOG_ALERT, "Empty boundary string in history message.  No history!\n");
@@ -405,7 +405,7 @@ void wiki_history(char *pagename) {
        snprintf(history_page_name, sizeof history_page_name, "%s_HISTORY_", pagename);
        msgnum = CtdlLocateMessageByEuid(history_page_name, &CC->room);
        if (msgnum > 0L) {
-               msg = CtdlFetchMessage(msgnum, 1, 1);
+               msg = CtdlFetchMessage(msgnum, 1);
        }
        else {
                msg = NULL;
@@ -537,7 +537,7 @@ void wiki_rev(char *pagename, char *rev, char *operation)
         */
        msgnum = CtdlLocateMessageByEuid(pagename, &CCC->room);
        if (msgnum > 0L) {
-               msg = CtdlFetchMessage(msgnum, 1, 1);
+               msg = CtdlFetchMessage(msgnum, 1);
        }
        else {
                msg = NULL;
@@ -571,7 +571,7 @@ void wiki_rev(char *pagename, char *rev, char *operation)
        snprintf(history_page_name, sizeof history_page_name, "%s_HISTORY_", pagename);
        msgnum = CtdlLocateMessageByEuid(history_page_name, &CCC->room);
        if (msgnum > 0L) {
-               msg = CtdlFetchMessage(msgnum, 1, 1);
+               msg = CtdlFetchMessage(msgnum, 1);
        }
        else {
                msg = NULL;
@@ -633,7 +633,7 @@ void wiki_rev(char *pagename, char *rev, char *operation)
                else if (!strcasecmp(operation, "fetch")) {
                        CM_SetField(msg, eAuthor, HKEY("Citadel"));
                        CtdlCreateRoom(wwm, 5, "", 0, 1, 1, VIEW_BBS);  /* Not an error if already exists */
-                       msgnum = CtdlSubmitMsg(msg, NULL, wwm, 0);      /* Store the revision here */
+                       msgnum = CtdlSubmitMsg(msg, NULL, wwm);         /* Store the revision here */
 
                        /*
                         * WARNING: VILE SLEAZY HACK
@@ -667,12 +667,10 @@ void wiki_rev(char *pagename, char *rev, char *operation)
                                CM_SetField(msg, eOriginalRoom, CCC->room.QRname, strlen(CCC->room.QRname));
                        }
 
-                       CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename")));
-                       
                        if (!IsEmptyStr(pagename)) {
                                CM_SetField(msg, eExclusiveID, pagename, strlen(pagename));
                        }
-                       msgnum = CtdlSubmitMsg(msg, NULL, "", 0);       /* Replace the current revision */
+                       msgnum = CtdlSubmitMsg(msg, NULL, "");          /* Replace the current revision */
                }
                else {
                        /* Theoretically it is impossible to get here, but throw an error anyway */