Skip to content
Extraits de code Groupes Projets
Valider 1308aa8c rédigé par Benaka's avatar Benaka
Parcourir les fichiers

Merge pull request #7819 from piwik/7818

Fixes #7818 make sure MultiSites.getAll handles showColumns correctly when a comma separated list is used instead of an array of strings.
parents e706eb20 41d91468
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -91,6 +91,10 @@ class API extends \Piwik\Plugin\API
$sites = $this->getSitesIdFromPattern($pattern, $_restrictSitesToLogin);
if (!empty($showColumns) && !is_array($showColumns)) {
$showColumns = explode(',', $showColumns);
}
if (empty($sites)) {
return new DataTable();
}
......
......@@ -66,6 +66,13 @@ class OneVisitorOneWebsiteSeveralDaysDateRangeTest extends SystemTestCase
'testSuffix' => '_MultipleDatesNotSupported',
)),
// test that multiple periods are not supported
array('MultiSites.getAll', array('date' => '2010-12-15',
'periods' => array('day'),
'testSuffix' => '_showColumns',
'otherRequestParameters' => array('showColumns' => 'nb_visits,visits_evolution')
)),
//---------------------------------------
// THEN some Socials tests. Share these...
array('Referrers.getSocials', array('idSite' => 'all',
......
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>
<label>Site AAAAAA</label>
<nb_visits>2</nb_visits>
<visits_evolution>0%</visits_evolution>
<idsite>1</idsite>
<group />
<main_url>http://piwik.net</main_url>
</row>
<row>
<label>SITE BBbbBB</label>
<nb_visits>1</nb_visits>
<visits_evolution>0%</visits_evolution>
<idsite>2</idsite>
<group />
<main_url>http://piwik.net</main_url>
</row>
</result>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter