using native php wordwrap to speed up encoding of images

This commit is contained in:
Ralf Becker 2010-10-14 10:55:58 +00:00
parent 819ce52f90
commit 87da090667

View File

@ -1233,10 +1233,15 @@ class Horde_iCalendar {
case 'B':
case 'BASE64':
$params_str .= ';ENCODING=' . $params['ENCODING'];
// using native php wordwrap to speed up encoding of images
$result .= wordwrap($name . $params_str . ':' . $this->_newline . ' ' .
$this->_base64Encode($value),75,$this->_newline . ' ',true) . $this->_newline;
/*
$attr_string = $name . $params_str . ':' . $this->_newline . ' ' . $this->_base64Encode($value);
$attr_string = String::wordwrap($attr_string, 75, $this->_newline . ' ',
true, 'utf-8', true); // charset does not matter
$result .= $attr_string . $this->_newline;
*/
if ($this->isOldFormat()) {
$result .= $this->_newline; // Append an empty line
}