summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-19 19:42:11 +0000
committerthomascube <thomas@roundcube.net>2008-09-19 19:42:11 +0000
commit42e328a85f5880e3e767eebaaa88b55a2b49d2ff (patch)
treeae5269362f82288cbde67e03b10e69a6c1485df5 /program/include/rcube_imap.php
parent29111be3400bd3826f0d6f1f79c0aee935955546 (diff)
Indent with spaces not tabs. Please respect our code-style when creating patches!
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php68
1 files changed, 34 insertions, 34 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index ad56a3a74..cafe1b035 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1202,62 +1202,62 @@ class rcube_imap
if ($i<2) {
// TODO: fetch only Content-Type/Content-Disposition header
$headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id);
- $filename_mime = '';
- $i = 0;
- while (preg_match('/filename\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
- $filename_mime .= $matches[1];
- $i++;
- }
- }
+ $filename_mime = '';
+ $i = 0;
+ while (preg_match('/filename\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
+ $filename_mime .= $matches[1];
+ $i++;
+ }
}
+ }
else if (!empty($part->d_parameters['filename*0*'])) {
$i = 0;
while (isset($part->d_parameters['filename*'.$i.'*'])) {
$i++;
- $filename_encoded .= $part->d_parameters['filename*'.$i.'*'];
- }
+ $filename_encoded .= $part->d_parameters['filename*'.$i.'*'];
+ }
if ($i<2) {
$headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id);
- $filename_encoded = '';
- $i = 0; $matches = array();
- while (preg_match('/filename\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
- $filename_encoded .= $matches[1];
- $i++;
- }
- }
+ $filename_encoded = '';
+ $i = 0; $matches = array();
+ while (preg_match('/filename\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
+ $filename_encoded .= $matches[1];
+ $i++;
+ }
}
+ }
else if (!empty($part->ctype_parameters['name*0'])) {
$i = 0;
while (isset($part->ctype_parameters['name*'.$i])) {
$i++;
$filename_mime .= $part->ctype_parameters['name*'.$i];
- }
+ }
if ($i<2) {
$headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id);
- $filename_mime = '';
- $i = 0; $matches = array();
- while (preg_match('/\s+name\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
- $filename_mime .= $matches[1];
- $i++;
- }
- }
+ $filename_mime = '';
+ $i = 0; $matches = array();
+ while (preg_match('/\s+name\*'.$i.'\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
+ $filename_mime .= $matches[1];
+ $i++;
+ }
}
+ }
else if (!empty($part->ctype_parameters['name*0*'])) {
$i = 0;
while (isset($part->ctype_parameters['name*'.$i.'*'])) {
$i++;
$filename_encoded .= $part->ctype_parameters['name*'.$i.'*'];
- }
+ }
if ($i<2) {
$headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $part->mime_id);
- $filename_encoded = '';
- $i = 0; $matches = array();
- while (preg_match('/\s+name\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
- $filename_encoded .= $matches[1];
- $i++;
- }
- }
+ $filename_encoded = '';
+ $i = 0; $matches = array();
+ while (preg_match('/\s+name\*'.$i.'\*\s*=\s*"*([^"\n;]+)[";]*/', $headers, $matches)) {
+ $filename_encoded .= $matches[1];
+ $i++;
+ }
}
+ }
// Content-Disposition
else if (!empty($part->headers['content-description']))
$filename_mime = $part->headers['content-description'];
@@ -1267,7 +1267,7 @@ class rcube_imap
// decode filename
if (!empty($filename_mime)) {
$part->filename = rcube_imap::decode_mime_string($filename_mime,
- $part->charset ? $part->charset : rc_detect_encoding($filename_mime, $this->default_charset));
+ $part->charset ? $part->charset : rc_detect_encoding($filename_mime, $this->default_charset));
}
else if (!empty($filename_encoded)) {
// decode filename according to RFC 2231, Section 4
@@ -1342,7 +1342,7 @@ class rcube_imap
if ($fp)
{
fwrite($fp, $body);
- return true;
+ return true;
}
}