summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-10-02 07:22:33 +0000
committeralecpl <alec@alec.pl>2009-10-02 07:22:33 +0000
commit1480e2f37419ea54a850bbcfb42218fa7e6c50b4 (patch)
treeb2922b6527fe8ec522080d18a871aea452c2550b
parent7d1db8c9014957c05125c9150dfb40f1bd22d840 (diff)
- fix corrupted attachments on forward (#1486193)
-rw-r--r--program/lib/imap.inc8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index f632ca992..90938f499 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -2270,7 +2270,7 @@ function iil_C_HandlePartBody(&$conn, $mailbox, $id, $is_uid=false, $part='', $e
}
else
$prev = '';
-
+
if ($file)
fwrite($file, base64_decode($line));
else if ($print)
@@ -2306,7 +2306,6 @@ function iil_C_HandlePartBody(&$conn, $mailbox, $id, $is_uid=false, $part='', $e
}
}
}
-
// read in anything up until last line
if (!$end)
do {
@@ -2314,18 +2313,17 @@ function iil_C_HandlePartBody(&$conn, $mailbox, $id, $is_uid=false, $part='', $e
} while (!iil_StartsWith($line, $key, true));
if ($result) {
- $result = rtrim($result, "\t\r\n\0\x0B");
if ($file) {
fwrite($file, $result);
} else if ($print) {
echo $result;
} else
- return $result; // substr($result, 0, strlen($result)-1);
+ return $result;
return true;
}
}
-
+
return false;
}