@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.

Call array_unique() in Handle/Object queries

Summary: I think the old thing did this, but this makes queries a bit less ridiculous. For example, `secure.phabricator.com` currently issues a query for 664 handles on my task list, but only 73 of them are unique (basically, all the projects plus all the authors). This proably is slightly good for performance, but mostly makes the "Services" tab manageable.

Test Plan: Looked at Maniphest and some other pages, saw handles and objects where they were expected to be.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+7 -5
+2 -2
src/applications/phid/query/PhabricatorHandleQuery.php
··· 3 3 final class PhabricatorHandleQuery 4 4 extends PhabricatorCursorPagedPolicyAwareQuery { 5 5 6 - private $phids; 6 + private $phids = array(); 7 7 8 8 public function withPHIDs(array $phids) { 9 9 $this->phids = $phids; ··· 13 13 public function loadPage() { 14 14 $types = PhabricatorPHIDType::getAllTypes(); 15 15 16 - $phids = $this->phids; 16 + $phids = array_unique($this->phids); 17 17 if (!$phids) { 18 18 return array(); 19 19 }
+5 -3
src/applications/phid/query/PhabricatorObjectQuery.php
··· 3 3 final class PhabricatorObjectQuery 4 4 extends PhabricatorCursorPagedPolicyAwareQuery { 5 5 6 - private $phids; 7 - private $names; 6 + private $phids = array(); 7 + private $names = array(); 8 8 9 9 private $namedResults; 10 10 ··· 25 25 26 26 $types = PhabricatorPHIDType::getAllTypes(); 27 27 28 - $names = $this->names; 28 + $names = array_unique($this->names); 29 29 $phids = $this->phids; 30 30 31 31 // We allow objects to be named by their PHID in addition to their normal ··· 41 41 } 42 42 } 43 43 } 44 + 45 + $phids = array_unique($phids); 44 46 45 47 if ($names) { 46 48 $name_results = $this->loadObjectsByName($types, $names);