Skip to content
Extraits de code Groupes Projets
Valider 8dfafd8a rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Refs #4878, fix bug in VisitFrequency.addPrePiwik2DataIfNewDataAbsent and add...

Refs #4878, fix bug in VisitFrequency.addPrePiwik2DataIfNewDataAbsent and add test for multiple periods w/ pre Piwik 2 VisitFrequency data.
parent 80520d02
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -152,7 +152,7 @@ class API extends \Piwik\Plugin\API
private function addPrePiwik2DataIfNewDataAbsent(DataTable\DataTableInterface $oldData, DataTable\DataTableInterface $newData)
{
if ($oldData instanceof \Piwik\DataTable\Map) {
$newArray = $oldData->getDataTables();
$newArray = $newData->getDataTables();
foreach ($oldData->getDataTables() as $subTable) {
$this->addPrePiwik2DataIfNewDataAbsent($subTable, current($newArray));
next($newArray);
......
......@@ -70,6 +70,9 @@ class Test_Piwik_Integration_BackwardsCompatibility1XTest extends IntegrationTes
'compareAgainst' => 'OneVisitorTwoVisits',
'disableArchiving' => true)),
array('VisitFrequency.get', array('idSite' => $idSite, 'date' => '2012-03-03', 'setDateLastN' => true,
'disableArchiving' => true)),
/* cannot test this (see above)
array('VisitFrequency.get', array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('year'),
'compareAgainst' => 'OneVisitorTwoVisits',
......
<?xml version="1.0" encoding="utf-8" ?>
<results>
<result date="2012-03-03" />
<result date="2012-03-04" />
<result date="2012-03-05" />
<result date="2012-03-06">
<nb_uniq_visitors_returning>1</nb_uniq_visitors_returning>
<nb_visits_returning>1</nb_visits_returning>
<nb_actions_returning>1</nb_actions_returning>
<max_actions_returning>1</max_actions_returning>
<sum_visit_length_returning>0</sum_visit_length_returning>
<bounce_count_returning>1</bounce_count_returning>
<nb_visits_converted_returning>1</nb_visits_converted_returning>
<bounce_rate_returning>100%</bounce_rate_returning>
<nb_actions_per_visit_returning>1</nb_actions_per_visit_returning>
<avg_time_on_site_returning>0</avg_time_on_site_returning>
</result>
<result date="2012-03-07" />
<result date="2012-03-08" />
<result date="2012-03-09" />
</results>
\ No newline at end of file
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