R35598 - /trunk/etemplate/inc/class.bo_tracking.inc.php

Author: ralfbecker
New Revision: 35598

URL: http://svn.stylite.de/viewvc/egroupware?rev=35598&view=rev
Log:
fixed multiline fields in notification message were all in one line

Modified:
trunk/etemplate/inc/class.bo_tracking.inc.php

Modified: trunk/etemplate/inc/class.bo_tracking.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/etemplate/inc/class.bo_tracking.inc.php?rev=35598&r1=35597&r2=35598&view=diff

— trunk/etemplate/inc/class.bo_tracking.inc.php (original)
+++ trunk/etemplate/inc/class.bo_tracking.inc.php Sat Jul 2 11:36:21 2011
@@ -834,7 +834,7 @@
if (empty($detail[‘value’]) && !$modified) continue; // skip unchanged, empty values

		$body .= $this->format_line($html_email,$detail['type'],$modified,
  •   		$detail['label'] ? $detail['label'].': ' : '', $detail['value']);
    
  •   		$detail['label'] ? $detail['label'] : '', $detail['value']);
      }
      if ($html_email)
      {
    

@@ -856,6 +856,7 @@
*/
protected function format_line($html_mail,$type,$modified,$line,$data=null)
{

  •   //error_log(__METHOD__.'('.array2string($html_mail).",'$type',".array2string($modified).",'$line',".array2string($data).')');
      $content = '';
    
      if ($html_mail)
    

@@ -881,10 +882,10 @@
break;
case ‘multiline’:
// Only Convert nl2br on non-html content

  •   			$pos = strpos($line, '<br');
    
  •   			if ($pos===false)
    
  •   			if (strpos($data, '<br') === false)
      			{
    
  •   				$line = nl2br($line);
    
  •   				$data = nl2br($this->html_content_allow ? $data : html::htmlspecialchars($data));
    
  •   				$this->html_content_allow = true;	// to NOT do htmlspecialchars again
      			}
      			break;
      		case 'reply':
    

@@ -895,7 +896,7 @@
}
$style = ($bold ? ‘font-weight:bold;’ : ‘’).($size ? ‘font-size:’.$size.’;’ : ‘’).($color?‘color:’.$color:’’);

  •   	$content = '<tr style="background-color: '.$background.';"><td style="'.$style.($data?'':'" colspan="2').'">';
    
  •   	$content = '<tr style="background-color: '.$background.';"><td style="'.$style.($line && $data?'" width="20%':'" colspan="2').'">';
      }
      else	// text-mail
      {
    

@@ -905,29 +906,26 @@
}
$content .= $line;

  •   if ($data)
    
  •   {
    
  •   	if ($html_mail)
    
  •   	{
    
  •   		$content .= '</td><td style="'.$style.'">';
    
  •   		if ($type == 'link')
    
  •   		{
    
  •   			// the link is often too long for html boxes chunk-split allows to break lines if needed
    
  •   			$content .= html::a_href(chunk_split($data,40,'&#8203'),$data,'','target="_blank"');
    
  •   		}
    
  •   		elseif ($this->html_content_allow)
    
  •   		{
    
  •   			$content .= html::activate_links($data);
    
  •   		}
    
  •   		else
    
  •   		{
    
  •   			$content .= html::htmlspecialchars($data);
    
  •   		}
    
  •   if ($html_mail)
    
  •   {
    
  •   	if ($line && $data) $content .= '</td><td style="'.$style.'">';
    
  •   	if ($type == 'link')
    
  •   	{
    
  •   		// the link is often too long for html boxes chunk-split allows to break lines if needed
    
  •   		$content .= html::a_href(chunk_split($data,40,'&#8203'),$data,'','target="_blank"');
    
  •   	}
    
  •   	elseif ($this->html_content_allow)
    
  •   	{
    
  •   		$content .= html::activate_links($data);
      	}
      	else
      	{
    
  •   		$content .= ' '.$data;
    
  •   	}
    
  •   		$content .= html::htmlspecialchars($data);
    
  •   	}
    
  •   }
    
  •   else
    
  •   {
    
  •   	$content .= ($content?': ':'').$data;
      }
      if ($html_mail) $content .= '</td></tr>';
    

All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs