Skip to content
Snippets Groups Projects
Commit 9d849b88 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_msg_reader_search_msgbase_msgtext_undefined_fix' into 'master'

DDMsgReader: Fix for msgText being undefined when doing a message search

See merge request !439
parents c90edc6e 16a27e56
Branches
Tags
2 merge requests!455Update branch with changes from master,!439DDMsgReader: Fix for msgText being undefined when doing a message search
......@@ -19675,6 +19675,8 @@ function searchMsgbase(pSubCode, pSearchType, pSearchString, pListingPersonalEma
{
matchFn = function(pSearchStr, pMsgHdr, pMsgBase, pSubBoardCode) {
var msgText = strip_ctrl(pMsgBase.get_msg_body(false, pMsgHdr.number, false, false, true, true));
if (typeof(msgText) !== "string")
msgText = "";
return gAllPersonalEmailOptSpecified || msgIsFromUser(pMsgHdr, pUserNum);
}
}
......@@ -19683,6 +19685,8 @@ function searchMsgbase(pSubCode, pSearchType, pSearchString, pListingPersonalEma
// We're reading mail to the user
matchFn = function(pSearchStr, pMsgHdr, pMsgBase, pSubBoardCode) {
var msgText = strip_ctrl(pMsgBase.get_msg_body(false, pMsgHdr.number, false, false, true, true));
if (typeof(msgText) !== "string")
msgText = "";
var msgMatchesCriteria = (gAllPersonalEmailOptSpecified || msgIsToUserByNum(pMsgHdr, pUserNum));
// If only new/unread personal email is to be displayed, then check
// that the message has not been read.
......@@ -19697,6 +19701,8 @@ function searchMsgbase(pSubCode, pSearchType, pSearchString, pListingPersonalEma
getAllMsgHdrs = true;
matchFn = function(pSearchStr, pMsgHdr, pMsgBase, pSubBoardCode) {
var msgText = strip_ctrl(pMsgBase.get_msg_body(false, pMsgHdr.number, false, false, true, true));
if (typeof(msgText) !== "string")
msgText = "";
var keywordFound = ((pMsgHdr.subject.toUpperCase().indexOf(pSearchStr) > -1) || (msgText.toUpperCase().indexOf(pSearchStr) > -1));
if (pSubBoardCode == "mail")
return keywordFound && msgIsToUserByNum(pMsgHdr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment