mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
optimize printing by adding spaces to content of info_subject and info_des and thus allow automatic line-wrapping in printpreview (and print). provided by Chr.Fueller
This commit is contained in:
parent
a07c955ec2
commit
687a26b66e
@ -1035,6 +1035,21 @@ class infolog_ui
|
||||
|
||||
$content = $this->bo->read( $info_id || $action != 'sp' ? $info_id : $action_id );
|
||||
if (!(strpos($content['info_addr'],',')===false) && strpos($content['info_addr'],', ')===false) $content['info_addr'] = str_replace(',',', ',$content['info_addr']);
|
||||
foreach(array('info_subject', 'info_des') as $key)
|
||||
{
|
||||
if(!isset($content[$key]) || strlen($content[$key]) < 75)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
foreach(array(',' => ', ', '.' => '. ') as $pattern => $replace) // set blank behind all , and .
|
||||
{
|
||||
if(strpos($content[$key], $replace) === false)
|
||||
{
|
||||
$content[$key] = str_replace($pattern, $replace, $content[$key]);
|
||||
}
|
||||
}
|
||||
$content[$key] = wordwrap($content[$key], 75, ' ', true);
|
||||
}
|
||||
if (is_numeric($_REQUEST['cat_id']))
|
||||
{
|
||||
$content['info_cat'] = (int) $_REQUEST['cat_id'];
|
||||
|
Loading…
Reference in New Issue
Block a user