From: lpsolit%gmail.com <> Date: Mon, 23 Nov 2009 22:42:46 +0000 (+0000) Subject: Bug 529863: The product list when listing all flagtypes in editflagtypes.cgi is empty... X-Git-Tag: bugzilla-3.4.5~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7b012c839ba46789ef0416b1d38533edef17ec9;p=thirdparty%2Fbugzilla.git Bug 529863: The product list when listing all flagtypes in editflagtypes.cgi is empty after editing them - Patch by Frédéric Buclin r=ghendricks a=LpSolit --- diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 4dbaae5730..255fe723c8 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -47,6 +47,9 @@ local our $cgi = Bugzilla->cgi; local our $template = Bugzilla->template; local our $vars = {}; +# We need this everywhere. +$vars = get_products_and_components($vars); + # Make sure the user is logged in and is an administrator. my $user = Bugzilla->login(LOGIN_REQUIRED); $user->in_group('editcomponents') @@ -93,9 +96,6 @@ exit; ################################################################################ sub list { - # Restrict the list to the given product and component, if given. - $vars = get_products_and_components($vars); - my $product = validateProduct(scalar $cgi->param('product')); my $component = validateComponent($product, scalar $cgi->param('component')); my $product_id = $product ? $product->id : 0; @@ -178,9 +178,6 @@ sub edit { $flag_type = validateID(); } - # Fill $vars with products and components data. - $vars = get_products_and_components($vars); - $vars->{'last_action'} = $cgi->param('action'); if ($cgi->param('action') eq 'enter' || $cgi->param('action') eq 'copy') { $vars->{'action'} = "insert"; @@ -252,9 +249,6 @@ sub processCategoryChange { my %inclusions = clusion_array_to_hash(\@inclusions); my %exclusions = clusion_array_to_hash(\@exclusions); - # Fill $vars with products and components data. - $vars = get_products_and_components($vars); - my @groups = Bugzilla::Group->get_all; $vars->{'groups'} = \@groups; $vars->{'action'} = $cgi->param('action');