Procedural File: filter_api.php
Source Location: /core/filter_api.php
Page Details:
Tags:
Includes:
mixed $g_cache_filter_db_filters [line 4307]
filter_cache_result [line 2025]
array filter_cache_result(
array $p_rows, array $p_id_array_lastmod)
|
|
Cache the filter results with bugnote stats for later use
Parameters
array |
$p_rows |
results of the filter query |
array |
$p_id_array_lastmod |
array of bug ids |
filter_cache_row [line 4318]
mixed filter_cache_row(
int $p_filter_id, [bool $p_trigger_errors = true])
|
|
Cache a filter row if necessary and return the cached copy If the second parameter is true (default), trigger an error if the filter can't be found. If the second parameter is false, return false if the filter can't be found.
Parameters
int |
$p_filter_id |
|
bool |
$p_trigger_errors |
|
filter_clear_cache [line 4355]
bool filter_clear_cache(
[int $p_filter_id = null])
|
|
Clear the filter cache (or just the given id if specified)
Parameters
filter_db_can_delete_filter [line 4553]
bool filter_db_can_delete_filter(
$p_filter_id $p_filter_id)
|
|
Check if the current user has permissions to delete the stored query
Parameters
$p_filter_id |
$p_filter_id |
|
filter_db_delete_current_filters [line 4605]
void filter_db_delete_current_filters(
)
|
|
Delete all the unnamed filters
filter_db_delete_filter [line 4583]
bool filter_db_delete_filter(
$p_filter_id $p_filter_id)
|
|
Delete the filter specified by $p_filter_id
Parameters
$p_filter_id |
$p_filter_id |
|
filter_db_get_available_queries [line 4620]
mixed filter_db_get_available_queries(
[int $p_project_id = null], [int $p_user_id = null])
|
|
Parameters
int |
$p_project_id |
|
int |
$p_user_id |
|
filter_db_get_filter [line 4446]
mixed filter_db_get_filter(
int $p_filter_id, [int $p_user_id = null])
|
|
This function returns the filter string that is tied to the unique id parameter. If the user doesn't have permission to see this filter, the function returns null
Parameters
int |
$p_filter_id |
|
int |
$p_user_id |
|
filter_db_get_name [line 4526]
string filter_db_get_name(
int $p_filter_id)
|
|
Query for the filter name using the filter id
Parameters
filter_db_get_project_current [line 4494]
int filter_db_get_project_current(
int $p_project_id, [int $p_user_id = null])
|
|
Parameters
int |
$p_project_id |
|
int |
$p_user_id |
|
filter_db_set_for_current_user [line 4379]
int filter_db_set_for_current_user(
int $p_project_id, bool $p_is_public, string $p_name, string $p_filter_string)
|
|
Add a filter to the database for the current user
Parameters
int |
$p_project_id |
|
bool |
$p_is_public |
|
string |
$p_name |
|
string |
$p_filter_string |
|
filter_deserialize [line 787]
mixed filter_deserialize(
string $p_serialized_filter)
|
|
Deserialize filter string
Tags:
Parameters
string |
$p_serialized_filter |
|
filter_draw_selection_area [line 2058]
void filter_draw_selection_area(
int $p_page_number, [bool $p_for_screen = true])
|
|
Mainly based on filter_draw_selection_area2() but adds the support for the collapsible filter display.
Tags:
Parameters
int |
$p_page_number |
|
bool |
$p_for_screen |
|
filter_draw_selection_area2 [line 2074]
void filter_draw_selection_area2(
int $p_page_number, [bool $p_for_screen = true], [bool $p_expanded = true])
|
|
Prints the filter selection area for both the bug list view screen and the bug list print screen. This function was an attempt to make it easier to add new filters and rearrange them on screen for both pages.
Parameters
int |
$p_page_number |
|
bool |
$p_for_screen |
|
bool |
$p_expanded |
|
filter_encode_field_and_value [line 289]
string filter_encode_field_and_value(
string $p_field_name, string $p_field_value, [ $p_field_type = null])
|
|
Encodes a field and it's value for the filter URL. This handles the URL encoding and arrays.
Tags:
Parameters
string |
$p_field_name |
The field name. |
string |
$p_field_value |
The field value (can be an array) |
|
$p_field_type |
|
filter_ensure_valid_filter [line 440]
mixed filter_ensure_valid_filter(
array $p_filter_arr)
|
|
Make sure that our filters are entirely correct and complete (it is possible that they are not). We need to do this to cover cases where we don't have complete control over the filters given.s
Tags:
Parameters
filter_field_is_any [line 316]
bool filter_field_is_any(
string $p_field_value)
|
|
Checks the supplied value to see if it is an ANY value.
Tags:
Parameters
string |
$p_field_value |
- The value to check. |
filter_field_is_myself [line 375]
bool filter_field_is_myself(
string $p_field_value)
|
|
Checks the supplied value to see if it is a MYSELF value.
Tags:
Parameters
string |
$p_field_value |
- The value to check. |
filter_field_is_none [line 350]
bool filter_field_is_none(
string $p_field_value)
|
|
Checks the supplied value to see if it is a NONE value.
Tags:
Parameters
string |
$p_field_value |
- The value to check. |
filter_get_bug_count [line 991]
int filter_get_bug_count(
array $p_query_clauses)
|
|
Build a query with the query clauses array, query for bug count and return the result
Parameters
filter_get_bug_rows [line 1020]
void filter_get_bug_rows(
&$p_page_number, &$p_per_page, &$p_page_count, &$p_bug_count, [mixed $p_custom_filter = null], [int $p_project_id = null], [int $p_user_id = null], [bool $p_show_sticky = null], int $p_page_number, int $p_per_page, int $p_page_count, int $p_bug_count)
|
|
Tags:
Parameters
int |
$p_page_number |
the page you want to see (set to the actual page on return) |
int |
$p_per_page |
the number of bugs to see per page (set to actual on return) -1 indicates you want to see all bugs null indicates you want to use the value specified in the filter |
int |
$p_page_count |
you don't need to give a value here, the number of pages will be stored here on return |
int |
$p_bug_count |
you don't need to give a value here, the number of bugs will be stored here on return |
mixed |
$p_custom_filter |
Filter to use. |
int |
$p_project_id |
project id to use in filtering. |
int |
$p_user_id |
user id to use as current user when filtering. |
bool |
$p_show_sticky |
get sticky issues only. |
|
&$p_page_number |
|
|
&$p_per_page |
|
|
&$p_page_count |
|
|
&$p_bug_count |
|
filter_get_default [line 734]
mixed filter_get_default(
)
|
|
Get the standard filter that is to be used when no filter was previously saved. When creating specific filters, this can be used as a basis for the filter, where specific entries can be overridden.
filter_get_field [line 867]
string filter_get_field(
int $p_filter_id, string $p_field_name)
|
|
Get the value of the filter field specified by filter id and field name
Parameters
int |
$p_filter_id |
|
string |
$p_field_name |
|
filter_get_plugin_filters [line 59]
array filter_get_plugin_filters(
)
|
|
Allow plugins to define a set of class-based filters, and register/load them here to be used by the rest of filter_api.
Tags:
filter_get_query_sort_data [line 886]
array filter_get_query_sort_data(
&$p_filter, bool $p_show_sticky, array $p_query_clauses, array $p_filter)
|
|
Add sort parameters to the query clauses
Parameters
array |
$p_filter |
|
bool |
$p_show_sticky |
|
array |
$p_query_clauses |
|
|
&$p_filter |
|
filter_get_row [line 857]
mixed filter_get_row(
int $p_filter_id)
|
|
Get the array fields specified by $p_filter_id using the cached row if it's available
Tags:
Parameters
filter_get_url [line 90]
string filter_get_url(
array $p_custom_filter)
|
|
Get a permalink for the current active filter. The results of using these fields by other users can be inconsistent with the original results due to fields like "Myself", "Current Project", and due to access level.
Tags:
Parameters
filter_is_cookie_valid [line 821]
bool filter_is_cookie_valid(
)
|
|
Check if the filter cookie exists and is of the correct version.
filter_name_valid_length [line 4669]
bool filter_name_valid_length(
str $p_name)
|
|
Tags:
Parameters
filter_offset [line 429]
int filter_offset(
int $p_page_number, int $p_per_page)
|
|
Figure out the offset into the db query, offset is which record to start querying from
Parameters
int |
$p_page_number |
|
int |
$p_per_page |
|
filter_page_count [line 398]
$t_page_count filter_page_count(
$p_count $p_count, $p_per_page $p_per_page)
|
|
Use $p_count and $p_per_page to determine how many pages to split this list up into. For the sake of consistency have at least one page, even if it is empty.
Parameters
$p_count |
$p_count |
|
$p_per_page |
$p_per_page |
|
filter_per_page [line 384]
int filter_per_page(
$p_count $p_filter, $p_per_page $p_count, $p_per_page)
|
|
Parameters
$p_count |
$p_filter |
|
$p_per_page |
$p_count |
|
|
$p_per_page |
|
filter_unique_query_clauses [line 979]
$p_query_clauses filter_unique_query_clauses(
$p_query_clauses $p_query_clauses)
|
|
Remove any duplicate values in certain elements of query_clauses Do not loop over query clauses as some keys may contain valid duplicate values. We basically want unique values for just the base query elements select, from, and join 'where' and 'where_values' key should not have duplicates as that is handled earlier and applying array_unique here could cause problems with the query.
Parameters
$p_query_clauses |
$p_query_clauses |
|
filter_valid_page_number [line 412]
void filter_valid_page_number(
$p_page_number $p_page_number, $p_page_count $p_page_count)
|
|
Checks to make sure $p_page_number isn't past the last page. and that $p_page_number isn't before the first page
Parameters
$p_page_number |
$p_page_number |
|
$p_page_count |
$p_page_count |
|
print_filter_custom_field [line 4002]
void print_filter_custom_field(
int $p_field_id)
|
|
print custom fields
Parameters
print_filter_custom_field_date [line 4127]
void print_filter_custom_field_date(
int $p_field_num, int $p_field_id)
|
|
print custom field date fields
Parameters
int |
$p_field_num |
|
int |
$p_field_id |
|
print_filter_do_filter_by_date [line 3798]
void print_filter_do_filter_by_date(
[ $p_hide_checkbox = false])
|
|
print filter by date fields with javascript
Tags:
Parameters
print_filter_handler_id [line 3524]
void print_filter_handler_id(
)
|
|
print the handler field
print_filter_hide_status [line 3649]
void print_filter_hide_status(
)
|
|
print hide status field
print_filter_highlight_changed [line 3786]
void print_filter_highlight_changed(
)
|
|
print highlight changed field
print_filter_note_user_id [line 3916]
void print_filter_note_user_id(
)
|
|
print note reporter field
print_filter_os [line 3580]
print_filter_os_build [line 3595]
void print_filter_os_build(
)
|
|
print the os build field
print_filter_per_page [line 3744]
void print_filter_per_page(
)
|
|
print issues per page field
print_filter_platform [line 3562]
void print_filter_platform(
)
|
|
print the platform field
print_filter_plugin_field [line 3944]
void print_filter_plugin_field(
string $p_field_name, object Filter $p_filter_object)
|
|
Print plugin filter fields as defined by MantisFilter objects.
Parameters
string |
$p_field_name |
Field name |
object Filter |
$p_filter_object |
object |
print_filter_project_id [line 4239]
void print_filter_project_id(
)
|
|
print project field
print_filter_relationship_type [line 3880]
void print_filter_relationship_type(
)
|
|
print relationship fields
print_filter_reporter_id [line 3462]
void print_filter_reporter_id(
)
|
|
Print the reporter field
print_filter_show_build [line 3662]
void print_filter_show_build(
)
|
|
print build field
print_filter_show_category [line 3548]
void print_filter_show_category(
)
|
|
print the category field
print_filter_show_fixed_in_version [line 3690]
void print_filter_show_fixed_in_version(
)
|
|
print fixed in version field
print_filter_show_priority [line 3718]
void print_filter_show_priority(
)
|
|
print priority field
print_filter_show_profile [line 3731]
void print_filter_show_profile(
)
|
|
print profile field
print_filter_show_resolution [line 3623]
void print_filter_show_resolution(
)
|
|
print resolution field
print_filter_show_severity [line 3610]
void print_filter_show_severity(
)
|
|
print the severity field
print_filter_show_sort [line 4049]
void print_filter_show_sort(
)
|
|
print sort fields
print_filter_show_status [line 3636]
void print_filter_show_status(
)
|
|
print status field
print_filter_show_target_version [line 3704]
void print_filter_show_target_version(
)
|
|
print target version field
print_filter_show_version [line 3676]
void print_filter_show_version(
)
|
|
print version field
print_filter_sticky_issues [line 3776]
void print_filter_sticky_issues(
)
|
|
print sticky issues field
print_filter_tag_string [line 3893]
void print_filter_tag_string(
)
|
|
print tag fields
print_filter_user_monitor [line 3498]
void print_filter_user_monitor(
)
|
|
Print the user monitor field
print_filter_view_state [line 3754]
void print_filter_view_state(
)
|
|
print view state field
print_multivalue_field [line 4255]
void print_multivalue_field(
string $p_field_name, mixed $p_field_value)
|
|
Prints a multi-value filter field.
Parameters
string |
$p_field_name |
|
mixed |
$p_field_value |
|
|