FilterWidget: extended the functionality of the default_filter flag

If only the "app" and "dataset_name" parameters are given, at the first loading of the FilterWidget:
1. Try to load the custom filter (person_id = logged user person_id) with the given "app" and "dataset_name" that is set as default filter (default_filter = true)
2. Try to load the global filter (person_id = null) with the given "app" and "dataset_name" that is set as default filter (default_filter = true)
3. Do not load anything to avoid to retrive too many data from DB
This commit is contained in:
Paolo
2018-05-24 12:37:50 +02:00
parent 45677d0ec4
commit 15e350ea3a
4 changed files with 186 additions and 143 deletions
@@ -44,7 +44,6 @@ class Filters_model extends DB_Model
$filterParametersArray = array(
'app' => $app,
'dataset_name' => $dataset_name,
'default_filter' => false,
'array_length(description, 1) >' => 0,
'uid' => $uid
);