From af7d21349fe822fc6517cab76b37bed3e8caeebe Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 7 Oct 2005 01:45:46 +0000 Subject: Bug 309749: Remove get_x_by_y functions from the new .pm files, in favor of object methods Patch By André Batosti r=LpSolit, a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Component.pm | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'Bugzilla/Component.pm') diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index cd6722993..74ea60d1b 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -145,32 +145,6 @@ sub product_id { return $_[0]->{'product_id'}; } #### Subroutines #### ############################### -sub get_components_by_product { - my ($product_id) = @_; - my $dbh = Bugzilla->dbh; - - my $stored_product_id = $product_id; - unless (detaint_natural($product_id)) { - ThrowCodeError( - 'invalid_numeric_argument', - {argument => 'product_id', - value => $stored_product_id, - function => - 'Bugzilla::Component::get_components_by_product'} - ); - } - - my $ids = $dbh->selectcol_arrayref(q{ - SELECT id FROM components - WHERE product_id = ?}, undef, $product_id); - - my @components; - foreach my $id (@$ids) { - push @components, new Bugzilla::Component($id); - } - return @components; -} - sub check_component { my ($product, $comp_name) = @_; @@ -217,7 +191,6 @@ Bugzilla::Component - Bugzilla product component class. my $default_assignee = $component->default_assignee; my $default_qa_contact = $component->default_qa_contact; - my @components = Bugzilla::Component::get_components_by_product($id); my $component = Bugzilla::Component::check_component($product, 'AcmeComp'); =head1 DESCRIPTION @@ -282,15 +255,6 @@ Component.pm represents a Product Component object. =over -=item C - - Description: Returns all components that belong to the supplied product. - - Params: $product_id - Integer with a Bugzilla product id. - - Returns: An array of Bugzilla::Component objects. - - =item C Description: Checks if the component name was passed in and if it is a valid -- cgit v1.2.3-24-g4f1b