diff options
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi index a472edee4..810dd7b00 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -456,10 +456,9 @@ if ($cmdtype eq "dorem") { } # If we are here, then we can safely remove the saved search - my ($query_id) = $dbh->selectrow_array('SELECT id FROM namedqueries - WHERE userid = ? - AND name = ?', - undef, ($user->id, $qname)); + my $query_id; + ($buffer, $query_id) = LookupNamedQuery(scalar $cgi->param("namedcmd"), + $user->id); if (!$query_id) { # The user has no query of this name. Play along. } @@ -486,7 +485,7 @@ if ($cmdtype eq "dorem") { # Generate and return the UI (HTML page) from the appropriate template. $vars->{'message'} = "buglist_query_gone"; $vars->{'namedcmd'} = $qname; - $vars->{'url'} = "query.cgi"; + $vars->{'url'} = "buglist.cgi?newquery=" . url_quote($buffer) . "&cmdtype=doit&remtype=asnamed&newqueryname=" . url_quote($qname); $template->process("global/message.html.tmpl", $vars) || ThrowTemplateError($template->error()); exit; |