Skip to content
Permalink
Browse files

Improve presentation of temporary filters

Merge PR #1390

Fixes #24775, #24776, #25109
  • Loading branch information...
dregad committed Jan 9, 2019
2 parents 7b26ae1 + 11f29fc commit ccae4dce337d779ddabe4a3e23c91c7c732f07b1
@@ -48,7 +48,7 @@
if( $f_type == 'id' ) {
$t_url = $t_path . 'view.php?id={searchTerms}';
} else {
$t_url = $t_path . 'view_all_set.php?type=1&temporary=y&handler_id=[all]&search={searchTerms}';
$t_url = $t_path . 'view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW . '&temporary=y&handler_id=[all]&search={searchTerms}';
}
header( 'Content-Type: application/opensearchdescription+xml' );
@@ -116,7 +116,7 @@ function print_version_header( $p_version_id ) {
echo '<div class="pull-left"><i class="fa fa-calendar-o fa-lg"> </i> ' . $t_release_date . '</div>';
echo '<div class="btn-toolbar pull-right">';
echo '<a class="btn btn-xs btn-primary btn-white btn-round" ';
echo 'href="view_all_set.php?type=1&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id .
echo 'href="view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW . '&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id .
'&' . filter_encode_field_and_value( FILTER_PROPERTY_FIXED_IN_VERSION, $t_version_name ) .
'&' . FILTER_PROPERTY_HIDE_STATUS . '=' . META_FILTER_NONE . '">';
echo lang_get( 'view_bugs_link' );
@@ -144,7 +144,7 @@ function print_version_footer( $p_version_id, $p_issues_resolved ) {
echo '<div class="widget-toolbox padding-8 clearfix">';
echo ' ' . $p_issues_resolved . ' ' . lang_get( $t_bug_string ) . ' ';
echo '<a class="btn btn-xs btn-primary btn-white btn-round" ';
echo 'href="view_all_set.php?type=1&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id .
echo 'href="view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW . '&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id .
'&' . filter_encode_field_and_value( FILTER_PROPERTY_FIXED_IN_VERSION, $t_version_name ) .
'&' . FILTER_PROPERTY_HIDE_STATUS . '=' . META_FILTER_NONE . '">';
echo lang_get( 'view_bugs_link' );
@@ -3107,11 +3107,12 @@
* this is the prefix to use when creating links to bug views from bug counts
* (eg. on the main page and the summary page).
* Default is a temporary filter
* only change the filter this time - 'view_all_set.php?type=1&amp;temporary=y'
* permanently change the filter - 'view_all_set.php?type=1';
* only change the filter this time - 'view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW . '&amp;temporary=y'
* permanently change the filter - 'view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW;
* (FILTER_ACTION_xxx constants are defined in core/constant_inc.php)
* @global string $g_bug_count_hyperlink_prefix
*/
$g_bug_count_hyperlink_prefix = 'view_all_set.php?type=1&amp;temporary=y';
$g_bug_count_hyperlink_prefix = 'view_all_set.php?type=' . FILTER_ACTION_PARSE_NEW . '&amp;temporary=y';
/**
* The regular expression to use when validating new user login names
@@ -489,6 +489,13 @@
define( 'FILTER_STANDARD_REPORTED', 'reported' );
define( 'FILTER_STANDARD_MONITORED', 'monitored' );
# Filter actions, refactored from view_all_set.php
define( 'FILTER_ACTION_RESET', 0 );
define( 'FILTER_ACTION_PARSE_NEW', 1 );
define( 'FILTER_ACTION_PARSE_ADD', 2 );
define( 'FILTER_ACTION_LOAD', 3 );
define( 'FILTER_ACTION_GENERALIZE', 4 );
# Versions
define( 'VERSION_ALL', null );
define( 'VERSION_FUTURE', false );

0 comments on commit ccae4dc

Please sign in to comment.
You can’t perform that action at this time.