summaryrefslogtreecommitdiffstats
path: root/request.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-10-09 17:45:01 +0200
committerlpsolit%gmail.com <>2007-10-09 17:45:01 +0200
commit4f4d96be9d33570d60da58a17b1da0d9d52bbe27 (patch)
tree7eacaadcde3d38adb0305c9d4969ba976bc28488 /request.cgi
parentd057a75773a7454a88854efcca5b8d9ceb2515d7 (diff)
downloadbugzilla-4f4d96be9d33570d60da58a17b1da0d9d52bbe27.tar.gz
bugzilla-4f4d96be9d33570d60da58a17b1da0d9d52bbe27.tar.xz
Bug 399028: Do not display all pending requests by default when the user is logged out - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
Diffstat (limited to 'request.cgi')
-rwxr-xr-xrequest.cgi15
1 files changed, 11 insertions, 4 deletions
diff --git a/request.cgi b/request.cgi
index 8d514347a..886302d56 100755
--- a/request.cgi
+++ b/request.cgi
@@ -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());