1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Fix a possible query error in filtering events

If all events are filtered by range logic, this invitee query may be invalid.

Auditors: lpriestley
This commit is contained in:
epriestley 2015-05-29 07:17:09 -07:00
parent 59f0e8f950
commit cb52dd27fc

View file

@ -266,11 +266,15 @@ final class PhabricatorCalendarEventQuery
$phids[] = $event->getPHID();
}
$invitees = id(new PhabricatorCalendarEventInviteeQuery())
->setViewer($this->getViewer())
->withEventPHIDs($phids)
->execute();
$invitees = mgroup($invitees, 'getEventPHID');
if ($events) {
$invitees = id(new PhabricatorCalendarEventInviteeQuery())
->setViewer($this->getViewer())
->withEventPHIDs($phids)
->execute();
$invitees = mgroup($invitees, 'getEventPHID');
} else {
$invitees = array();
}
foreach ($events as $event) {
$event_invitees = idx($invitees, $event->getPHID(), array());