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/Milestone.pm | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'Bugzilla/Milestone.pm') diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm index 6a5eeb48f..7b5d47d49 100644 --- a/Bugzilla/Milestone.pm +++ b/Bugzilla/Milestone.pm @@ -98,32 +98,6 @@ sub sortkey { return $_[0]->{'sortkey'}; } ##### Subroutines ##### ################################ -sub get_milestones_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::Milestone::get_milestones_by_product'} - ); - } - - my $values = $dbh->selectcol_arrayref(q{ - SELECT value FROM milestones - WHERE product_id = ?}, undef, $product_id); - - my @milestones; - foreach my $value (@$values) { - push @milestones, new Bugzilla::Milestone($product_id, $value); - } - return @milestones; -} - sub check_milestone { my ($product, $milestone_name) = @_; @@ -172,7 +146,6 @@ Bugzilla::Milestone - Bugzilla product milestone class. my $product_id = $milestone->product_id; my $value = $milestone->value; - my $hash_ref = Bugzilla::Milestone::get_milestones_by_product(1); my $milestone = $hash_ref->{'milestone_value'}; =head1 DESCRIPTION @@ -207,15 +180,6 @@ Milestone.pm represents a Product Milestone object. =over -=item C - - Description: Returns all product milestones that belong - to the supplied product. - - Params: $product_id - Integer with a product id. - - Returns: Bugzilla::Milestone object list. - =item C Description: Checks if a milestone name was passed in -- cgit v1.2.3-24-g4f1b