diff options
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi index 0f7dda0ac..c0c13b033 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -173,6 +173,18 @@ sub LookupNamedQuery { return $result; } +sub LookupSeries { + my ($series_id) = @_; + detaint_natural($series_id) || ThrowCodeError("invalid_series_id"); + + my $dbh = Bugzilla->dbh; + my $result = $dbh->selectrow_array("SELECT query FROM series " . + "WHERE series_id = $series_id"); + $result + || ThrowCodeError("invalid_series_id", {'series_id' => $series_id}); + return $result; +} + sub GetQuip { my $quip; @@ -256,6 +268,12 @@ if ($::FORM{'cmdtype'} eq "dorem") { $params = new Bugzilla::CGI($::buffer); $order = $params->param('order') || $order; } + elsif ($::FORM{'remaction'} eq "runseries") { + $::buffer = LookupSeries($::FORM{"series_id"}); + $vars->{'title'} = "Bug List: $::FORM{'namedcmd'}"; + $params = new Bugzilla::CGI($::buffer); + $order = $params->param('order') || $order; + } elsif ($::FORM{'remaction'} eq "load") { my $url = "query.cgi?" . LookupNamedQuery($::FORM{"namedcmd"}); print $cgi->redirect(-location=>$url); |