Enhanced template parser to support now suboptions needed in report modules

This commit is contained in:
Andre Lorbach 2009-12-04 15:05:39 +01:00
parent a54ef1cd4c
commit 969164f275
2 changed files with 7 additions and 3 deletions

View File

@ -317,6 +317,10 @@ function InsertTemplateVariable($szValue, $szOperation, $szOption)
if ( is_numeric($szOption) && strlen($szValue) > $szOption)
$szResult = wordwrap($szValue, $szOption, "<br>", true);
break;
case "wordwrap":
if ( is_numeric($szOption) && strlen($szValue) > $szOption)
$szResult = wordwrap($szValue, $szOption, " ", true);
break;
default:
// Nothing
break;

View File

@ -69,8 +69,8 @@
<td class="cellmenu1" align="center" width="50" nowrap>{ln_report_number}</td>
<td class="cellmenu1" align="left" width="100" nowrap>{ln_report_firstevent}</td>
<td class="cellmenu1" align="left" width="100" nowrap>{ln_report_lastevent}</td>
<td class="cellmenu1" align="left" width="50" nowrap>{ln_report_process}</td>
<td class="cellmenu1" align="left" width="100" nowrap>{ln_report_severity}</td>
<td class="cellmenu1" align="left" width="100" nowrap>{ln_report_process}</td>
<td class="cellmenu1" align="left" width="50" nowrap>{ln_report_severity}</td>
<td class="cellmenu1" align="left" width="50" nowrap>{ln_report_eventid}</td>
<td class="cellmenu1" align="center" width="50" nowrap>{ln_report_count}</td>
</tr>
@ -91,7 +91,7 @@
</tr>
<tr>
<td class="cellmenu1" align="center" valign="top" nowrap colspan="2" width="200">{ln_report_description}</td>
<td class="cellmenu1" align="left" nowrap colspan="4">{msg:forcelinebreak:40}</td>
<td class="cellmenu1" align="left" nowrap colspan="4">{msg:wordwrap:32}</td>
</tr>
<!-- END cons_events -->
</table>