summaryrefslogtreecommitdiffstats
path: root/editclassifications.cgi
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-01-31 08:18:51 +0100
committerByron Jones <bjones@mozilla.com>2014-01-31 08:18:51 +0100
commitc5464b5bb7dfece2bad2b8af9eba4d9b6d07d778 (patch)
tree092c3a3ecb3152aba305c8ec4323056fc27865e2 /editclassifications.cgi
parentcbd6506533f7370ba27c6928e887889627acb6b9 (diff)
downloadbugzilla-c5464b5bb7dfece2bad2b8af9eba4d9b6d07d778.tar.gz
bugzilla-c5464b5bb7dfece2bad2b8af9eba4d9b6d07d778.tar.xz
Bug 956233: enable USE_MEMCACHE on most objects
r=dkl, a=glob
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 3d93057b9..d47853133 100755
--- a/editclassifications.cgi
+++ b/editclassifications.cgi
@@ -188,9 +188,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');
@@ -198,6 +199,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);
@@ -206,7 +208,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);
@@ -216,6 +219,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);
}