Skip to content

Commit

Permalink
Merge pull request #481 from sunanzhi/0.21.x
Browse files Browse the repository at this point in the history
Fix missing required parameter in RunController:274
  • Loading branch information
glensc committed Jul 25, 2022
2 parents 5b71f20 + f2cbb74 commit 597eecc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/RunController.php
Expand Up @@ -271,7 +271,7 @@ public function compare(Request $request): void
'base_run' => $baseRun,
'head_run' => $headRun,
'candidates' => $candidates,
'url_params' => $request->get(),
'url_params' => $request->getQueryParams(),
'comparison' => $comparison,
'paging' => $paging,
'search' => [
Expand Down
5 changes: 5 additions & 0 deletions src/RequestProxy.php
Expand Up @@ -17,6 +17,11 @@ public function __construct(Request $request)
$this->request = $request;
}

public function getQueryParams()
{
return $this->request->getQueryParams();
}

public function get(string $key, $default = null)
{
return $this->request->getQueryParam($key, $default);
Expand Down
2 changes: 1 addition & 1 deletion templates/runs/compare.twig
Expand Up @@ -36,7 +36,7 @@
<div class="row-fluid row-spaced">
<h3>Other runs with {{ base_run.meta.simple_url }}</h3>
{% include 'runs/paginated-list.twig' with {runs: candidates.results, show_compare_link: true} %}
{{ helpers.pagination('run.compare', pagination, url_params) }}
{{ helpers.pagination('run.compare', paging, url_params) }}
</div>
{% endif %}

Expand Down

0 comments on commit 597eecc

Please sign in to comment.