Skip to content

Commit

Permalink
fix: raise search page size limit for logged in users (#10444)
Browse files Browse the repository at this point in the history
logged in users can search up to 1000 results
  • Loading branch information
stephanegigandet authored Jun 14, 2024
1 parent 7516818 commit 716517a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cgi/search.pl
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,18 @@
}

my $limit = 0 + (single_param('page_size') || $options{default_web_products_page_size});
if ($limit > $options{max_products_page_size}) {

if (defined $request_ref->{user_id}) {
if ($limit > $options{max_products_page_size_for_logged_in_users}) {
$limit = $options{max_products_page_size_for_logged_in_users};
}
}
elsif ($limit > $options{max_products_page_size}) {
$limit = $options{max_products_page_size};
}

$request_ref->{page_size} = $limit;

my $graph_ref = {graph_title => remove_tags_and_quote(decode utf8 => single_param("graph_title"))};
my $map_title = remove_tags_and_quote(decode utf8 => single_param("map_title"));

Expand Down

0 comments on commit 716517a

Please sign in to comment.