Commit 569e6137 authored by Manfred Kutas's avatar Manfred Kutas Committed by Sebastian Kummer

Merge pull request #341 in ZP/z-push from...

Merge pull request #341 in ZP/z-push from bugfix/ZP-1021-return-sync_bodypreference_plain to develop

* commit 'a9373516':
  ZP-1021 Return SYNC_BODYPREFERENCE_PLAIN when $bpTypes is false in GetBodyPreferenceBestMatch.
parent 61739c5e
......@@ -845,6 +845,9 @@ class Utils {
* @return int
*/
public static function GetBodyPreferenceBestMatch($bpTypes) {
if ($bpTypes === false) {
return SYNC_BODYPREFERENCE_PLAIN;
}
// The best choice is RTF, then HTML and then MIME in order to save bandwidth
// because MIME is a complete message including the headers and attachments
if (in_array(SYNC_BODYPREFERENCE_RTF, $bpTypes)) return SYNC_BODYPREFERENCE_RTF;
......@@ -1013,4 +1016,4 @@ function w2ui($string) { return windows1252_to_utf8($string, "//TRANSLIT"); }
function u2wi($string) { return utf8_to_windows1252($string, "//TRANSLIT"); }
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment