Commit 61a274e7 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 686780: Editing votes crashes Bugzilla

r=dkl a=LpSolit
parent a4d8243c
......@@ -52,6 +52,21 @@ use constant REL_VOTER => 4;
# Installation #
################
BEGIN {
*Bugzilla::Bug::votes = \&votes;
}
sub votes {
my $self = shift;
my $dbh = Bugzilla->dbh;
return $self->{votes} if exists $self->{votes};
$self->{votes} = $dbh->selectrow_array('SELECT votes FROM bugs WHERE bug_id = ?',
undef, $self->id);
return $self->{votes};
}
sub db_schema_abstract_schema {
my ($self, $args) = @_;
$args->{'schema'}->{'votes'} = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment