phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bug #4224] Cache causes header/body misalignment


From: nobody
Subject: [Phpgroupware-tracker] [bug #4224] Cache causes header/body misalignment.
Date: Mon, 07 Jul 2003 12:02:51 -0400
User-agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)

=================== BUG #4224: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4224&group_id=509

Submitted by: dhouston                Project: phpGroupWare                 
Submitted on: Mon 07/07/2003 at 16:02
Category:  email                      Bug Group:  0.9.16 pre RC             
Severity:  5 - Major                  Priority:  None                       
Resolution:  None                     Assigned to:  None                    
Status:  Open                         Component Version:  None              
Platform Version:  None               Reproducibility:  Every Time          

Summary:  Cache causes header/body misalignment.

Original Submission:  A user was finding old emails listed in his inbox, but 
when he clicked on them to view them, different email bodies were being 
displayed. I figured out at last that because he uses groupware from home but 
Outlook from work to check email, his Outlook sometimes deletes messages 
without (of course) updating the gw cache.  So old subjects/headers are listed 
in the cache and are displayed when the inbox is displayed in gw.  When you 
click on a message, if a message exists corresponding to the position of the 
message clicked on (that is, if there are three cached message headers and 
there are two messages actually in the inbox and you happen to click on the 
first or the second listed), its body will be displayed, resulting in 
mismatched information.  The best solution I can think of for the time being is 
to delete the mail cache upon logging into groupware.  This causes a new cache 
to be built based on what's on the server and prevents this displaying of old 
mail and the misalignment of headers/bodies.  I added the following function to 
class.mail_msg_wrappers.inc.php:

                @function clear_cache
                @abstract ?
                */
                function clear_cache()
                {
                        $account_id = 
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
                        $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_anglemail "
                                . " WHERE account_id=" . 
$account_id,__LINE__,__FILE__);
                }

and the following code to login.php just after the session has been created:

                        $m=CreateObject('email.mail_msg');
                        if(!is_object($m)){ print "Error."; }
                        $m->clear_cache();

This seems to have solved the problem.



No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4224&group_id=509

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]