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/Version.pm | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'Bugzilla/Version.pm') diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm index c6c4bdae2..9492e8135 100644 --- a/Bugzilla/Version.pm +++ b/Bugzilla/Version.pm @@ -96,32 +96,6 @@ sub product_id { return $_[0]->{'product_id'}; } ##### Subroutines ### ############################### -sub get_versions_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::Version::get_versions_by_product'} - ); - } - - my $values = $dbh->selectcol_arrayref(q{ - SELECT value FROM versions - WHERE product_id = ?}, undef, $product_id); - - my @versions; - foreach my $value (@$values) { - push @versions, new Bugzilla::Version($product_id, $value); - } - return @versions; -} - sub check_version { my ($product, $version_name) = @_; @@ -152,7 +126,6 @@ Bugzilla::Version - Bugzilla product version class. my $product_id = $version->product_id; my $value = $version->value; - my $hash_ref = Bugzilla::Version::get_versions_by_product(1); my $version = $hash_ref->{'version_value'}; my $version = Bugzilla::Version::check_version($product_obj, @@ -190,15 +163,6 @@ Version.pm represents a Product Version object. =over -=item C - - Description: Returns all product versions that belong - to the supplied product. - - Params: $product_id - Integer with a product id. - - Returns: Bugzilla::Version object list. - =item C Description: Checks if the version name exists for the product name. -- cgit v1.2.3-24-g4f1b