/*
* This module dumps and/or loads the Citadel database in XML format.
*
- * Copyright (c) 1987-2020 by the citadel.org team
+ * Copyright (c) 1987-2021 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.
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
+#include <time.h>
#include <sys/wait.h>
#include <string.h>
#include <ctype.h>
#include "euidindex.h"
#include "ctdl_module.h"
-#define END_OF_MESSAGE "---eom---dbd---"
-
char migr_tempfilename1[PATH_MAX];
char migr_tempfilename2[PATH_MAX];
FILE *migr_global_message_list;
int total_msgs = 0;
char *ikey = NULL; // If we're importing a config key we store it here.
-
/******************************************************************************
* Code which implements the export appears in this section *
******************************************************************************/
cprintf("<u_msgnum_pic>%ld</u_msgnum_pic>\n", u.msgnum_pic);
cprintf("<u_emailaddrs>%s</u_emailaddrs>\n", u.emailaddrs);
cprintf("<u_msgnum_inboxrules>%ld</u_msgnum_inboxrules>\n", u.msgnum_inboxrules);
+ cprintf("<u_lastproc_inboxrules>%ld</u_lastproc_inboxrules>\n", u.lastproc_inboxrules);
client_write(HKEY("</user>\n"));
}
/* Ok, here we go ... */
- msg = CtdlFetchMessage(msgnum, 1, 0);
+ msg = CtdlFetchMessage(msgnum, 1);
if (msg == NULL) return; /* fail silently */
client_write(HKEY("<message>\n"));
if (Ctx->kill_me == 0) migr_export_visits();
cprintf("<progress>%d</progress>\n", 25);
if (Ctx->kill_me == 0) migr_export_messages();
- client_write(HKEY("</citadel_migrate_data>\n"));
cprintf("<progress>%d</progress>\n", 100);
+ client_write(HKEY("</citadel_migrate_data>\n"));
client_write(HKEY("000\n"));
Ctx->dont_term = 0;
}
else if (!strcasecmp(el, "u_msgnum_pic")) usbuf.msgnum_pic = atol(ChrPtr(migr_chardata));
else if (!strcasecmp(el, "u_emailaddrs")) safestrncpy(usbuf.emailaddrs, ChrPtr(migr_chardata), sizeof usbuf.emailaddrs);
else if (!strcasecmp(el, "u_msgnum_inboxrules")) usbuf.msgnum_inboxrules = atol(ChrPtr(migr_chardata));
+ else if (!strcasecmp(el, "u_lastproc_inboxrules")) usbuf.lastproc_inboxrules = atol(ChrPtr(migr_chardata));
else return 0;
return 1;
}
/* Ok, here we go ... */
- msg = CtdlFetchMessage(msgnum, 1, 0);
+ msg = CtdlFetchMessage(msgnum, 1);
if (msg == NULL) {
return 1;
}