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

Merge branch 'dd_msg_reader_update_attributes_expanded_fields_error_fix' into 'master'

DDMsgReader: Fix for "Message header has 'expanded fields'" error when updating message header attributes in certain conditions

See merge request !317
parents 85076da0 cd51f57e
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!317DDMsgReader: Fix for "Message header has 'expanded fields'" error when updating message header attributes in certain conditions
......@@ -138,6 +138,9 @@
* 2023-08-16 Eric Oulashin Version 1.75
* Made some changes to allow easy searching of personal email with
* command-line arguments.
* 2023-08-18 Eric Oulashin Version 1.76
* Fix for "Message header has 'expanded fields'" error when updating message
* header attributes in certain conditions
*/
 
"use strict";
......@@ -244,8 +247,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
 
 
// Reader version information
var READER_VERSION = "1.75";
var READER_DATE = "2023-08-16";
var READER_VERSION = "1.76";
var READER_DATE = "2023-08-18";
 
// Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24);
......@@ -1747,43 +1750,43 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply,
var applyAttr = (typeof(pApply) === "boolean" ? pApply : true);
var subCode = (typeof(pSubBoardCode) === "string" ? pSubBoardCode : this.subBoardCode);
var writeHdrToMsgbase = (typeof(pWriteHdrToMsgbase) === "boolean" ? pWriteHdrToMsgbase : true);
var msgbase = new MsgBase(subCode);
var continueOn = true;
if (writeHdrToMsgbase)
continueOn = msgbase.open();
if (continueOn)
if (this.msgSearchHdrs.hasOwnProperty(subCode))
{
if (this.msgSearchHdrs.hasOwnProperty(subCode))
var msgNum = pMsgIndex + 1;
if (typeof(pAttrib) != "undefined")
{
var msgNum = pMsgIndex + 1;
if (typeof(pAttrib) != "undefined")
if (this.msgSearchHdrs[this.subBoardCode].indexed.hasOwnProperty(pMsgIndex))
{
if (this.msgSearchHdrs[this.subBoardCode].indexed.hasOwnProperty(pMsgIndex))
if (applyAttr)
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr | pAttrib;
else
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr ^ pAttrib;
if (writeHdrToMsgbase)
{
if (applyAttr)
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr | pAttrib;
else
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr ^ pAttrib;
if (writeHdrToMsgbase)
{
var msgOffsetFromHdr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].offset;
msgbase.put_msg_header(true, msgOffsetFromHdr, this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex]);
}
// Using applyAttrsInMsgHdrInMessagbase(), which loads the header without
// expanded fields and saves the attributes with that header.
var msgNumFromHdr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].number;
applyAttrsInMsgHdrInMessagbase(pSubBoardCode, msgNumFromHdr, this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr);
}
}
else
}
else
{
var msgHeader = this.GetMsgHdrByIdx(pMsgIndex);
if (this.msgSearchHdrs[this.subBoardCode].indexed.hasOwnProperty(pMsgIndex))
{
var msgHeader = this.GetMsgHdrByIdx(pMsgIndex);
if (this.msgSearchHdrs[this.subBoardCode].indexed.hasOwnProperty(pMsgIndex))
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex] = msgHeader;
if (writeHdrToMsgbase)
{
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex] = msgHeader;
if (writeHdrToMsgbase)
var msgbase = new MsgBase(subCode);
if (msgbase.open())
{
msgbase.put_msg_header(true, msgHeader.offset, msgHeader);
msgbase.close();
}
}
}
}
if (writeHdrToMsgbase)
msgbase.close();
}
}
 
......
Digital Distortion Message Reader
Version 1.75
Release date: 2023-08-16
Version 1.76
Release date: 2023-08-18
by
......
......@@ -5,6 +5,8 @@ Revision History (change log)
=============================
Version Date Description
------- ---- -----------
1.76 2023-08-18 Fix for "Message header has 'expanded fields'" error when
updating message header attributes in certain conditions
1.75 2023-08-16 Made some changes to allow easy searching of personal
email with command-line arguments.
1.74 2023-04-29 Settings for users being able to read deleted messages now
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment