Skip to content

Commit

Permalink
Fix switching view mode for temporary filters
Browse files Browse the repository at this point in the history
Fix switching view mode for a temporary filter.
Previously, switching the advanced or simple view for a temporary
filter, would lose the filter.

Fixes: #0024776
  • Loading branch information
cproensa authored and dregad committed Jan 9, 2019
1 parent 2011632 commit ff1dbab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/filter_api.php
Expand Up @@ -2552,6 +2552,11 @@ function filter_draw_selection_area( $p_page_number, $p_for_screen = true, $p_ex
<?php
$t_view_filters = config_get('view_filters');

if( $t_is_temporary ) {
$t_tmp_filter_param = '&filter=' . filter_get_temporary_key( $t_filter );
} else {
$t_tmp_filter_param = '';
}
if( ( ( SIMPLE_ONLY != $t_view_filters ) && ( ADVANCED_ONLY != $t_view_filters ) ) ||
access_has_project_level( config_get( 'create_permalink_threshold' ) ) ||
count( $t_stored_queries_arr ) > 0 ) { ?>
Expand All @@ -2562,7 +2567,7 @@ function filter_draw_selection_area( $p_page_number, $p_for_screen = true, $p_ex
<ul class="dropdown-menu dropdown-menu-right dropdown-yellow dropdown-caret dropdown-closer">
<?php
$t_url = config_get( 'use_dynamic_filters' )
? 'view_all_set.php?type=6&amp;view_type='
? 'view_all_set.php?type=6' . $t_tmp_filter_param . '&view_type='
: 'view_filters_page.php?view_type=';
filter_print_view_type_toggle( $t_url, $t_filter['_view_type'] );

Expand Down

0 comments on commit ff1dbab

Please sign in to comment.