summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/Review/Extension.pm11
-rw-r--r--extensions/Review/lib/WebService.pm2
2 files changed, 8 insertions, 5 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index ed155bbd2..ed8191ab8 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -98,14 +98,15 @@ sub _bug_mentor {
sub _user_review_count {
my ($self) = @_;
if (!exists $self->{review_count}) {
- ($self->{review_count}) = Bugzilla->dbh->selectrow_array(
+ my $dbh = Bugzilla->dbh;
+ ($self->{review_count}) = $dbh->selectrow_array(
"SELECT COUNT(*)
- FROM flags
+ FROM flags
INNER JOIN flagtypes ON flagtypes.id = flags.type_id
- WHERE flags.requestee_id = ?
- AND flagtypes.name = ?",
+ WHERE flags.requestee_id = ?
+ AND " . $dbh->sql_in('flagtypes.name', [ "'review'", "'feedback'" ]),
undef,
- $self->id, 'review',
+ $self->id,
);
}
return $self->{review_count};
diff --git a/extensions/Review/lib/WebService.pm b/extensions/Review/lib/WebService.pm
index 963d96233..acce32d2b 100644
--- a/extensions/Review/lib/WebService.pm
+++ b/extensions/Review/lib/WebService.pm
@@ -177,6 +177,8 @@ An array of hashes with the following keys/values:
=item C<name> (string) - The user's display name (may not match the Bugzilla "real name").
+=item C<review_count> (string) - The number of "review" and "feedback" requests in the user's queue.
+
=back
=back