From c5464b5bb7dfece2bad2b8af9eba4d9b6d07d778 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 31 Jan 2014 15:18:51 +0800 Subject: Bug 956233: enable USE_MEMCACHE on most objects r=dkl, a=glob --- editclassifications.cgi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'editclassifications.cgi') 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); } -- cgit v1.2.3-24-g4f1b