Skip to content

Commit

Permalink
Check for browser archiving in Controller.php
Browse files Browse the repository at this point in the history
Show text according to browser archiving setting.

fixes #3299
  • Loading branch information
halfdan committed Feb 4, 2013
1 parent 509ea6c commit 011794a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion plugins/VisitorGenerator/Controller.php
Expand Up @@ -74,13 +74,15 @@ public function generate()
}

$api = Piwik_CoreAdminHome_API::getInstance();
var_dump($dates);
$api->invalidateArchivedReports($idSite, implode($dates, ","));

$browserArchiving = Piwik_ArchiveProcessing::isBrowserTriggerArchivingEnabled();

// Init view
$view = Piwik_View::factory('generate');
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
$view->assign('browserArchivingEnabled', $browserArchiving);
$view->assign('timer', $timer);
$view->assign('days', $daysToCompute);
$view->assign('nbActionsTotal', $nbActionsTotal);
Expand Down
8 changes: 7 additions & 1 deletion plugins/VisitorGenerator/templates/generate.tpl
Expand Up @@ -6,6 +6,12 @@ Generated visits for {$siteName} and for {'General_LastDays'|translate:$days}.<b
Generated {'General_NbActions'|translate}: {$nbActionsTotal}<br />
{'VisitorGenerator_NbRequestsPerSec'|translate}: {$nbRequestsPerSec}<br />
{$timer}</p>
<p><strong> To have Piwik re-process reports for dates that maybe are already processed, you can TRUNCATE the tables piwik_archive_numeric_* for the months you wish to re-generate data. <a href='http://piwik.org/faq/how-to/#faq_59' target="_blank">See FAQ</a></strong>
<p><strong>
{if $browserArchivingEnabled}
The reports will be reprocessed the next time you visit the Piwik reports, it might take a few minutes.
{else}
Please re-run the archive.php Piwik script in the crontab to refresh the reports. <a href="http://piwik.org/docs/setup-auto-archiving/">See "How to Set up Auto-Archiving of Your Reports"</a>
{/if}
</strong>
</p>
{include file="CoreAdminHome/templates/footer.tpl"}

0 comments on commit 011794a

Please sign in to comment.