diff options
Diffstat (limited to 'plugins/DevicesDetection/API.php')
-rw-r--r-- | plugins/DevicesDetection/API.php | 6 |
1 files changed, 5 insertions, 1 deletions
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; } /** |