[dev] Problems with the new IMP_Message functions

Chuck Hagenbuch chuck@horde.org
Wed, 19 Jun 2002 12:59:21 -0400


Quoting Michael M Slusarz <slusarz@bigworm.colorado.edu>:

> OK - I see.  This was intentional - all the nits the old code had _should_
> still be valid with the new code.  There is a lot of duplicate/excess 
> coding there, and a reason why I wanted to put it all in the same place. I
> will go through the new code though and verify that all these cases are 
> being handled.

Great. Btw, I have no problem with the organization; it's great to have 
less duplicate code. But the loss of distinction between message.php and 
mailbox.php is a bit messy.

> This was actually very buggy for me - cases where I would use to delete
> the last 2 messages in a mailbox would dump me to an error screen about 
> an undefined array index.  I didn't want to go through the present code 
> and figure out the problem - I thought a much better solution would be to
> code it better (going by the mantra: don't complain, fix.)  

Sure. But, for the record, I didn't see these errors. And when you re-sort 
the mailbox in the base case (no hide deleted, no pop3, no trash folder), 
you can do really screwy things, like ending up on the same message even 
though you really did increment the array index, because of new messages. 
It's cleaner to just show the user the new messages once they get back to 
the inbox, unless they come neatly at the end of the set.

> I'm starting to finally get really familiar with all this code does, so 
> that should help things out.

Great!

Thanks for all your work, btw - I'm picking at the nits, but overall all of 
this is fabulous.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in 
the arms of silence. All we ever have is here, now." - Ursula K. Le Guin