-- Ref Post on Fri, 13 Jun 1997 17:40:00 -0700 From: Earl Hood --
Earl,
After investigating several methods of fixing this problem, I've chosen
one. Which turns out to be the simplest, only 3 lines of additional code.
Here it is:
-------------------------------------------------------------------------
## Remove old message if hit maximum size or expiration
if (!$IDXONLY && (($MAXSIZE && ($NumOfMsgs > $MAXSIZE)) ||
$ExpireTime || $ExpireDateTime)) {
$TmpSUBSORT = $SUBSORT; #PJS HACK - save SUBSORT setting
$SUBSORT = 0; #PJS HACK - set SUBSORT Off
if ($REVSORT) {
@array = reverse &sort_messages();
}
else {
@array = &sort_messages();
}
$SUBSORT= $TmpSUBSORT; #PJS HACK - restore SUBSORT to orig setting
-----------------------------------------------------------------------------
Just before mhonarc loads the @array from the DB, I set SUBSORT to OFF.
Thus the array is loaded in order of date and now when mhonarc parses thru
the @array for expired messages the DB will be in the proper order
needed for the EXPIRAGE function to work. When Expirage checking is done, I
restore SUBSORT var to it's original setting, thus as mhonarc completes
it's processing the archive is left sorted in the order the user
had requested.
Regards..............Paul
---------------------------------------------------------------
Paul J. Sala || Email: psala(_at_)btv(_dot_)ibm(_dot_)com
IBM Microelectronics || Phone: (802) 769-8823 (t/l 446)