mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Protect dashboard/dashlets against exceptions, with a graceful degradation for non-existing classes
SVN:trunk[2073]
This commit is contained in:
@@ -641,7 +641,7 @@ try
|
||||
{
|
||||
$oDashlet = new $sDashletClass($sDashletId);
|
||||
$offset = $oPage->start_capture();
|
||||
$oDashlet->Render($oPage, true);
|
||||
$oDashlet->DoRender($oPage, true /* bEditMode */, false /* bEnclosingDiv */);
|
||||
$sHtml = addslashes($oPage->end_capture($offset));
|
||||
$sHtml = str_replace("\n", '', $sHtml);
|
||||
$sHtml = str_replace("\r", '', $sHtml);
|
||||
@@ -691,7 +691,7 @@ try
|
||||
if ($oDashlet->IsRedrawNeeded())
|
||||
{
|
||||
$offset = $oPage->start_capture();
|
||||
$oDashlet->Render($oPage, true);
|
||||
$oDashlet->DoRender($oPage, true /* bEditMode */, false /* bEnclosingDiv */);
|
||||
$sHtml = addslashes($oPage->end_capture($offset));
|
||||
$sHtml = str_replace("\n", '', $sHtml);
|
||||
$sHtml = str_replace("\r", '', $sHtml);
|
||||
|
||||
Reference in New Issue
Block a user