Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-26 06:13:42 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-26 06:13:42 +0300
commitc8af92a29cbb2eeb917cffaf116f73ce106a5b93 (patch)
treef9197b4bd53c4edfbf7beea3d31a92e3d43a4205 /plugins/Actions
parent3418a4507c7b76c9125f0a5426eed80e9d2e81ef (diff)
- fixing broken unit tests and previously broken period archiving.
Diffstat (limited to 'plugins/Actions')
-rw-r--r--plugins/Actions/Actions.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index 20f1f312b1..d212d703ab 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -17,6 +17,9 @@ class Piwik_Actions extends Piwik_Plugin
{
static protected $actionCategoryDelimiter = null;
static protected $limitLevelSubCategory = 10;
+ protected $maximumRowsInDataTableLevelZero;
+ protected $maximumRowsInSubDataTable;
+ protected $columnToSortByBeforeTruncation;
public function getInformation()
{
@@ -41,10 +44,12 @@ class Piwik_Actions extends Piwik_Plugin
);
return $hooks;
}
-
public function __construct()
{
self::$actionCategoryDelimiter = Zend_Registry::get('config')->General->action_category_delimiter;
+ $this->columnToSortByBeforeTruncation = 'nb_visits';
+ $this->maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_actions;
+ $this->maximumRowsInSubDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_subtable_actions;
}
function addWidgets()
@@ -64,16 +69,12 @@ class Piwik_Actions extends Piwik_Plugin
function archivePeriod( $notification )
{
$archiveProcessing = $notification->getNotificationObject();
-
$dataTableToSum = array(
'Actions_actions',
'Actions_downloads',
'Actions_outlink',
);
-
- $maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_actions;
- $maximumRowsInSubDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_subtable_actions;
- $archiveProcessing->archiveDataTable($dataTableToSum, $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable);
+ $archiveProcessing->archiveDataTable($dataTableToSum, $this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation);
}
/**
@@ -183,19 +184,16 @@ class Piwik_Actions extends Piwik_Plugin
protected function archiveDayRecordInDatabase($archiveProcessing)
{
- $maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_actions;
- $maximumRowsInSubDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_subtable_actions;
-
$dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_ACTION]);
- $s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable );
+ $s = $dataTable->getSerialized( $this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation );
$archiveProcessing->insertBlobRecord('Actions_actions', $s);
$dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_DOWNLOAD]);
- $s = $dataTable->getSerialized($maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable );
+ $s = $dataTable->getSerialized($this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation );
$archiveProcessing->insertBlobRecord('Actions_downloads', $s);
$dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_OUTLINK]);
- $s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable );
+ $s = $dataTable->getSerialized( $this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation );
$archiveProcessing->insertBlobRecord('Actions_outlink', $s);
unset($this->actionsTablesByType);