Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 1022-1026 (lines=5) @@
1019
						$htmlbody .= '</body>'.
1020
								'</html>';
1021
1022
						if(isset($truncsize) && strlen($htmlbody) > $truncsize)
1023
						{
1024
							$htmlbody = Utils::Utf8_truncate($htmlbody,$truncsize);
1025
							$output->asbody->truncated = 1;
1026
						}
1027
						// output->nativebodytype is used as marker that the original message was of type ... but is now converted to, as type 2 is requested.
1028
						$output->nativebodytype = 2;
1029
						$output->asbody->data = StringStreamWrapper::Open($htmlbody);
@@ 1045-1050 (lines=6) @@
1042
						*/
1043
						$output->asbody->type = 1;
1044
						$output->nativebodytype = 1;
1045
						if(isset($truncsize) &&
1046
							strlen($plainBody) > $truncsize)
1047
						{
1048
							$plainBody = Utils::Utf8_truncate($plainBody, $truncsize);
1049
							$output->asbody->truncated = 1;
1050
						}
1051
						$output->asbody->data = StringStreamWrapper::Open((string)$plainBody !== '' ? $plainBody : ' ');
1052
						$output->asbody->estimatedDataSize = strlen($plainBody);
1053
					}