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

Rename "needReviewerStatus()" into "needReviewers()"

Summary: Ref T10967. The old name was because we had a `getReviewers()` tied to `needRelationships()`, rename this method to use a simpler and more clear name.

Test Plan: `grep`, browsed around.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10967

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

+29 -29
+1 -1
src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php
··· 44 44 $revision = id(new DifferentialRevisionQuery()) 45 45 ->withIDs(array($id)) 46 46 ->setViewer($viewer) 47 - ->needReviewerStatus(true) 47 + ->needReviewers(true) 48 48 ->executeOne(); 49 49 if (!$revision) { 50 50 throw new ConduitException('ERR_NOT_FOUND');
+1 -1
src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
··· 47 47 $revision = id(new DifferentialRevisionQuery()) 48 48 ->setViewer($viewer) 49 49 ->withIDs(array($request->getValue('revision_id'))) 50 - ->needReviewerStatus(true) 50 + ->needReviewers(true) 51 51 ->needReviewerAuthority(true) 52 52 ->executeOne(); 53 53 if (!$revision) {
+1 -1
src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
··· 39 39 $revision = id(new DifferentialRevisionQuery()) 40 40 ->withIDs(array($id)) 41 41 ->setViewer($viewer) 42 - ->needReviewerStatus(true) 42 + ->needReviewers(true) 43 43 ->needActiveDiffs(true) 44 44 ->executeOne(); 45 45 if (!$revision) {
+1 -1
src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
··· 42 42 $revision = id(new DifferentialRevisionQuery()) 43 43 ->withIDs(array($revision_id)) 44 44 ->setViewer($request->getUser()) 45 - ->needReviewerStatus(true) 45 + ->needReviewers(true) 46 46 ->executeOne(); 47 47 48 48 if (!$revision) {
+1 -1
src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
··· 182 182 $query->withBranches($branches); 183 183 } 184 184 185 - $query->needReviewerStatus(true); 185 + $query->needReviewers(true); 186 186 $query->needCommitPHIDs(true); 187 187 $query->needDiffIDs(true); 188 188 $query->needActiveDiffs(true);
+1 -1
src/applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php
··· 57 57 $revision = id(new DifferentialRevisionQuery()) 58 58 ->setViewer($request->getUser()) 59 59 ->withIDs(array($request->getValue('id'))) 60 - ->needReviewerStatus(true) 60 + ->needReviewers(true) 61 61 ->needActiveDiffs(true) 62 62 ->requireCapabilities( 63 63 array(
+2 -2
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 17 17 $revision = id(new DifferentialRevisionQuery()) 18 18 ->withIDs(array($this->revisionID)) 19 19 ->setViewer($viewer) 20 - ->needReviewerStatus(true) 20 + ->needReviewers(true) 21 21 ->needReviewerAuthority(true) 22 22 ->executeOne(); 23 23 if (!$revision) { ··· 784 784 ->setLimit(10) 785 785 ->needFlags(true) 786 786 ->needDrafts(true) 787 - ->needReviewerStatus(true); 787 + ->needReviewers(true); 788 788 789 789 foreach ($path_map as $path => $path_id) { 790 790 $query->withPath($repository->getID(), $path_id);
+1 -1
src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php
··· 26 26 return id(new DifferentialRevisionQuery()) 27 27 ->setViewer($this->getViewer()) 28 28 ->withIDs(array($object->getID())) 29 - ->needReviewerStatus(true) 29 + ->needReviewers(true) 30 30 ->executeOne(); 31 31 } 32 32
+1 -1
src/applications/differential/editor/DifferentialRevisionEditEngine.php
··· 41 41 protected function newObjectQuery() { 42 42 return id(new DifferentialRevisionQuery()) 43 43 ->needActiveDiffs(true) 44 - ->needReviewerStatus(true) 44 + ->needReviewers(true) 45 45 ->needReviewerAuthority(true); 46 46 } 47 47
+3 -3
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 614 614 615 615 $new_revision = id(new DifferentialRevisionQuery()) 616 616 ->setViewer($this->getActor()) 617 - ->needReviewerStatus(true) 617 + ->needReviewers(true) 618 618 ->needActiveDiffs(true) 619 619 ->withIDs(array($object->getID())) 620 620 ->executeOne(); ··· 1575 1575 ->setViewer($this->getActor()) 1576 1576 ->withPHIDs(array($object->getPHID())) 1577 1577 ->needActiveDiffs(true) 1578 - ->needReviewerStatus(true) 1578 + ->needReviewers(true) 1579 1579 ->executeOne(); 1580 1580 if (!$revision) { 1581 1581 throw new Exception( ··· 1791 1791 // Reload to pick up the active diff and reviewer status. 1792 1792 return id(new DifferentialRevisionQuery()) 1793 1793 ->setViewer($this->getActor()) 1794 - ->needReviewerStatus(true) 1794 + ->needReviewers(true) 1795 1795 ->needActiveDiffs(true) 1796 1796 ->withIDs(array($object->getID())) 1797 1797 ->executeOne();
+1 -1
src/applications/differential/engineextension/DifferentialHovercardEngineExtension.php
··· 25 25 $revisions = id(new DifferentialRevisionQuery()) 26 26 ->setViewer($viewer) 27 27 ->withPHIDs($phids) 28 - ->needReviewerStatus(true) 28 + ->needReviewers(true) 29 29 ->execute(); 30 30 $revisions = mpull($revisions, null, 'getPHID'); 31 31
+1 -1
src/applications/differential/herald/HeraldDifferentialRevisionAdapter.php
··· 85 85 $revision = id(new DifferentialRevisionQuery()) 86 86 ->withIDs(array($revision->getID())) 87 87 ->setViewer(PhabricatorUser::getOmnipotentUser()) 88 - ->needReviewerStatus(true) 88 + ->needReviewers(true) 89 89 ->executeOne(); 90 90 91 91 $object->revision = $revision;
+1 -1
src/applications/differential/mail/DifferentialRevisionMailReceiver.php
··· 18 18 return id(new DifferentialRevisionQuery()) 19 19 ->setViewer($viewer) 20 20 ->withIDs(array($id)) 21 - ->needReviewerStatus(true) 21 + ->needReviewers(true) 22 22 ->needReviewerAuthority(true) 23 23 ->needActiveDiffs(true) 24 24 ->executeOne();
+5 -5
src/applications/differential/query/DifferentialRevisionQuery.php
··· 47 47 private $needDiffIDs = false; 48 48 private $needCommitPHIDs = false; 49 49 private $needHashes = false; 50 - private $needReviewerStatus = false; 50 + private $needReviewers = false; 51 51 private $needReviewerAuthority; 52 52 private $needDrafts; 53 53 private $needFlags; ··· 283 283 284 284 285 285 /** 286 - * Set whether or not the query should load associated reviewer status. 286 + * Set whether or not the query should load associated reviewers. 287 287 * 288 288 * @param bool True to load and attach reviewers. 289 289 * @return this 290 290 * @task config 291 291 */ 292 - public function needReviewerStatus($need_reviewer_status) { 293 - $this->needReviewerStatus = $need_reviewer_status; 292 + public function needReviewers($need_reviewers) { 293 + $this->needReviewers = $need_reviewers; 294 294 return $this; 295 295 } 296 296 ··· 429 429 $this->loadHashes($conn_r, $revisions); 430 430 } 431 431 432 - if ($this->needReviewerStatus || $this->needReviewerAuthority) { 432 + if ($this->needReviewers || $this->needReviewerAuthority) { 433 433 $this->loadReviewers($conn_r, $revisions); 434 434 } 435 435
+1 -1
src/applications/differential/query/DifferentialRevisionSearchEngine.php
··· 19 19 return id(new DifferentialRevisionQuery()) 20 20 ->needFlags(true) 21 21 ->needDrafts(true) 22 - ->needReviewerStatus(true); 22 + ->needReviewers(true); 23 23 } 24 24 25 25 protected function buildQueryFromParameters(array $map) {
+1 -1
src/applications/differential/search/DifferentialRevisionFulltextEngine.php
··· 10 10 $revision = id(new DifferentialRevisionQuery()) 11 11 ->setViewer($this->getViewer()) 12 12 ->withPHIDs(array($object->getPHID())) 13 - ->needReviewerStatus(true) 13 + ->needReviewers(true) 14 14 ->executeOne(); 15 15 16 16 // TODO: This isn't very clean, but custom fields currently rely on it.
+1 -1
src/applications/differential/storage/DifferentialRevision.php
··· 478 478 $reviewers = id(new DifferentialRevisionQuery()) 479 479 ->setViewer(PhabricatorUser::getOmnipotentUser()) 480 480 ->withPHIDs(array($this->getPHID())) 481 - ->needReviewerStatus(true) 481 + ->needReviewers(true) 482 482 ->executeOne() 483 483 ->getReviewerStatus(); 484 484 } else {
+1 -1
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 1765 1765 ->withUpdatedEpochBetween($recent, null) 1766 1766 ->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED) 1767 1767 ->setLimit(10) 1768 - ->needReviewerStatus(true) 1768 + ->needReviewers(true) 1769 1769 ->needFlags(true) 1770 1770 ->needDrafts(true) 1771 1771 ->execute();
+1 -1
src/applications/diffusion/herald/HeraldCommitAdapter.php
··· 190 190 $revision = id(new DifferentialRevisionQuery()) 191 191 ->withIDs(array($revision_id)) 192 192 ->setViewer(PhabricatorUser::getOmnipotentUser()) 193 - ->needReviewerStatus(true) 193 + ->needReviewers(true) 194 194 ->executeOne(); 195 195 if ($revision) { 196 196 $this->affectedRevision = $revision;
+1 -1
src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php
··· 190 190 $this->revision = id(new DifferentialRevisionQuery()) 191 191 ->setViewer(PhabricatorUser::getOmnipotentUser()) 192 192 ->withIDs(array($revision_id)) 193 - ->needReviewerStatus(true) 193 + ->needReviewers(true) 194 194 ->executeOne(); 195 195 } 196 196 }
+1 -1
src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
··· 67 67 $revision = id(new DifferentialRevisionQuery()) 68 68 ->setViewer($viewer) 69 69 ->withIDs(array($revision_id)) 70 - ->needReviewerStatus(true) 70 + ->needReviewers(true) 71 71 ->executeOne(); 72 72 } else { 73 73 $revision = null;
+1 -1
src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
··· 178 178 $revision_query = id(new DifferentialRevisionQuery()) 179 179 ->withIDs(array($revision_id)) 180 180 ->setViewer($actor) 181 - ->needReviewerStatus(true) 181 + ->needReviewers(true) 182 182 ->needActiveDiffs(true); 183 183 184 184 $revision = $revision_query->executeOne();