diff options
Diffstat (limited to 'editclassifications.cgi')
-rwxr-xr-x | editclassifications.cgi | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/editclassifications.cgi b/editclassifications.cgi index db9dd7f0a..3ab89f120 100755 --- a/editclassifications.cgi +++ b/editclassifications.cgi @@ -198,9 +198,10 @@ if ($action eq 'update') { if ($action eq 'reclassify') { my $classification = Bugzilla::Classification->check($class_name); - + my $sth = $dbh->prepare("UPDATE products SET classification_id = ? WHERE name = ?"); + my @names; if (defined $cgi->param('add_products')) { check_token_data($token, 'reclassify_classifications'); @@ -208,6 +209,7 @@ if ($action eq 'reclassify') { foreach my $prod ($cgi->param("prodlist")) { trick_taint($prod); $sth->execute($classification->id, $prod); + push @names, $prod; } } delete_token($token); @@ -216,7 +218,8 @@ if ($action eq 'reclassify') { if (defined $cgi->param('myprodlist')) { foreach my $prod ($cgi->param("myprodlist")) { trick_taint($prod); - $sth->execute(1,$prod); + $sth->execute(1, $prod); + push @names, $prod; } } delete_token($token); @@ -226,6 +229,11 @@ if ($action eq 'reclassify') { $vars->{'classification'} = $classification; $vars->{'token'} = issue_session_token('reclassify_classifications'); + foreach my $name (@names) { + Bugzilla->memcached->clear({ table => 'products', name => $name }); + } + Bugzilla->memcached->clear_config(); + LoadTemplate($action); } |