diff options
author | lpsolit%gmail.com <> | 2005-09-03 06:12:07 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-09-03 06:12:07 +0200 |
commit | 6b44875b901ac8d1d7383fed017c973a9f954051 (patch) | |
tree | 0b43db0b62321cc03c91caad4810d4660c2fd56c /Bugzilla/Product.pm | |
parent | 3c36f0414886baad1a59db8d0dbd0efd3fec2254 (diff) | |
download | bugzilla-6b44875b901ac8d1d7383fed017c973a9f954051.tar.gz bugzilla-6b44875b901ac8d1d7383fed017c973a9f954051.tar.xz |
Bug 286158: Remove GetSelectableProducts() from globals.pl and use Bugzilla::User::get_selectable_products() instead - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel,kiko a=justdave
Diffstat (limited to 'Bugzilla/Product.pm')
-rw-r--r-- | Bugzilla/Product.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index c257bd4ce..514620258 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -98,8 +98,9 @@ sub components { my $self = shift; if (!defined $self->{components}) { - $self->{components} = + my @components = Bugzilla::Component::get_components_by_product($self->id); + $self->{components} = \@components; } return $self->{components}; } @@ -247,11 +248,11 @@ Bugzilla::Product - Bugzilla product class. my $product = new Bugzilla::Product(1); my $product = new Bugzilla::Product('AcmeProduct'); - my $components = $product->components(); + my @components = $product->components(); my $classification = $product->classification(); - my $hash_ref = $product->group_controls(); - my @array_ref = $product->milestones(); - my @array_ref = $product->versions(); + my $groups_controls = $product->group_controls(); + my @milestones = $product->milestones(); + my @versions = $product->versions(); my $bugcount = $product->bug_count(); my $id = $product->id; @@ -290,12 +291,12 @@ Product.pm represents a product object. =item C<components()> - Description: Returns a hash with all product components. + Description: Returns an array of component objects belonging to + the product. Params: none. - Returns: A hash where component id is the hash key and - Bugzilla::Component object is the hash value. + Returns: An array of Bugzilla::Component object. =item C<classification()> |