From: Ryo C. <ry...@il...> - 2003-12-15 09:25:48
|
Changes have been incorporated into CVS code. Thanks, Ryo On 11/18/2003, "Jeroen Nijhof" <jn...@ni...> wrote: > >Hi, > >I'm using the stable release 0.8.10 and using a pop3 server. >The inbox view didn't show if a message contain an attachment. >So I did a little debuging and I see that ctype is missing in pop3.inc, >this is the code what fixed this problem: > >diff -urN >/home/jnijhof/webmail/IlohaMail-0.8.10/IlohaMail/include/pop3.inc >pop3.inc >--- /home/jnijhof/webmail/IlohaMail-0.8.10/IlohaMail/include/pop3.inc >2003-07-11 00:03:05.000000000 +0200 >+++ pop3.inc 2003-11-18 14:38:51.000000000 +0100 >@@ -51,6 +51,7 @@ > var $messageID; > var $size; > var $encoding; >+ var $ctype; > var $flags; > var $timestamp; > var $seen; >@@ -558,6 +559,7 @@ > $result[$id]->cc = $header_fields["cc"]; > $result[$id]->messageID = >substr(substr($header_fields["message-id"], 1), 0, >strlen($header_fields["message-id"])-2); > $result[$id]->encoding = >$header_fields["content-transfer-encoding"]; >+ $result[$id]->ctype = $header_fields["content-type"]; > > //echo "[".microtime().":filled]<br>n"; flush(); > } > > >And for a better check of attachments I used this preg_match: >why? because multipart can be multipart/alternative and that's not really >an attachment but a choise between html and plain text. So I checked on >multipart/mixed. > > >diff -urN >/home/jnijhof/webmail/IlohaMail-0.8.10/IlohaMail/source/main.php main.php >--- /home/jnijhof/webmail/IlohaMail-0.8.10/IlohaMail/source/main.php >2003-08-30 03:52:48.000000000 +0200 >+++ main.php 2003-11-18 14:44:48.000000000 +0100 >@@ -593,7 +593,7 @@ > > //attachments? > $row["a"] = "<td>"; >- if >(preg_match("/multipart/i", $header->ctype)==TRUE){ >+ if >(preg_match("/multipart/m/i", $header->ctype)==TRUE){ > $row["a"].= "<img >src="themes/".$my_prefs["theme"]."/images/att.gif">"; > } > $row["a"].= "</td>n"; > > > >With kind regards, > > Jeroen Nijhof > > > > >------------------------------------------------------- >This SF. Net email is sponsored by: GoToMyPC >GoToMyPC is the fast, easy and secure way to access your computer from >any Web browser or wireless device. Click here to Try it Free! >https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl >_______________________________________________ >Ilohamail-devel mailing list >Ilo...@li... >https://lists.sourceforge.net/lists/listinfo/ilohamail-devel |