]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1002357: memached->clear_config isn't always called where required
authorByron Jones <glob@mozilla.com>
Mon, 12 May 2014 05:11:59 +0000 (13:11 +0800)
committerByron Jones <glob@mozilla.com>
Mon, 12 May 2014 05:11:59 +0000 (13:11 +0800)
r=dkl, a=glob

Bugzilla/Field.pm
Bugzilla/Group.pm
Bugzilla/Milestone.pm
Bugzilla/Product.pm

index 98cf389a11e41517476b9dad57e01433aad21ff6..6ad8df573860b7c389ce78dccb4ff884245fdeac 100644 (file)
@@ -1058,6 +1058,7 @@ sub create {
     $field->_update_visibility_values();
 
     $dbh->bz_commit_transaction();
+    Bugzilla->memcached->clear_config();
 
     if ($field->custom) {
         my $name = $field->name;
@@ -1096,6 +1097,7 @@ sub update {
         $dbh->do("UPDATE " . $self->name . " SET visibility_value_id = NULL");
     }
     $self->_update_visibility_values();
+    Bugzilla->memcached->clear_config();
     return $changes;
 }
 
index 534313d9c8ac5e87eca83d4e3cfa966fa8e926a9..58c9ea19d1c7b3ad2bb4c3a072807f612da10698 100644 (file)
@@ -216,6 +216,7 @@ sub update {
     Bugzilla::Hook::process('group_end_of_update', 
                             { group => $self, changes => $changes });
     $dbh->bz_commit_transaction();
+    Bugzilla->memcached->clear_config();
     return $changes;
 }
 
index daa362c34389c8a81f96963b2cfa7e41a6a746ce..83438e7c6835e9f8e32d57d093fed2e5c4e8afe0 100644 (file)
@@ -113,10 +113,10 @@ sub update {
         $dbh->do('UPDATE products SET defaultmilestone = ?
                   WHERE id = ? AND defaultmilestone = ?',
                  undef, ($self->name, $self->product_id, $changes->{value}->[0]));
-        Bugzilla->memcached->clear({ table => 'produles', id => $self->product_id });
-        Bugzilla->memcached->clear_config();
+        Bugzilla->memcached->clear({ table => 'products', id => $self->product_id });
     }
     $dbh->bz_commit_transaction();
+    Bugzilla->memcached->clear_config();
 
     return $changes;
 }
index 55c4de0b8824a3ba5604b9efad9044a859098216..3d4de7430aa9c6d6f9099f3a21c4ae5c1562090d 100644 (file)
@@ -102,6 +102,7 @@ sub create {
     Bugzilla::Hook::process('product_end_of_create', { product => $product });
 
     $dbh->bz_commit_transaction();
+    Bugzilla->memcached->clear_config();
     return $product;
 }
 
@@ -258,6 +259,7 @@ sub update {
     # Changes have been committed.
     delete $self->{check_group_controls};
     Bugzilla->user->clear_product_cache();
+    Bugzilla->memcached->clear_config();
 
     return $changes;
 }
@@ -316,6 +318,7 @@ sub remove_from_db {
     $self->SUPER::remove_from_db();
 
     $dbh->bz_commit_transaction();
+    Bugzilla->memcached->clear_config();
 
     # We have to delete these internal variables, else we get
     # the old lists of products and classifications again.