Commit c7affd0d authored by Dylan Hardison's avatar Dylan Hardison

Bug 1232180 - Incorrect regexp used to filter bug IDs in Bugzilla::WebService::BugUserLastVisit

r=dkl,a=dkl
parent e2477726
...@@ -36,7 +36,7 @@ sub update { ...@@ -36,7 +36,7 @@ sub update {
# Cache permissions for bugs. This highly reduces the number of calls to the # Cache permissions for bugs. This highly reduces the number of calls to the
# DB. visible_bugs() is only able to handle bug IDs, so we have to skip # DB. visible_bugs() is only able to handle bug IDs, so we have to skip
# aliases. # aliases.
$user->visible_bugs([grep /^[0-9]$/, @$ids]); $user->visible_bugs([grep /^[0-9]+$/, @$ids]);
$dbh->bz_start_transaction(); $dbh->bz_start_transaction();
my @results; my @results;
...@@ -72,7 +72,7 @@ sub get { ...@@ -72,7 +72,7 @@ sub get {
# Cache permissions for bugs. This highly reduces the number of calls to # Cache permissions for bugs. This highly reduces the number of calls to
# the DB. visible_bugs() is only able to handle bug IDs, so we have to # the DB. visible_bugs() is only able to handle bug IDs, so we have to
# skip aliases. # skip aliases.
$user->visible_bugs([grep /^[0-9]$/, @$ids]); $user->visible_bugs([grep /^[0-9]+$/, @$ids]);
my %last_visit = map { $_->bug_id => $_->last_visit_ts } @{ $user->last_visited($ids) }; my %last_visit = map { $_->bug_id => $_->last_visit_ts } @{ $user->last_visited($ids) };
@last_visits = map { $self->_bug_user_last_visit_to_hash($_->id, $last_visit{$_}, $params) } @$ids; @last_visits = map { $self->_bug_user_last_visit_to_hash($_->id, $last_visit{$_}, $params) } @$ids;
......
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