Commit 4f4d96be authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 399028: Do not display all pending requests by default when the user is…

Bug 399028: Do not display all pending requests by default when the user is logged out - Patch by Fré©ric Buclin <LpSolit@gmail.com> a=LpSolit
parent d057a757
......@@ -42,6 +42,10 @@ use Bugzilla::Component;
# Make sure the user is logged in.
my $user = Bugzilla->login();
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $action = $cgi->param('action') || '';
print $cgi->header();
################################################################################
# Main Body Execution
......@@ -59,7 +63,13 @@ unless (defined $cgi->param('requestee')
Bugzilla::User::match_field($cgi, $fields);
queue();
if ($action eq 'queue') {
queue();
}
else {
$template->process('request/queue.html.tmpl', {requests => {}})
|| ThrowTemplateError($template->error());
}
exit;
################################################################################
......@@ -288,9 +298,6 @@ sub queue {
$vars->{'requests'} = \@requests;
$vars->{'types'} = \@types;
# Return the appropriate HTTP response headers.
print $cgi->header();
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("request/queue.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment