expireage problem w/Mhonarc 2.1.0

1997-09-30 14:58:15
-- Ref Post on Fri, 13 Jun 1997 17:40:00 -0700 From: Earl Hood --


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.


Paul J. Sala                ||  Email: psala(_at_)btv(_dot_)ibm(_dot_)com
IBM Microelectronics        ||  Phone: (802) 769-8823 (t/l 446)

<Prev in Thread] Current Thread [Next in Thread>
  • expireage problem w/Mhonarc 2.1.0, Paul J. Sala <=