mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:40:11 +01:00
Fixed removeJournal() function
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
e61cde8737
commit
1970fc4d8c
@ -144,24 +144,13 @@ class Piler_Mime_Decode {
|
|||||||
public static function removeJournal(&$message, $EOL = "\n") {
|
public static function removeJournal(&$message, $EOL = "\n") {
|
||||||
$has_journal = 0;
|
$has_journal = 0;
|
||||||
|
|
||||||
$s = self::remove_LF($message);
|
self::splitMessageRaw($message, $headers, $journal, $body);
|
||||||
if(strpos($s, $EOL . $EOL)) {
|
|
||||||
list($headers, $body) = explode($EOL . $EOL, $s, 2);
|
if($journal) {
|
||||||
if(!strstr($headers, "\nX-MS-Journal-Report:")) {
|
$has_journal = 1;
|
||||||
return $has_journal;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$p = strstr($message, "\nX-MS-Journal-Report:");
|
$message = $headers . $EOL . $EOL . $body;
|
||||||
if($p) {
|
|
||||||
$q = stristr($p, "message/rfc822");
|
|
||||||
if($q) {
|
|
||||||
$has_journal = 1;
|
|
||||||
$i = strlen("message/rfc822");
|
|
||||||
while(ctype_space($q[$i])) { $i++; }
|
|
||||||
if($i > 0) { $message = substr($q, $i); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $has_journal;
|
return $has_journal;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user