diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php index bc09cdeeead986d0274ffb709cd19f6a136d66a8..c953f64145347fa81e5aadf2bce184d023d375a5 100644 --- a/core/Plugin/Visualization.php +++ b/core/Plugin/Visualization.php @@ -61,7 +61,7 @@ class Visualization extends ViewDataTable $this->beforeLoadDataTable(); - $this->loadDataTableFromAPI(); + $this->loadDataTableFromAPI(array('disable_generic_filters' => 1)); $this->postDataTableLoadedFromAPI(); $requestPropertiesAfterLoadDataTable = $this->requestConfig->getProperties(); diff --git a/core/ViewDataTable/Request.php b/core/ViewDataTable/Request.php index 80eb46aed4417e0af116bb81a8a5a137317f4881..e304758f29959f0c62328f08708e795b4e8c96e6 100644 --- a/core/ViewDataTable/Request.php +++ b/core/ViewDataTable/Request.php @@ -38,11 +38,15 @@ class Request * It builds the API request string and uses Request to call the API. * The requested DataTable object is stored in $this->dataTable. */ - public function loadDataTableFromAPI() + public function loadDataTableFromAPI($fixedRequestParams = array()) { // we build the request (URL) to call the API $requestArray = $this->getRequestArray(); + foreach ($fixedRequestParams as $key => $value) { + $requestArray[$key] = $value; + } + // we make the request to the API $request = new ApiRequest($requestArray); @@ -62,9 +66,8 @@ class Request // - we request the method to call to get this specific DataTable // - the format = original specifies that we want to get the original DataTable structure itself, not rendered $requestArray = array( - 'method' => $this->requestConfig->apiMethodToRequestDataTable, - 'format' => 'original', - 'disable_generic_filters' => Common::getRequestVar('disable_generic_filters', 1, 'int') + 'method' => $this->requestConfig->apiMethodToRequestDataTable, + 'format' => 'original' ); $toSetEventually = array(