/*
- * $Id$
- *
* Implements the message store.
*
* Copyright (c) 1987-2010 by the citadel.org team
return;
}
- cprintf("%ld|%s|%ld\n",
+ cprintf("%ld|%s|%s\n",
msgnum,
(msg->cm_fields['E'] ? msg->cm_fields['E'] : ""),
- msg->cm_fields['T']);
+ (msg->cm_fields['T'] ? msg->cm_fields['T'] : "0"));
CtdlFreeMessage(msg);
}
* Retrieve the "seen" message list for the current room.
*/
void CtdlGetSeen(char *buf, int which_set) {
- struct visit vbuf;
+ visit vbuf;
/* Learn about the user and room in question */
CtdlGetRelationship(&vbuf, &CC->user, &CC->room);
int was_seen = 0;
long lo = (-1L);
long hi = (-1L);
- struct visit vbuf;
+ visit vbuf;
long *msglist;
int num_msgs = 0;
StrBuf *vset;
{
int a, i, j;
- struct visit vbuf;
+ visit vbuf;
struct cdbdata *cdbfr;
long *msglist = NULL;
int num_msgs = 0;
char search_string[1024];
ForEachMsgCallback CallBack;
+ if (CtdlAccessCheck(ac_logged_in_or_guest)) return;
+
extract_token(which, cmdbuf, 0, '|', sizeof which);
cm_ref = extract_int(cmdbuf, 1);
extract_token(search_string, cmdbuf, 1, '|', sizeof search_string);
else
mode = MSGS_ALL;
- if ((!(CC->logged_in)) && (!(CC->internal_pgm))) {
- cprintf("%d not logged in\n", ERROR + NOT_LOGGED_IN);
- return;
- }
-
if ( (mode == MSGS_SEARCH) && (!config.c_enable_fulltext) ) {
cprintf("%d Full text index is not enabled on this server.\n",
ERROR + CMD_NOT_SUPPORTED);
const char *nl /* string to terminate lines with */
) {
int column = 0;
- char ch = 0;
+ unsigned char ch = 0;
char outbuf[1024];
int len = 0;
int nllen = 0;
if (!mptr) return;
nllen = strlen(nl);
- while (ch=*(mptr++), ch > 0) {
+ while (ch=*(mptr++), ch != 0) {
if (ch == '\n') {
client_write(outbuf, len);
}
}
}
+ else if (i == 'K') {
+ cprintf("Reply-To: <%s>%s", mptr, nl);
+ }
if (mptr != mpptr)
free (mptr);
}
struct addresses_to_be_filed *aptr = NULL;
StrBuf *saved_rfc822_version = NULL;
int qualified_for_journaling = 0;
- CitContext *CCC = CC; /* CachedCitContext - performance boost */
+ CitContext *CCC = MyContext();
char bounce_to[1024] = "";
size_t tmp = 0;
int rv = 0;
}
/* return our Subversion id for the Log */
- return "$Id$";
+ return "msgbase";
}