Skip to content
Snippets Groups Projects
Commit cd51f57e authored by Eric Oulashin's avatar Eric Oulashin
Browse files

DDMsgReader: Fix for "Message header has 'expanded fields'" error when...

DDMsgReader: Fix for "Message header has 'expanded fields'" error when updating message header attributes in certain conditions
parent 85076da0
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
Pipeline #4647 passed
...@@ -138,6 +138,9 @@ ...@@ -138,6 +138,9 @@
* 2023-08-16 Eric Oulashin Version 1.75 * 2023-08-16 Eric Oulashin Version 1.75
* Made some changes to allow easy searching of personal email with * Made some changes to allow easy searching of personal email with
* command-line arguments. * 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"; "use strict";
...@@ -244,8 +247,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a'); ...@@ -244,8 +247,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
   
   
// Reader version information // Reader version information
var READER_VERSION = "1.75"; var READER_VERSION = "1.76";
var READER_DATE = "2023-08-16"; var READER_DATE = "2023-08-18";
   
// Keyboard key codes for displaying on the screen // Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24); var UP_ARROW = ascii(24);
...@@ -1747,12 +1750,6 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply, ...@@ -1747,12 +1750,6 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply,
var applyAttr = (typeof(pApply) === "boolean" ? pApply : true); var applyAttr = (typeof(pApply) === "boolean" ? pApply : true);
var subCode = (typeof(pSubBoardCode) === "string" ? pSubBoardCode : this.subBoardCode); var subCode = (typeof(pSubBoardCode) === "string" ? pSubBoardCode : this.subBoardCode);
var writeHdrToMsgbase = (typeof(pWriteHdrToMsgbase) === "boolean" ? pWriteHdrToMsgbase : true); 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; var msgNum = pMsgIndex + 1;
...@@ -1766,8 +1763,10 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply, ...@@ -1766,8 +1763,10 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply,
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr ^ pAttrib; this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].attr ^ pAttrib;
if (writeHdrToMsgbase) if (writeHdrToMsgbase)
{ {
var msgOffsetFromHdr = this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex].offset; // Using applyAttrsInMsgHdrInMessagbase(), which loads the header without
msgbase.put_msg_header(true, msgOffsetFromHdr, this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex]); // 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);
} }
} }
} }
...@@ -1778,12 +1777,16 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply, ...@@ -1778,12 +1777,16 @@ function DigDistMsgReader_RefreshSearchResultMsgHdr(pMsgIndex, pAttrib, pApply,
{ {
this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex] = msgHeader; this.msgSearchHdrs[this.subBoardCode].indexed[pMsgIndex] = msgHeader;
if (writeHdrToMsgbase) if (writeHdrToMsgbase)
{
var msgbase = new MsgBase(subCode);
if (msgbase.open())
{
msgbase.put_msg_header(true, msgHeader.offset, msgHeader); msgbase.put_msg_header(true, msgHeader.offset, msgHeader);
msgbase.close();
}
} }
} }
} }
if (writeHdrToMsgbase)
msgbase.close();
} }
} }
   
......
Digital Distortion Message Reader Digital Distortion Message Reader
Version 1.75 Version 1.76
Release date: 2023-08-16 Release date: 2023-08-18
by by
......
...@@ -5,6 +5,8 @@ Revision History (change log) ...@@ -5,6 +5,8 @@ Revision History (change log)
============================= =============================
Version Date Description 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 1.75 2023-08-16 Made some changes to allow easy searching of personal
email with command-line arguments. email with command-line arguments.
1.74 2023-04-29 Settings for users being able to read deleted messages now 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.
Please register or to comment