summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Product.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-02 02:34:26 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-02 02:34:26 +0100
commitb0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af (patch)
treec08cb54facdfa7f21833b6519fd0f468f5022e29 /Bugzilla/Product.pm
parent52ca02ea108a6c1d4c1ec735d3907782c2000586 (diff)
downloadbugzilla-b0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af.tar.gz
bugzilla-b0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af.tar.xz
Bug 487508: Allow restricting the visibility of custom fields and values by component
r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Product.pm')
-rw-r--r--Bugzilla/Product.pm17
1 files changed, 2 insertions, 15 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm
index c993905db..6b00fcbf6 100644
--- a/Bugzilla/Product.pm
+++ b/Bugzilla/Product.pm
@@ -32,9 +32,7 @@ use Bugzilla::Mailer;
use Bugzilla::Series;
use Bugzilla::Hook;
-# Currently, we only implement enough of the Bugzilla::Field::Choice
-# interface to control the visibility of other fields.
-use base qw(Bugzilla::Field::Choice);
+use base qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object);
use constant DEFAULT_CLASSIFICATION_ID => 1;
@@ -43,10 +41,6 @@ use constant DEFAULT_CLASSIFICATION_ID => 1;
###############################
use constant DB_TABLE => 'products';
-# Reset these back to the Bugzilla::Object defaults, instead of the
-# Bugzilla::Field::Choice defaults.
-use constant NAME_FIELD => 'name';
-use constant LIST_ORDER => 'name';
use constant DB_COLUMNS => qw(
id
@@ -565,14 +559,7 @@ sub _check_votes {
# Implement Bugzilla::Field::Choice #
#####################################
-sub field {
- my $invocant = shift;
- my $class = ref $invocant || $invocant;
- my $cache = Bugzilla->request_cache;
- $cache->{"field_$class"} ||= new Bugzilla::Field({ name => 'product' });
- return $cache->{"field_$class"};
-}
-
+use constant FIELD_NAME => 'product';
use constant is_default => 0;
###############################