Protect dashboard/dashlets against exceptions, with a graceful degradation for non-existing classes

SVN:trunk[2073]
This commit is contained in:
Denis Flaven
2012-05-30 14:21:48 +00:00
parent e64e008aad
commit ad1b2901be

View File

@@ -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);