fix warnings

This commit is contained in:
Eric Espie
2026-01-15 10:44:20 +01:00
parent 50ffaa2b55
commit 4d9e18890a
4 changed files with 11 additions and 8 deletions

View File

@@ -183,9 +183,11 @@ abstract class Dashboard
$aGridDashlet['width'] = intval($oPosDashletNode->GetChildText('width', '2'));
$aGridDashlet['height'] = intval($oPosDashletNode->GetChildText('height', '1'));
$oDashletNode = $oPosDashletNode->GetUniqueElement('dashlet');
$aGridDashlet['dashlet'] = $this->InitDashletFromDOMNode($oDashletNode);
$sId = $oPosDashletNode->getAttribute('id');
$this->aGridDashlets[$sId] = $aGridDashlet;
$oDashlet = $this->InitDashletFromDOMNode($oDashletNode);
$oDashlet->SetID($sId);
$aGridDashlet['dashlet'] = $oDashlet;
$this->aGridDashlets[] = $aGridDashlet;
}
}

View File

@@ -1093,10 +1093,10 @@ abstract class DashletGroupBy extends Dashlet
$sGroupBy = $this->aProperties['group_by'];
$this->sAggregationFunction = $this->aProperties['aggregation_function'];
$this->sAggregationAttribute = $this->aProperties['aggregation_attribute'];
$this->sAggregationAttribute = $this->aProperties['aggregation_attribute'] ?? '';
$this->sLimit = $this->aProperties['limit'];
$this->sOrderBy = $this->aProperties['order_by'];
$this->sLimit = $this->aProperties['limit'] ?? 0;
$this->sOrderBy = $this->aProperties['order_by'] ?? null;
if (empty($this->sOrderBy)) {
if ($this->aProperties['style'] == 'pie') {
$this->sOrderBy = 'function';

View File

@@ -18,11 +18,11 @@ class DashboardLayoutGrid extends \DashboardLayout
$oDashboardGrid = new DashboardGrid();
$oDashboardLayout->SetGrid($oDashboardGrid);
foreach ($aDashlets as $sDashletId => $aPosDashlet) {
foreach ($aDashlets as $aPosDashlet) {
/** @var \Dashlet $oDashlet */
$oDashlet = $aPosDashlet['dashlet'];
if ($oDashlet::IsVisible()) {
$oDashlet->SetID($sDashletId);
$sDashletId = $oDashlet->GetID();
$sDashletClass = get_class($oDashlet);
$aDashletDenormalizedProperties = $oDashlet->GetDenormalizedProperties();
$aDashletsInfo = $sDashletClass::GetInfo();

View File

@@ -38,7 +38,8 @@ class FormsController extends Controller
if ($oForm->isSubmitted()) {
if ($oForm->isValid()) {
IssueLog::Info('form is valid');
$sDashletName = json_encode($sDashletClass);
IssueLog::Debug("form for $sDashletName is valid");
}
// Compute blocks to redraw