Skip to content

Commit

Permalink
#7365 Do not show the "welcome" screen if log purging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Mar 22, 2015
1 parent c415afe commit 2aed127
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/SitesManager/SitesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Piwik\Common;
use Piwik\Archive\ArchiveInvalidator;
use Piwik\Plugins\PrivacyManager\PrivacyManager;
use Piwik\Tracker\Cache;
use Piwik\Tracker\Model as TrackerModel;

Expand Down Expand Up @@ -48,6 +49,12 @@ public function redirectDashboardToWelcomePage(&$module, &$action)
return;
}

// Skip the screen if purging logs is enabled
$settings = PrivacyManager::getPurgeDataSettings();
if ($settings['delete_logs_enable'] == 1) {
return;
}

$trackerModel = new TrackerModel();
if ($trackerModel->isSiteEmpty($siteId)) {
$module = 'SitesManager';
Expand Down

0 comments on commit 2aed127

Please sign in to comment.