Skip to content

Commit

Permalink
apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Nov 8, 2024
1 parent cfb1bdc commit 979da07
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions core/Updates/5.2.0-b6.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public function __construct(MigrationFactory $factory)

public function getMigrations(Updater $updater)
{
$beginOfCurrentYear = '01-01-' . Date::now()->toString('Y');
$startOfCurrentYear = '01-01-' . Date::now()->toString('Y');

$commandToExecute = sprintf(
'./console core:invalidate-report-data --dates=%s,today --plugin=Actions.Actions_hits',
$beginOfCurrentYear
$startOfCurrentYear
);

$migrations = [
new CustomMigration(function () use ($beginOfCurrentYear) {
new CustomMigration(function () use ($startOfCurrentYear) {
$invalidator = StaticContainer::get(ArchiveInvalidator::class);
$invalidator->scheduleReArchiving('all', 'Actions', 'Actions_hits', Date::factory($beginOfCurrentYear));
$invalidator->scheduleReArchiving('all', 'Actions', 'Actions_hits', Date::factory($startOfCurrentYear));
}, $commandToExecute)
];

Expand Down
2 changes: 1 addition & 1 deletion plugins/Actions/Reports/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function init()
'nb_uniq_outlinks',
'nb_searches',
'nb_keywords',
'hits'
'hits',
);
}
}
Binary file not shown.
6 changes: 3 additions & 3 deletions plugins/MultiSites/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ private function makeSitesFlatAndApplyGenericFilters(DataTable $table, $request)
unset($request['filter_limit']);

// filter_sort_column does not work correctly is a bug in MultiSites.getAll
$filterSprtColumnMapping = [
$filterSortColumnMapping = [
'nb_pageviews' => 'Actions_nb_pageviews',
'hits' => 'Actions_hits',
'revenue' => 'Goal_revenue',
];

if (!empty($request['filter_sort_column']) && array_key_exists($request['filter_sort_column'], $filterSprtColumnMapping)) {
$request['filter_sort_column'] = $filterSprtColumnMapping[$request['filter_sort_column']];
if (!empty($request['filter_sort_column']) && array_key_exists($request['filter_sort_column'], $filterSortColumnMapping)) {
$request['filter_sort_column'] = $filterSortColumnMapping[$request['filter_sort_column']];
}

// make sure no limit filter is applied, we will do this manually
Expand Down
6 changes: 3 additions & 3 deletions plugins/MultiSites/MultiSites.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class MultiSites extends \Piwik\Plugin
public function registerEvents()
{
return array(
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
'API.getPagesComparisonsDisabledFor' => 'getPagesComparisonsDisabledFor',
);
}
Expand All @@ -38,7 +38,7 @@ public function addMetricTranslations(&$translations)
'visits_evolution' => Piwik::translate('General_ColumnNbVisits') . $appendix,
'actions_evolution' => Piwik::translate('General_ColumnNbActions') . $appendix,
'pageviews_evolution' => Piwik::translate('General_ColumnPageviews') . $appendix,
'hits_evolution' => Piwik::translate('General_ColumnHits') . $appendix,
'hits_evolution' => Piwik::translate('General_ColumnHits') . $appendix,
'revenue_evolution' => Piwik::translate('General_ColumnRevenue') . $appendix,
'nb_conversions_evolution' => Piwik::translate('Goals_ColumnConversions') . $appendix,
'orders_evolution' => Piwik::translate('General_EcommerceOrders') . $appendix,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 979da07

Please sign in to comment.