Skip to content
Snippets Groups Projects
Commit 23c38443 authored by Erik Seifert's avatar Erik Seifert
Browse files

Fix: add last seven days

parent c5415163
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,10 @@ abstract class MatomoBase extends DashboardLazyBuildBase {
$format = 'Y-m-d';
$time = time();
switch ($period) {
case 'last_seven_days':
$time = strtotime('-7 days');
break;
case 'this_week':
$time = strtotime('monday this week');
break;
......@@ -184,6 +188,7 @@ abstract class MatomoBase extends DashboardLazyBuildBase {
$form['date'] = [
'#type' => 'select',
'#options' => [
'last_seven_days' => $this->t('Last seven days'),
'this_week' => $this->t('This week'),
'this_month' => $this->t('This month'),
'last_three_months' => $this->t('Last 3 months'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment