Changeset 1849 in subversion
- Timestamp:
- Sep 19, 2008 12:20:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.php
r1801 r1849 1199 1199 // some servers (eg. dovecot-1.x) have no support for parameter value continuations 1200 1200 // we must fetch and parse headers "manually" 1201 //TODO: fetching headers for a second time is not effecient, this code should be moved somewhere earlier --tensor 1201 1202 if ($i<2) { 1202 1203 // TODO: fetch only Content-Type/Content-Disposition header 1203 $headers = iil_C_FetchPart Body($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id.'.HEADER');1204 $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 1204 1205 $filename_mime = ''; 1205 1206 $i = 0; … … 1217 1218 } 1218 1219 if ($i<2) { 1219 $headers = iil_C_FetchPart Body($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id.'.HEADER');1220 $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 1220 1221 $filename_encoded = ''; 1221 $i = 0; 1222 $i = 0; $matches = array(); 1222 1223 while (preg_match('/filename\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 1223 1224 $filename_encoded .= $matches[1]; … … 1233 1234 } 1234 1235 if ($i<2) { 1235 $headers = iil_C_FetchPart Body($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id.'.HEADER');1236 $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 1236 1237 $filename_mime = ''; 1237 $i = 0; 1238 $i = 0; $matches = array(); 1238 1239 while (preg_match('/\s+name\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 1239 1240 $filename_mime .= $matches[1]; … … 1249 1250 } 1250 1251 if ($i<2) { 1251 $headers = iil_C_FetchPart Body($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id.'.HEADER');1252 $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id); 1252 1253 $filename_encoded = ''; 1253 $i = 0; 1254 $i = 0; $matches = array(); 1254 1255 while (preg_match('/\s+name\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) { 1255 1256 $filename_encoded .= $matches[1];
Note: See TracChangeset
for help on using the changeset viewer.
