diff --git a/sources/Application/Dashboard/Controller/DashboardController.php b/sources/Application/Dashboard/Controller/DashboardController.php index ad6b0253e6..9eea59dede 100644 --- a/sources/Application/Dashboard/Controller/DashboardController.php +++ b/sources/Application/Dashboard/Controller/DashboardController.php @@ -224,14 +224,12 @@ class DashboardController extends Controller } else { $sDashboardDefinition = @file_get_contents($sDashboardFileSanitized); } - } - else { + } else { $sDashboardDefinition = @file_get_contents($sDashboardFileSanitized); } // TODO 3.3 If the dashboard definition is previous schema, we need to convert it to the new one - $oDoc = new PropertyTypeDesign(); $oDoc->loadXML($sDashboardDefinition); @@ -241,20 +239,19 @@ class DashboardController extends Controller // TODO 3.3 Re-render every dashlet to have their latest representation // Let's render every dashlet to prevent frontend from having to do it for each in individual ajax call -// if (array_key_exists('pos_dashlets', $aData)) { -// foreach ($aData['pos_dashlets'] as $sDashletId => $sPosValues) { -// if(array_key_exists('dashlet', $sPosValues)) { -// $sDashletClass = $sPosValues['dashlet']['type']; -// $aValues = $sPosValues['dashlet']['properties']; -// -// $oDashlet = DashletFactory::GetInstance()->CreateDashlet($sDashletClass, $sDashletId); -// $oDashlet->FromModelData($aValues); -// -// -// } -// } -// } - + // if (array_key_exists('pos_dashlets', $aData)) { + // foreach ($aData['pos_dashlets'] as $sDashletId => $sPosValues) { + // if(array_key_exists('dashlet', $sPosValues)) { + // $sDashletClass = $sPosValues['dashlet']['type']; + // $aValues = $sPosValues['dashlet']['properties']; + // + // $oDashlet = DashletFactory::GetInstance()->CreateDashlet($sDashletClass, $sDashletId); + // $oDashlet->FromModelData($aValues); + // + // + // } + // } + // } $sStatus = 'ok'; $sMessage = 'Dashboard loaded'; @@ -268,7 +265,7 @@ class DashboardController extends Controller $oPage->SetData([ 'status' => $sStatus, 'message' => $sMessage, - 'data' => $aData + 'data' => $aData, ]); $oPage->SetOutputDataOnly(true); return $oPage; diff --git a/sources/Application/Dashboard/RuntimeDashboard.php b/sources/Application/Dashboard/RuntimeDashboard.php index b777093ade..628951a284 100644 --- a/sources/Application/Dashboard/RuntimeDashboard.php +++ b/sources/Application/Dashboard/RuntimeDashboard.php @@ -245,7 +245,7 @@ class RuntimeDashboard extends Dashboard $oDashboard = parent::Render($oPage, $bEditMode, $aRenderParams); - if($this->HasCustomDashboard() && !filter_var(appUserPreferences::GetPref('display_original_dashboard_'.$this->GetId(), false), FILTER_VALIDATE_BOOLEAN)) { + if ($this->HasCustomDashboard() && !filter_var(appUserPreferences::GetPref('display_original_dashboard_'.$this->GetId(), false), FILTER_VALIDATE_BOOLEAN)) { $oDashboard->SetIsCustom(true); }