Skip to content
Extraits de code Groupes Projets
Valider c791c599 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

git-svn-id: http://dev.piwik.org/svn/trunk@2305 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent de3f2831
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -135,8 +135,8 @@ datatable_archiving_maximum_rows_actions = 500 ...@@ -135,8 +135,8 @@ datatable_archiving_maximum_rows_actions = 500
; maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category) ; maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category)
datatable_archiving_maximum_rows_subtable_actions = 100 datatable_archiving_maximum_rows_subtable_actions = 100
; maximum number of rows for the provider table ; maximum number of rows for other tables (Providers, User settings configurations)
datatable_archiving_maximum_rows_providers = 500 datatable_archiving_maximum_rows_standard = 500
; by default, Piwik uses self-hosted AJAX libraries. ; by default, Piwik uses self-hosted AJAX libraries.
; If set to 1, Piwik uses a Content Distribution Network ; If set to 1, Piwik uses a Content Distribution Network
......
...@@ -85,10 +85,10 @@ class Piwik_Provider extends Piwik_Plugin ...@@ -85,10 +85,10 @@ class Piwik_Provider extends Piwik_Plugin
function archivePeriod( $notification ) function archivePeriod( $notification )
{ {
$maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_providers; $maximumRowsInDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_standard;
$archiveProcessing = $notification->getNotificationObject(); $archiveProcessing = $notification->getNotificationObject();
$dataTableToSum = array( 'Provider_hostnameExt' ); $dataTableToSum = array( 'Provider_hostnameExt' );
$archiveProcessing->archiveDataTable($dataTableToSum, null, $maximumRowsInDataTableLevelZero); $archiveProcessing->archiveDataTable($dataTableToSum, null, $maximumRowsInDataTable);
} }
/** /**
...@@ -103,8 +103,8 @@ class Piwik_Provider extends Piwik_Plugin ...@@ -103,8 +103,8 @@ class Piwik_Provider extends Piwik_Plugin
$interestByProvider = $archiveProcessing->getArrayInterestForLabel($labelSQL); $interestByProvider = $archiveProcessing->getArrayInterestForLabel($labelSQL);
$tableProvider = $archiveProcessing->getDataTableFromArray($interestByProvider); $tableProvider = $archiveProcessing->getDataTableFromArray($interestByProvider);
$columnToSortByBeforeTruncation = Piwik_Archive::INDEX_NB_VISITS; $columnToSortByBeforeTruncation = Piwik_Archive::INDEX_NB_VISITS;
$maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_providers; $maximumRowsInDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_standard;
$archiveProcessing->insertBlobRecord($recordName, $tableProvider->getSerialized($maximumRowsInDataTableLevelZero, null, $columnToSortByBeforeTruncation)); $archiveProcessing->insertBlobRecord($recordName, $tableProvider->getSerialized($maximumRowsInDataTable, null, $columnToSortByBeforeTruncation));
destroy($tableProvider); destroy($tableProvider);
} }
......
...@@ -39,6 +39,7 @@ class Piwik_UserSettings_API ...@@ -39,6 +39,7 @@ class Piwik_UserSettings_API
$dataTable = $archive->getDataTable($name); $dataTable = $archive->getDataTable($name);
$dataTable->filter('Sort', array(Piwik_Archive::INDEX_NB_VISITS)); $dataTable->filter('Sort', array(Piwik_Archive::INDEX_NB_VISITS));
$dataTable->queueFilter('ReplaceColumnNames'); $dataTable->queueFilter('ReplaceColumnNames');
$dataTable->queueFilter('ReplaceSummaryRowLabel');
return $dataTable; return $dataTable;
} }
......
...@@ -66,6 +66,8 @@ class Piwik_UserSettings extends Piwik_Plugin ...@@ -66,6 +66,8 @@ class Piwik_UserSettings extends Piwik_Plugin
function archiveDay( $notification ) function archiveDay( $notification )
{ {
require_once PIWIK_INCLUDE_PATH . '/plugins/UserSettings/functions.php'; require_once PIWIK_INCLUDE_PATH . '/plugins/UserSettings/functions.php';
$maximumRowsInDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_standard;
$columnToSortByBeforeTruncation = Piwik_Archive::INDEX_NB_VISITS;
$archiveProcessing = $notification->getNotificationObject(); $archiveProcessing = $notification->getNotificationObject();
$this->archiveProcessing = $archiveProcessing; $this->archiveProcessing = $archiveProcessing;
...@@ -74,21 +76,21 @@ class Piwik_UserSettings extends Piwik_Plugin ...@@ -74,21 +76,21 @@ class Piwik_UserSettings extends Piwik_Plugin
$labelSQL = "CONCAT(config_os, ';', config_browser_name, ';', config_resolution)"; $labelSQL = "CONCAT(config_os, ';', config_browser_name, ';', config_resolution)";
$interestByConfiguration = $archiveProcessing->getArrayInterestForLabel($labelSQL); $interestByConfiguration = $archiveProcessing->getArrayInterestForLabel($labelSQL);
$tableConfiguration = $archiveProcessing->getDataTableFromArray($interestByConfiguration); $tableConfiguration = $archiveProcessing->getDataTableFromArray($interestByConfiguration);
$archiveProcessing->insertBlobRecord($recordName, $tableConfiguration->getSerialized()); $archiveProcessing->insertBlobRecord($recordName, $tableConfiguration->getSerialized($maximumRowsInDataTable, null, $columnToSortByBeforeTruncation));
destroy($tableConfiguration); destroy($tableConfiguration);
$recordName = 'UserSettings_os'; $recordName = 'UserSettings_os';
$labelSQL = "config_os"; $labelSQL = "config_os";
$interestByOs = $archiveProcessing->getArrayInterestForLabel($labelSQL); $interestByOs = $archiveProcessing->getArrayInterestForLabel($labelSQL);
$tableOs = $archiveProcessing->getDataTableFromArray($interestByOs); $tableOs = $archiveProcessing->getDataTableFromArray($interestByOs);
$archiveProcessing->insertBlobRecord($recordName, $tableOs->getSerialized()); $archiveProcessing->insertBlobRecord($recordName, $tableOs->getSerialized($maximumRowsInDataTable, null, $columnToSortByBeforeTruncation));
destroy($tableOs); destroy($tableOs);
$recordName = 'UserSettings_browser'; $recordName = 'UserSettings_browser';
$labelSQL = "CONCAT(config_browser_name, ';', config_browser_version)"; $labelSQL = "CONCAT(config_browser_name, ';', config_browser_version)";
$interestByBrowser = $archiveProcessing->getArrayInterestForLabel($labelSQL); $interestByBrowser = $archiveProcessing->getArrayInterestForLabel($labelSQL);
$tableBrowser = $archiveProcessing->getDataTableFromArray($interestByBrowser); $tableBrowser = $archiveProcessing->getDataTableFromArray($interestByBrowser);
$archiveProcessing->insertBlobRecord($recordName, $tableBrowser->getSerialized()); $archiveProcessing->insertBlobRecord($recordName, $tableBrowser->getSerialized($maximumRowsInDataTable, null, $columnToSortByBeforeTruncation));
$recordName = 'UserSettings_browserType'; $recordName = 'UserSettings_browserType';
$tableBrowserType = $this->getTableBrowserByType($tableBrowser); $tableBrowserType = $this->getTableBrowserByType($tableBrowser);
...@@ -101,7 +103,7 @@ class Piwik_UserSettings extends Piwik_Plugin ...@@ -101,7 +103,7 @@ class Piwik_UserSettings extends Piwik_Plugin
$interestByResolution = $archiveProcessing->getArrayInterestForLabel($labelSQL); $interestByResolution = $archiveProcessing->getArrayInterestForLabel($labelSQL);
$tableResolution = $archiveProcessing->getDataTableFromArray($interestByResolution); $tableResolution = $archiveProcessing->getDataTableFromArray($interestByResolution);
$tableResolution->filter('ColumnCallbackDeleteRow', array('label', 'Piwik_UserSettings_keepStrlenGreater')); $tableResolution->filter('ColumnCallbackDeleteRow', array('label', 'Piwik_UserSettings_keepStrlenGreater'));
$archiveProcessing->insertBlobRecord($recordName, $tableResolution->getSerialized()); $archiveProcessing->insertBlobRecord($recordName, $tableResolution->getSerialized($maximumRowsInDataTable, null, $columnToSortByBeforeTruncation));
$recordName = 'UserSettings_wideScreen'; $recordName = 'UserSettings_wideScreen';
$tableWideScreen = $this->getTableWideScreen($tableResolution); $tableWideScreen = $this->getTableWideScreen($tableResolution);
...@@ -118,6 +120,7 @@ class Piwik_UserSettings extends Piwik_Plugin ...@@ -118,6 +120,7 @@ class Piwik_UserSettings extends Piwik_Plugin
function archivePeriod( $notification ) function archivePeriod( $notification )
{ {
$archiveProcessing = $notification->getNotificationObject(); $archiveProcessing = $notification->getNotificationObject();
$maximumRowsInDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_standard;
$dataTableToSum = array( $dataTableToSum = array(
'UserSettings_configuration', 'UserSettings_configuration',
...@@ -129,7 +132,7 @@ class Piwik_UserSettings extends Piwik_Plugin ...@@ -129,7 +132,7 @@ class Piwik_UserSettings extends Piwik_Plugin
'UserSettings_plugin', 'UserSettings_plugin',
); );
$archiveProcessing->archiveDataTable($dataTableToSum); $archiveProcessing->archiveDataTable($dataTableToSum, null, $maximumRowsInDataTable);
} }
protected function getTableWideScreen($tableResolution) protected function getTableWideScreen($tableResolution)
......
...@@ -126,11 +126,19 @@ function Piwik_getBrowserVersion($str) ...@@ -126,11 +126,19 @@ function Piwik_getBrowserVersion($str)
function Piwik_getBrowsersLogo($label) function Piwik_getBrowsersLogo($label)
{ {
$id = Piwik_getBrowserId($label); $id = Piwik_getBrowserId($label);
// For aggregated row 'Others'
if(empty($id)) {
$id = 'UNK';
}
return 'plugins/UserSettings/images/browsers/'. $id . '.gif'; return 'plugins/UserSettings/images/browsers/'. $id . '.gif';
} }
function Piwik_getOSLogo($label) function Piwik_getOSLogo($label)
{ {
// For aggregated row 'Others'
if(empty($label)) {
$label = 'UNK';
}
$path = 'plugins/UserSettings/images/os/'. $label . '.gif'; $path = 'plugins/UserSettings/images/os/'. $label . '.gif';
return $path; return $path;
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter