Code Duplication    Length = 5-6 lines in 2 locations

mail/inc/class.mail_zpush.inc.php 2 locations

@@ 1016-1020 (lines=5) @@
1013
						$htmlbody .= '</body>'.
1014
								'</html>';
1015
1016
						if(isset($truncsize) && strlen($htmlbody) > $truncsize)
1017
						{
1018
							$htmlbody = Utils::Utf8_truncate($htmlbody,$truncsize);
1019
							$output->asbody->truncated = 1;
1020
						}
1021
						// output->nativebodytype is used as marker that the original message was of type ... but is now converted to, as type 2 is requested.
1022
						$output->nativebodytype = 2;
1023
						$output->asbody->data = StringStreamWrapper::Open($htmlbody);
@@ 1039-1044 (lines=6) @@
1036
						*/
1037
						$output->asbody->type = 1;
1038
						$output->nativebodytype = 1;
1039
						if(isset($truncsize) &&
1040
							strlen($plainBody) > $truncsize)
1041
						{
1042
							$plainBody = Utils::Utf8_truncate($plainBody, $truncsize);
1043
							$output->asbody->truncated = 1;
1044
						}
1045
						$output->asbody->data = StringStreamWrapper::Open((string)$plainBody !== '' ? $plainBody : ' ');
1046
						$output->asbody->estimatedDataSize = strlen($plainBody);
1047
					}