From 29b9cbc4bef47b2a4d8fce1ba917fe45d785ef40 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 22 May 2006 05:15:04 +0000 Subject: Bug 332522: Remove $::prodmaxvotes - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index c0063aa14..185e50b44 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -32,7 +32,7 @@ use strict; use vars qw(@legal_platform @legal_priority @legal_severity @legal_opsys @legal_bug_status - @settable_resolution %prodmaxvotes); + @settable_resolution); use CGI::Carp qw(fatalsToBrowser); @@ -526,8 +526,9 @@ sub use_votes { my ($self) = @_; return 0 if $self->{'error'}; - return Param('usevotes') - && $::prodmaxvotes{$self->{product}} > 0; + $self->{'prod_obj'} ||= new Bugzilla::Product({name => $self->{'product'}}); + + return Param('usevotes') && $self->{'prod_obj'}->votes_per_user > 0; } sub groups { -- cgit v1.2.3-24-g4f1b