summaryrefslogtreecommitdiffstats
path: root/editclassifications.cgi
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-03-04 08:50:54 +0100
committerByron Jones <bjones@mozilla.com>2014-03-04 08:50:54 +0100
commit9193214274889f2b7636146e72d8200e9bfaeb7b (patch)
treee570cc86aa8df53dd0e7e9d902d88450c5dc25c7 /editclassifications.cgi
parent75eaf0d6c8ecf764d73cb870e504e84826d44751 (diff)
downloadbugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.gz
bugzilla-9193214274889f2b7636146e72d8200e9bfaeb7b.tar.xz
Bug 966180: backport bug 956233 to bmo (enable USE_MEMCACHE on most objects)
Diffstat (limited to 'editclassifications.cgi')
-rwxr-xr-xeditclassifications.cgi11
1 files changed, 9 insertions, 2 deletions
diff --git a/editclassifications.cgi b/editclassifications.cgi
index db9dd7f0a..817c53af7 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,10 @@ 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 });
+ }
+
LoadTemplate($action);
}