Page MenuHomePhabricator

D13140.id31734.diff
No OneTemporary

D13140.id31734.diff

diff --git a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
@@ -10,6 +10,7 @@
private $inviteePHIDs;
private $creatorPHIDs;
private $isCancelled;
+ private $eventsWithNoParent;
private $instanceSequencePairs;
private $generateGhosts = false;
@@ -50,6 +51,11 @@
return $this;
}
+ public function withEventsWithNoParent($events_with_no_parent) {
+ $this->eventsWithNoParent = $events_with_no_parent;
+ return $this;
+ }
+
public function withInstanceSequencePairs(array $pairs) {
$this->instanceSequencePairs = $pairs;
return $this;
@@ -272,6 +278,12 @@
(int)$this->isCancelled);
}
+ if ($this->eventsWithNoParent == true) {
+ $where[] = qsprintf(
+ $conn_r,
+ 'event.instanceOfEventPHID IS NULL');
+ }
+
if ($this->instanceSequencePairs !== null) {
$sql = array();
@@ -339,9 +351,7 @@
$instance_of = $event->getInstanceOfEventPHID();
if ($instance_of) {
- if ($instance_of != $event->getPHID() || $event->getIsGhostEvent()) {
- $instance_of_event_phids[] = $event->getInstanceOfEventPHID();
- }
+ $instance_of_event_phids[] = $event->getInstanceOfEventPHID();
}
}
@@ -349,6 +359,7 @@
$recurring_events = id(new PhabricatorCalendarEventQuery())
->setViewer($viewer)
->withPHIDs($instance_of_event_phids)
+ ->withEventsWithNoParent(true)
->execute();
$recurring_events = mpull($recurring_events, null, 'getPHID');

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 19, 12:15 PM (5 m, 7 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6620957
Default Alt Text
D13140.id31734.diff (1 KB)

Event Timeline