Hi all,

my users report me, that they have some amount of non read mails in
folder view, but they can't see them in message list.

I found out that messages without MESSAGE-ID, so i made small
modification which use rand() id for such messages. I'm not sure, if
it is possible, maybe there should be some better value then rand().
If you know which, tell me.

Some time ago I reported that messages without subject aren't
displayed and it was corrected, but in threaded view, there is
another problem. If message subject is only Re: or Fwd: and it will
be truncated after some regexp mainupulations. So... subject will be
empty also if it contains only 'Re:' and so on.

I corrected both problems, here is patch (i'll commit it to cvs as
soon as it will start to work).

-- 
 .''`. Ondra 'Kepi' Kudlik
: :' : Debian GNU/Linux User
`. `'
  `-   http://www.nosoftwarepatents.com/cz/m/intro/index.html 

--- include/imap.inc    2005-11-14 19:50:43.000000000 +0100
+++ include/imap.inc.new        2005-10-30 00:39:15.000000000 +0200
@@ -967,7 +967,6 @@
                                }while($line[0]!=')');
                                $new_thhd->sbj = $new['SUBJECT'];
                                $new_thhd->mid = substr($new['MESSAGE-ID'], 1, 
-1);
-                               if ( Empty($new_thhd->mid) ) $new_thhd->mid = 
rand();
                                $new_thhd->irt = substr($new['IN-REPLY-TO'], 1, 
-1);
                                
                                $result[$uids[$new_thhd->id]] = $new_thhd;
@@ -1041,12 +1040,11 @@
                if ($has_re||$new['IN-REPLY-TO']) $sbj_pre = 'RE:';
                
                /* strip out 're:', 'fw:' etc */
-               $oldsbj=$sbj;
                if ($has_re) $sbj = ereg_replace($sbj_filter_pat,'', 
$new['SUBJECT']);
                else $sbj = $new['SUBJECT'];
-               if ( Empty($sbj) ) $sbj = $oldsbj;
                $new['SUBJECT'] = $sbj_pre.$sbj;
                
+               
                /* if subject not a known thread-root, add to list */
                if ($debug) echo $id.' 
'.$new['SUBJECT']."\t".$new['MESSAGE-ID']."\n";
                $root_id = $roots[$sbj];

Attachment: pgp6ul59Uu9bq.pgp
Description: PGP signature

Reply via email to