@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix some Calendar Event userPHID/hostPHID/"Creator" confusion in searching

Summary: Ref T11326. Align this stuff with "Host" and "hostPHID".

Test Plan: Searched for events by host.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16303

+11 -10
+6 -6
src/applications/calendar/query/PhabricatorCalendarEventQuery.php
··· 8 8 private $rangeBegin; 9 9 private $rangeEnd; 10 10 private $inviteePHIDs; 11 - private $creatorPHIDs; 11 + private $hostPHIDs; 12 12 private $isCancelled; 13 13 private $eventsWithNoParent; 14 14 private $instanceSequencePairs; ··· 46 46 return $this; 47 47 } 48 48 49 - public function withCreatorPHIDs(array $phids) { 50 - $this->creatorPHIDs = $phids; 49 + public function withHostPHIDs(array $phids) { 50 + $this->hostPHIDs = $phids; 51 51 return $this; 52 52 } 53 53 ··· 370 370 $this->inviteePHIDs); 371 371 } 372 372 373 - if ($this->creatorPHIDs) { 373 + if ($this->hostPHIDs) { 374 374 $where[] = qsprintf( 375 375 $conn, 376 - 'event.userPHID IN (%Ls)', 377 - $this->creatorPHIDs); 376 + 'event.hostPHID IN (%Ls)', 377 + $this->hostPHIDs); 378 378 } 379 379 380 380 if ($this->isCancelled !== null) {
+5 -4
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 26 26 protected function buildCustomSearchFields() { 27 27 return array( 28 28 id(new PhabricatorSearchDatasourceField()) 29 - ->setLabel(pht('Created By')) 30 - ->setKey('creatorPHIDs') 29 + ->setLabel(pht('Hosts')) 30 + ->setKey('hostPHIDs') 31 + ->setAliases(array('host', 'hostPHID', 'hosts')) 31 32 ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()), 32 33 id(new PhabricatorSearchDatasourceField()) 33 34 ->setLabel(pht('Invited')) ··· 78 79 $query = $this->newQuery(); 79 80 $viewer = $this->requireViewer(); 80 81 81 - if ($map['creatorPHIDs']) { 82 - $query->withCreatorPHIDs($map['creatorPHIDs']); 82 + if ($map['hostPHIDs']) { 83 + $query->withHostPHIDs($map['hostPHIDs']); 83 84 } 84 85 85 86 if ($map['invitedPHIDs']) {