mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-19 21:19:29 +00:00
- 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user