Skip to content
Permalink
Browse files

Bug: 13755 Fix body data truncation when no truncationsize is sent.

  • Loading branch information...
mrubinsk committed Dec 15, 2014
1 parent 437c07f commit 158780ed24317f2d6136771a685ff3c8f94fd3ba
Showing with 4 additions and 5 deletions.
  1. +4 −5 mnemo/lib/Driver.php
@@ -406,13 +406,12 @@ public function toASNote($memo, $options = array())
}
} else {
$body->type = Horde_ActiveSync::BODYPREF_TYPE_PLAIN;
if (isset($bp[Horde_ActiveSync::BODYPREF_TYPE_PLAIN]['truncationsize'])) {
if (Horde_String::length($memo['body']) > $bp[Horde_ActiveSync::BODYPREF_TYPE_PLAIN]['truncationsize']) {
if (isset($bp[Horde_ActiveSync::BODYPREF_TYPE_PLAIN]['truncationsize']) &&
Horde_String::length($memo['body']) > $bp[Horde_ActiveSync::BODYPREF_TYPE_PLAIN]['truncationsize']) {
$body->data = Horde_String::substr($memo['body'], 0, $bp[Horde_ActiveSync::BODYPREF_TYPE_PLAIN]['truncationsize']);
$body->truncated = 1;
} else {
$body->data = $memo['body'];
}
} else {
$body->data = $memo['body'];
}
}
$body->estimateddatasize = Horde_String::length($memo['body']);

0 comments on commit 158780e

Please sign in to comment.
You can’t perform that action at this time.