diff options
author | lpsolit%gmail.com <> | 2006-12-19 18:35:42 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-12-19 18:35:42 +0000 |
commit | 3f1a0a8168493175b6c44e18edc25bd655f8c8b2 (patch) | |
tree | c8e93afaaab1355f95dac4dae1923c89875943b1 /Bugzilla/Product.pm | |
parent | 5f4ade1f01bfca77c9db8d56dd8cc5b2b4062d7a (diff) | |
download | bugs-3f1a0a8168493175b6c44e18edc25bd655f8c8b2.tar bugs-3f1a0a8168493175b6c44e18edc25bd655f8c8b2.tar.gz bugs-3f1a0a8168493175b6c44e18edc25bd655f8c8b2.tar.bz2 bugs-3f1a0a8168493175b6c44e18edc25bd655f8c8b2.tar.xz bugs-3f1a0a8168493175b6c44e18edc25bd655f8c8b2.zip |
Bug 339384: Make Bugzilla::Milestone use Bugzilla::Object - Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit a=justdave
Diffstat (limited to 'Bugzilla/Product.pm')
-rw-r--r-- | Bugzilla/Product.pm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index c525efc11..728bd0652 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -120,16 +120,11 @@ sub milestones { my $dbh = Bugzilla->dbh; if (!defined $self->{milestones}) { - my $values = $dbh->selectcol_arrayref(q{ - SELECT value FROM milestones - WHERE product_id = ? - ORDER BY sortkey}, undef, $self->id); + my $ids = $dbh->selectcol_arrayref(q{ + SELECT id FROM milestones + WHERE product_id = ?}, undef, $self->id); - my @milestones; - foreach my $value (@$values) { - push @milestones, new Bugzilla::Milestone($self->id, $value); - } - $self->{milestones} = \@milestones; + $self->{milestones} = Bugzilla::Milestone->new_from_list($ids); } return $self->{milestones}; } |