Propagate URI parameters

This allows URIs like

  http://hydra.nixos.org/jobset/nixpkgs/trunk/latest-eval?compare=stdenv

to do the right thing.
This commit is contained in:
Eelco Dolstra
2012-04-04 12:56:49 +02:00
parent 05d03ee153
commit e9dd3158a0
2 changed files with 5 additions and 8 deletions

View File

@ -364,9 +364,7 @@ sub latest_eval : Chained('jobset') PathPart('latest-eval') {
my ($self, $c, @args) = @_;
my $eval = getLatestFinishedEval($c, $c->stash->{jobset})
or notFound($c, "No evaluation found.");
my $uri = $c->uri_for($c->controller('JobsetEval')->action_for("view"), [$eval->id]);
$uri .= "/" . join("/", @args) if scalar @args > 0;
$c->res->redirect($uri);
$c->res->redirect($c->uri_for($c->controller('JobsetEval')->action_for("view"), [$eval->id], @args, $c->req->params));
}