diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 09696f97b..327fb866c 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -66,6 +66,8 @@ use base qw(Bugzilla::Object Exporter); editable_bug_fields ); +my %CLEANUP; + ##################################################################### # Constants ##################################################################### @@ -367,6 +369,9 @@ sub new { return $error_self; } + $CLEANUP{$self->id} = $self; + weaken($CLEANUP{$self->id}); + return $self; } @@ -381,6 +386,15 @@ sub object_cache_key { return $key . ',' . Bugzilla->user->id; } +sub CLEANUP { + foreach my $bug (values %CLEANUP) { + next unless $bug; + delete $bug->{depends_on_obj}; + delete $bug->{blocks_obj}; + } + %CLEANUP = (); +} + sub check { my $class = shift; my ($param, $field) = @_; |