Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2016-08-31 01:42:59 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-08-31 16:10:56 +0300
commit73c06026a39a8ba62f83f7082e744480bcc6b86e (patch)
tree5d73cb67c8b1cc584cf28d3bfd31e7cc68b7a6dd /plugins/API/Controller.php
parentd036bacec1f9b121c9d4f9e5b98ea224ed4dfae0 (diff)
Apply default filter_limit to all API calls (#10009)
* fix #8458 Apply default filter_limit to all API calls * return all results where needed instead of default filter limit of 100 * make sure to apply offset * fix unit tests * fix import logs test as they post the filter value
Diffstat (limited to 'plugins/API/Controller.php')
-rw-r--r--plugins/API/Controller.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php
index 5a15c6dbe7..e7ef5efd36 100644
--- a/plugins/API/Controller.php
+++ b/plugins/API/Controller.php
@@ -29,8 +29,11 @@ class Controller extends \Piwik\Plugin\Controller
// when calling the API through http, we limit the number of returned results
if (!isset($_GET['filter_limit'])) {
- $_GET['filter_limit'] = Config::getInstance()->General['API_datatable_default_limit'];
- $token .= '&api_datatable_default_limit=' . $_GET['filter_limit'];
+ if (isset($_POST['filter_limit'])) {
+ $_GET['filter_limit'] = $_POST['filter_limit'];
+ } else {
+ $_GET['filter_limit'] = Config::getInstance()->General['API_datatable_default_limit'];
+ }
}
$request = new Request($token);