@@ -38,7 +38,7 @@ public function __construct()
3838 parent ::__construct ();
3939
4040 $ this ->period = Request::fromRequest ()->getStringParameter ('period ' , 'day ' );
41- $ this ->date = Request::fromRequest ()->getStringParameter ('date ' , 'yesterday ' );
41+ $ this ->strDate = Request::fromRequest ()->getStringParameter ('date ' , 'yesterday ' );
4242 $ this ->currentSegmentDefinition = Request::fromRequest ()->getStringParameter ('segment ' , '' );
4343 $ this ->checkSitePermission ();
4444 Piwik::checkUserHasViewAccess ($ this ->idSite );
@@ -65,12 +65,12 @@ public function manageSegments(): string
6565 foreach ($ view ->segmentList as $ index => &$ segment ) {
6666 $ segment ['fixed ' ] = $ segment ['fixed ' ] ?? false ;
6767 $ segment ['selected ' ] = $ segment ['definition ' ] === $ this ->currentSegmentDefinition ;
68- $ segment ['dashboardUrl ' ] = '?module=CoreHome&action=index&idSite= ' . $ this ->idSite . '&period= ' . $ this ->period . '&date= ' . $ this ->date . '&segment= ' . urlencode ($ segment ['definition ' ]);
68+ $ segment ['dashboardUrl ' ] = '?module=CoreHome&action=index&idSite= ' . $ this ->idSite . '&period= ' . $ this ->period . '&date= ' . $ this ->strDate . '&segment= ' . urlencode ($ segment ['definition ' ]);
6969 $ segment ['sparklineUrl ' ] = $ this ->getSegmentSparklineUrl ($ segment );
7070 $ data = VisitsSummary \API ::getInstance ()
71- ->get ($ this ->idSite , $ this ->period , $ this ->date , $ segment ['definition ' ])
71+ ->get ($ this ->idSite , $ this ->period , $ this ->strDate , $ segment ['definition ' ])
7272 ->getFirstRow ()->getArrayCopy ();
73- list ($ previousDate , $ ignore ) = Range::getLastDate ($ this ->date , $ this ->period );
73+ list ($ previousDate , $ ignore ) = Range::getLastDate ($ this ->strDate , $ this ->period );
7474 $ data ['past_nb_visits ' ] = VisitsSummary \API ::getInstance ()
7575 ->getVisits ($ this ->idSite , $ this ->period , $ previousDate , $ segment ['definition ' ])
7676 ->getFirstRow ()->getColumn ('nb_visits ' );
0 commit comments