diff options
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r-- | plugins/VisitTime/API.php | 32 | ||||
-rw-r--r-- | plugins/VisitTime/VisitTime.php | 60 |
2 files changed, 46 insertions, 46 deletions
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php index b53ab40351..779460c9c3 100644 --- a/plugins/VisitTime/API.php +++ b/plugins/VisitTime/API.php @@ -1,18 +1,18 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_VisitTime
- */
-
-
-/**
- *
- * @package Piwik_VisitTime
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_VisitTime + */ + + +/** + * + * @package Piwik_VisitTime */ class Piwik_VisitTime_API extends Piwik_Apiable { @@ -40,7 +40,7 @@ class Piwik_VisitTime_API extends Piwik_Apiable $dataTable = $archive->getDataTable($name); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_getTimeLabel')); $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceColumnNames'); -
+ return $dataTable; } diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php index 4006c197d3..484e3f0b2b 100644 --- a/plugins/VisitTime/VisitTime.php +++ b/plugins/VisitTime/VisitTime.php @@ -1,18 +1,18 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- *
- * @package Piwik_VisitTime
- */
-
-/**
- *
- * @package Piwik_VisitTime
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * + * @package Piwik_VisitTime + */ + +/** + * + * @package Piwik_VisitTime */ class Piwik_VisitTime extends Piwik_Plugin { @@ -57,8 +57,8 @@ class Piwik_VisitTime extends Piwik_Plugin public function archiveDay( $notification ) { $archiveProcessing = $notification->getNotificationObject(); -
- $this->archiveProcessing = $archiveProcessing;
+ + $this->archiveProcessing = $archiveProcessing; $recordName = 'VisitTime_localTime'; $labelSQL = "HOUR(visitor_localtime)"; @@ -69,22 +69,22 @@ class Piwik_VisitTime extends Piwik_Plugin $recordName = 'VisitTime_serverTime'; $labelSQL = "HOUR(visit_first_action_time)"; - $tableServerTime = $archiveProcessing->getDataTableInterestForLabel($labelSQL);
+ $tableServerTime = $archiveProcessing->getDataTableInterestForLabel($labelSQL); $this->makeSureAllHoursAreSet($tableServerTime); $record = new Piwik_ArchiveProcessing_Record_BlobArray($recordName, $tableServerTime->getSerialized()); // echo $tableServerTime; - }
-
- private function makeSureAllHoursAreSet($table)
- {
- for($i=0;$i<=23;$i++)
- {
- if($table->getRowFromLabel($i) === false)
- {
- $row = $this->archiveProcessing->getNewInterestRowLabeled($i);
- $table->addRow( $row );
- }
- }
+ } + + private function makeSureAllHoursAreSet($table) + { + for($i=0;$i<=23;$i++) + { + if($table->getRowFromLabel($i) === false) + { + $row = $this->archiveProcessing->getNewInterestRowLabeled($i); + $table->addRow( $row ); + } + } } } |