From e1cb653e615c7bcdee52c4353f0bb07714835bc9 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Wed, 18 Mar 2015 01:07:34 +0000 Subject: fix tests --- plugins/DevicesDetection/API.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/DevicesDetection/API.php') diff --git a/plugins/DevicesDetection/API.php b/plugins/DevicesDetection/API.php index 1f4a53e48c..b6e484f924 100644 --- a/plugins/DevicesDetection/API.php +++ b/plugins/DevicesDetection/API.php @@ -216,7 +216,11 @@ class API extends \Piwik\Plugin\API */ public function getBrowserFamilies($idSite, $period, $date, $segment = false) { - return $this->getBrowsers($idSite, $period, $date, $segment); + $table = $this->getBrowsers($idSite, $period, $date, $segment); + // this one will not be sorted automatically by nb_visits since there is no Report class for it. + $table->filter('Sort', array(Metrics::INDEX_NB_VISITS, 'desc')); + + return $table; } /** -- cgit v1.2.3