summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-10-24 07:24:53 +0200
committermkanat%bugzilla.org <>2009-10-24 07:24:53 +0200
commitad9d2eb59d635d1d7a4fb8b2bf110c9aca495ae1 (patch)
treeef040fa324efbe0cad5fe1b5a46f597da1894e2f /Bugzilla/User.pm
parentf9cd15c79202a50d7c0a3f9aa8de45c2c23cdb49 (diff)
downloadbugzilla-ad9d2eb59d635d1d7a4fb8b2bf110c9aca495ae1.tar.gz
bugzilla-ad9d2eb59d635d1d7a4fb8b2bf110c9aca495ae1.tar.xz
Bug 522404: Allow Bugzilla::Product->create to create multiple products in one script.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 50147f90a..7057ec90a 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -659,6 +659,13 @@ sub visible_bugs {
return [grep { $visible_cache->{blessed $_ ? $_->id : $_} } @$bugs];
}
+sub clear_product_cache {
+ my $self = shift;
+ delete $self->{enterable_products};
+ delete $self->{selectable_products};
+ delete $self->{selectable_classifications};
+}
+
sub can_see_product {
my ($self, $product_name) = @_;
@@ -1962,6 +1969,12 @@ care of by the constructor. However, when updating the email address, the
user may be placed into different groups, based on a new email regexp. This
method should be called in such a case to force reresolution of these groups.
+=item C<clear_product_cache>
+
+Clears the stored values for L</get_selectable_products>,
+L</get_enterable_products>, etc. so that their data will be read from
+the database again. Used mostly by L<Bugzilla::Product>.
+
=item C<get_selectable_products>
Description: Returns all products the user is allowed to access. This list