View Issue Details

IDProjectCategoryView StatusLast Update
0007910mantisbtfilterspublic2007-05-08 03:42
Reporterfrankb Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a2 
Summary0007910: create permlink is missing a parameter
Description

When I create a permlink I miss the parameter per_page. The created link will work when I add &per_page=50 at the end of the url.

TagsNo tags attached.

Activities

frankb

frankb

2007-04-20 06:31

reporter   ~0014379

The parameter per_page is left out when the per_page parameter has the same value as declared in the configuration!

in the filter_api.php I found this:
if ( !filter_str_field_is_any( $p_custom_filter[FILTER_SEARCH_ISSUES_PER_PAGE] ) ) {
if ( $p_custom_filter[FILTER_SEARCH_ISSUES_PER_PAGE] != config_get( 'default_limit_view' ) ) {
$t_query[] = filter_encode_field_and_value( FILTER_PROPERTY_ISSUES_PER_PAGE, $p_custom_filter[FILTER_SEARCH_ISSUES_PER_PAGE] );
}
}

Why is that? I left out the second if which give you this:
if ( !filter_str_field_is_any( $p_custom_filter[FILTER_SEARCH_ISSUES_PER_PAGE] ) ) {
$t_query[] = filter_encode_field_and_value( FILTER_PROPERTY_ISSUES_PER_PAGE, $p_custom_filter[FILTER_SEARCH_ISSUES_PER_PAGE] );
}

It is working fine!

vboctor

vboctor

2007-04-22 03:34

manager   ~0014384

In the search page, replace:

$my_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] = gpc_get_int( FILTER_SEARCH_ISSUES_PER_PAGE );

with:

$my_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] = gpc_get_int( FILTER_SEARCH_ISSUES_PER_PAGE, config_get( 'default_limit_view' ) );

and revert your other change.