summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Version.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
committermkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
commit845aacfb3652a18ef12828628e68180591f6baf6 (patch)
tree32f462212ee80be748c073f221489d4a935f1aea /Bugzilla/Version.pm
parentd721954afb4458f240d3be8e020c619c57c9c1ed (diff)
downloadbugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.gz
bugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.xz
Bug 373440: Make "check" into a generic function in Bugzilla::Object
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Version.pm')
-rw-r--r--Bugzilla/Version.pm26
1 files changed, 0 insertions, 26 deletions
diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm
index 69eee3752..a2ef6b01e 100644
--- a/Bugzilla/Version.pm
+++ b/Bugzilla/Version.pm
@@ -150,20 +150,6 @@ sub product_id { return $_[0]->{'product_id'}; }
##### Subroutines ###
###############################
-sub check_version {
- my ($product, $version_name) = @_;
-
- $version_name || ThrowUserError('version_not_specified');
- my $version = new Bugzilla::Version(
- { product => $product, name => $version_name });
- unless ($version) {
- ThrowUserError('version_not_valid',
- {'product' => $product->name,
- 'version' => $version_name});
- }
- return $version;
-}
-
sub create {
my ($name, $product) = @_;
my $dbh = Bugzilla->dbh;
@@ -212,9 +198,6 @@ Bugzilla::Version - Bugzilla product version class.
my $version = $hash_ref->{'version_value'};
- my $version = Bugzilla::Version::check_version($product_obj,
- 'acme_version');
-
my $version = Bugzilla::Version::create($version_name, $product);
=head1 DESCRIPTION
@@ -266,15 +249,6 @@ Version.pm represents a Product Version object.
=over
-=item C<check_version($product, $version_name)>
-
- Description: Checks if the version name exists for the product name.
-
- Params: $product - A Bugzilla::Product object.
- $version_name - String with a version name.
-
- Returns: Bugzilla::Version object.
-
=item C<create($version_name, $product)>
Description: Create a new version for the given product.