- FiltersLib bugfix: now method generateDatasetQuery always build a query with no filters (no where clause) if the filters array is empty

- Added comments to Filters_model methods
- Removed method deleteCustomFilter from Filters_model
- Method getFilterList changed to load all the filters, removed default_filter = false from the where clause
This commit is contained in:
Paolo
2018-06-13 16:50:39 +02:00
parent 34296a436e
commit 2cbda912e3
2 changed files with 4 additions and 13 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ class FiltersLib
*/
public function generateDatasetQuery($query, $filters)
{
$datasetQuery = null;
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS;
// If the given query is valid and the parameter filters is an array
if (!empty(trim($query)) && $filters != null && is_array($filters))
@@ -287,7 +287,7 @@ class FiltersLib
if ($where != '') // if the SQL where clause was built
{
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS.' WHERE '.$where;
$datasetQuery .= ' WHERE '.$where;
}
}