Fix for broken msgs?
This commit is contained in:
parent
69897e7955
commit
c5b754e135
@ -301,7 +301,12 @@ struct msg_headers *read_message_headers(int msgconf, int msgarea, struct user_r
|
||||
if (jamm->subject == NULL) {
|
||||
jamm->subject = strdup("(No Subject)");
|
||||
}
|
||||
|
||||
if (jamm->from == NULL) {
|
||||
jamm->from = strdup("(No Sender)");
|
||||
}
|
||||
if (jamm->to == NULL) {
|
||||
jamm->to = strdup("(No Recipient)");
|
||||
}
|
||||
if (jmh.Attribute & JAM_MSG_PRIVATE) {
|
||||
if (!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) &&
|
||||
!msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) &&
|
||||
|
@ -403,6 +403,14 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
subject = strdup("(No Subject)");
|
||||
}
|
||||
|
||||
if (from == NULL) {
|
||||
from = strdup("(No Sender)");
|
||||
}
|
||||
|
||||
if (to == NULL) {
|
||||
to = strdup("(No Recipient)");
|
||||
}
|
||||
|
||||
if (jmh.Attribute & JAM_MSG_PRIVATE) {
|
||||
if (!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) &&
|
||||
!msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) &&
|
||||
@ -485,7 +493,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
|
||||
len += strlen(buffer);
|
||||
|
||||
from_s = www_sanitize(from);
|
||||
if (conf.mail_conferences[conference]->mail_areas[area]->type != TYPE_LOCAL_AREA) {
|
||||
if (conf.mail_conferences[conference]->mail_areas[area]->type != TYPE_LOCAL_AREA && oaddress != NULL) {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s (%s)</div>\n", from_s, oaddress);
|
||||
} else {
|
||||
sprintf(buffer, "<div class=\"msg-view-from\">From: %s</div>\n", from_s);
|
||||
|
Reference in New Issue
Block a user