We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05c4f88 commit 4e95847Copy full SHA for 4e95847
1 file changed
src/Controller/StatsController.php
@@ -77,6 +77,7 @@ public function stats(): void
77
$query = [
78
'group' => 'grouped_by',
79
'order' => 'Incidents.created',
80
+ 'conditions' => [],
81
];
82
83
if (isset($filter['limit'])) {
@@ -88,7 +89,12 @@ public function stats(): void
88
89
$this->Incidents->recursive = -1;
90
$downloadStats = Cache::read('downloadStats_' . $filter_string);
91
if ($downloadStats === null) {
- $downloadStats = $this->Incidents->find('all', $query);
92
+ $downloadStats = $this->Incidents->find(
93
+ 'all',
94
+ group: $query['group'],
95
+ order: $query['order'],
96
+ conditions: $query['conditions'],
97
+ );
98
$downloadStats->select([
99
'grouped_by' => $filter['group'],
100
'date' => "DATE_FORMAT(Incidents.created, '%a %b %d %Y %T')",
0 commit comments