Changeset |
Reorganize filter_api operations
Move some code around filter_api and related code, to clean up, and
remove duplicated logic.
The code is now organized in three separated main functions:
-
filter_get default(), filter_get_default_array()
This creates an initial filter array, with all properties needed,
initialized to its default values
-
filter_ensure_valid_filter()
This validates a filter array, changes types, adds missing
properties.
Missing properties are filled with defaults, instead of reading
values from post/get parameters
-
filter_gpc_get()
New function to perform the reading of parameters from get/post.
A filter array can be passed as parameter, then the read parameters
will be appended, or everride existing ones.
If no filter array is used as parameter, a default one will be used.
The gpc read of parameters has been removed from view_all_set.php,
and now it can be used from the filter_api.
|