From 99b4687996e7476a158990de9742858f27fec657 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Tue, 9 Oct 2007 10:45:01 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20399028:=20Do=20not=20display=20all=20pend?= =?UTF-8?q?ing=20requests=20by=20default=20when=20the=20user=20is=20logged?= =?UTF-8?q?=20out=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Bucl?= =?UTF-8?q?in=20=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@237449 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/request.cgi | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/bugzilla/request.cgi b/mozilla/webtools/bugzilla/request.cgi index 8d514347a40..886302d5690 100755 --- a/mozilla/webtools/bugzilla/request.cgi +++ b/mozilla/webtools/bugzilla/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());