Skip to content

Commit

Permalink
fix: Request handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DevDavido committed Dec 20, 2023
1 parent 2355692 commit 42811dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion API.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private function setMetricTooltips($dataTable, string $dataTableName)
*/
private function disableTotalsRow($dataTable)
{
if ($dataTable instanceof DataTable && Request::getBoolParameter('keep_totals_row', false)) {
if ($dataTable instanceof DataTable && Request::fromRequest()->getBoolParameter('keep_totals_row', false)) {
$dataTable->setTotalsRow(new Row([
'label' => DataTable::LABEL_TOTALS_ROW
]));
Expand Down
6 changes: 3 additions & 3 deletions Reports/GetPerformanceBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class GetPerformanceBase extends Report
*/
protected function init()
{
if (Request::getIntegerParameter('idSite', 0) == 0) {
if (Request::fromRequest()->getIntegerParameter('idSite', 0) == 0) {
return;
}

$siteSettings = new MeasurableSettings(Request::getIntegerParameter('idSite'));
$siteSettings = new MeasurableSettings(Request::fromRequest()->getIntegerParameter('idSite'));
$defaultMetrics = [
new MinSeconds(),
new MedianSeconds(),
Expand Down Expand Up @@ -69,7 +69,7 @@ protected function init()
*/
public function isEnabled()
{
$idSite = Request::getIntegerParameter('idSite', -1);
$idSite = Request::fromRequest()->getIntegerParameter('idSite', -1);
if ($idSite < 0) {
return false;
}
Expand Down

0 comments on commit 42811dd

Please sign in to comment.