diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-20 10:55:54 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-20 10:55:54 +0400 |
commit | 7ca35544d15cdb41b17283e693c8a14777c923ad (patch) | |
tree | 7f2fea58e44ed81147da163874060200f750fa44 /plugins/VisitTime | |
parent | 66536db9562185ba7e98ca3ef3a4349ca92b8c45 (diff) |
Converting to namespace: Period, Site
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r-- | plugins/VisitTime/API.php | 8 | ||||
-rw-r--r-- | plugins/VisitTime/VisitTime.php | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php index 78a084aaf0..c8a3dd86e6 100644 --- a/plugins/VisitTime/API.php +++ b/plugins/VisitTime/API.php @@ -9,7 +9,9 @@ * @package Piwik_VisitTime */ use Piwik\Archive; +use Piwik\Period; use Piwik\Piwik; +use Piwik\Site; /** * VisitTime API lets you access reports by Hour (Server time), and by Hour Local Time of your visitors. @@ -73,12 +75,12 @@ class Piwik_VisitTime_API unset($metrics[Piwik_Metrics::INDEX_MAX_ACTIONS]); // disabled for multiple dates - if (Piwik_Period::isMultiplePeriod($date, $period)) { + if (Period::isMultiplePeriod($date, $period)) { throw new Exception("VisitTime.getByDayOfWeek does not support multiple dates."); } // get metric data for every day within the supplied period - $oPeriod = Piwik_Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date); + $oPeriod = Period::makePeriodFromQueryParams(Site::getTimezoneFor($idSite), $period, $date); $dateRange = $oPeriod->getDateStart()->toString() . ',' . $oPeriod->getDateEnd()->toString(); $archive = Archive::build($idSite, 'day', $dateRange, $segment); @@ -121,7 +123,7 @@ class Piwik_VisitTime_API protected function removeHoursInFuture($table, $idSite, $period, $date) { - $site = new Piwik_Site($idSite); + $site = new Site($idSite); if ($period == 'day' && ($date == 'today' diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php index e8030b7e7d..abd69f7809 100644 --- a/plugins/VisitTime/VisitTime.php +++ b/plugins/VisitTime/VisitTime.php @@ -9,6 +9,8 @@ * @package Piwik_VisitTime */ use Piwik\Common; +use Piwik\Period; +use Piwik\Site; /** * @@ -190,7 +192,7 @@ class Piwik_VisitTime extends Piwik_Plugin $period = Common::getRequestVar('period'); // create a period instance - $oPeriod = Piwik_Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date); + $oPeriod = Period::makePeriodFromQueryParams(Site::getTimezoneFor($idSite), $period, $date); // set the footer message using the period start & end date $start = $oPeriod->getDateStart()->toString(); |