Bug 40933 - debug product/component list
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1094 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
78e554d4ad
commit
a3316f2c30
|
@ -47,9 +47,6 @@ 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')
|
||||
|
@ -57,6 +54,9 @@ $user->in_group('editcomponents')
|
|||
action => "edit",
|
||||
object => "flagtypes"});
|
||||
|
||||
# We need this everywhere.
|
||||
$vars = get_products_and_components($vars);
|
||||
|
||||
################################################################################
|
||||
# Main Body Execution
|
||||
################################################################################
|
||||
|
@ -85,7 +85,7 @@ elsif ($action eq 'update') { update($token); }
|
|||
elsif ($action eq 'confirmdelete') { confirmDelete(); }
|
||||
elsif ($action eq 'delete') { deleteType($token); }
|
||||
elsif ($action eq 'deactivate') { deactivate($token); }
|
||||
else {
|
||||
else {
|
||||
ThrowCodeError("action_unrecognized", { action => $action });
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,6 @@ sub list {
|
|||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
||||
|
||||
sub edit {
|
||||
my ($action) = @_;
|
||||
|
||||
|
@ -218,7 +217,7 @@ sub processCategoryChange {
|
|||
validateIsRequestable();
|
||||
validateIsRequesteeble();
|
||||
validateAllowMultiple();
|
||||
|
||||
|
||||
my @inclusions = $cgi->param('inclusions');
|
||||
my @exclusions = $cgi->param('exclusions');
|
||||
if ($categoryAction eq 'include') {
|
||||
|
@ -243,7 +242,7 @@ sub processCategoryChange {
|
|||
my @exclusion_to_remove = $cgi->param('exclusion_to_remove');
|
||||
@exclusions = map {(lsearch(\@exclusion_to_remove, $_) < 0) ? $_ : ()} @exclusions;
|
||||
}
|
||||
|
||||
|
||||
# Convert the array @clusions('prod_ID:comp_ID') back to a hash of
|
||||
# the form %clusions{'prod_name:comp_name'} = 'prod_ID:comp_ID'
|
||||
my %inclusions = clusion_array_to_hash(\@inclusions);
|
||||
|
@ -386,7 +385,7 @@ sub update {
|
|||
$cgi->param('is_requesteeble'), $cgi->param('is_multiplicable'),
|
||||
scalar($cgi->param('grant_gid')), scalar($cgi->param('request_gid')),
|
||||
$id));
|
||||
|
||||
|
||||
# Update the list of inclusions/exclusions for this flag type.
|
||||
validateAndSubmit($id);
|
||||
|
||||
|
@ -444,7 +443,6 @@ sub update {
|
|||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
||||
|
||||
sub confirmDelete {
|
||||
my $flag_type = validateID();
|
||||
|
||||
|
@ -458,7 +456,6 @@ sub confirmDelete {
|
|||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
||||
|
||||
sub deleteType {
|
||||
my $token = shift;
|
||||
check_token_data($token, 'delete_flagtype');
|
||||
|
@ -491,7 +488,6 @@ sub deleteType {
|
|||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
|
||||
|
||||
sub deactivate {
|
||||
my $token = shift;
|
||||
check_token_data($token, 'delete_flagtype');
|
||||
|
|
Loading…
Reference in New Issue