浏览代码

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2073 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 年之前
父节点
当前提交
148cfa3613
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pages/ajax.render.php

+ 2 - 2
pages/ajax.render.php

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